t3chnoboy / amazon-product-api

:credit_card: Amazon Product Advertising API client
366 stars 104 forks source link

Set default values #21

Closed masterT closed 9 years ago

masterT commented 9 years ago

Fix issue #20

t3chnoboy commented 9 years ago

All checks have passed

whoa. PR checker works now!

masterT commented 9 years ago

Now I don't see the point of having a variable defaultParams. I could refactor a little more and change this:

// Default
defaultParams['SearchIndex'] = 'All';
defaultParams['Condition'] = 'All';
defaultParams['ResponseGroup'] = 'ItemAttributes';
defaultParams['Keywords'] = '';
defaultParams['ItemPage'] = '1';

params = setDefaultParams(params, defaultParams);

to that:

// Default
params = setDefaultParams(params, {
  SearchIndex: 'All',
  Condition: 'All',
// ...
});

@t3chnoboy what do you think?

t3chnoboy commented 9 years ago

sweet! Thanks a lot for what you are doing to this project!

masterT commented 9 years ago

You are welcomed! :blush:

masterT commented 9 years ago

I think everything is good now.

masterT commented 9 years ago

@t3chnoboy I will merge/dump version/publish good ?

t3chnoboy commented 9 years ago

yep! shipit :ship:

t3chnoboy commented 9 years ago

that was fast :car:

masterT commented 9 years ago

:information_desk_person: