t3chnoboy / amazon-product-api

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

"Condition: 'All'" should not be a default option #63

Open masterT opened 7 years ago

masterT commented 7 years ago

As seen in PR #62 by @oldstreams.

masterT commented 7 years ago

ItemSearch 📖 Documentation

Required: No

The Condition parameter filters offers by condition type. By default, Condition equals New. When the Availability parameter is set to Available, the Condition parameter cannot be set to New.

When Condition is set to All, ItemSearch returns one offer per condition.

Condition can be used with every index, except All and Blended.

Type: String

Default: New

Valid values: New | Used | Collectible | Refurbished | All

ItemLookup 📖 Documentation

Required: No

Specifies an item's condition. If Condition is set to "All", a separate set of responses is returned for each valid value of Condition. The default value is "New" (not "All"). So, if your request does not return results, consider setting the value to "All". When the value is "New", the ItemLookup availability parameter cannot be set to "Available". Amazon only sells items that are "New".

Type: String

Default: New

Valid Values: Used | Collectible | Refurbished | All

masterT commented 7 years ago

@oldstreams I think that if you want to use the default behaviour, you can simply pass the default AWS value which is New for both operations.

aengl commented 6 years ago

I tested this for both All and New and it does not return the same result in all cases, compared to not specifying Condition at all. Workaround is to actually set Condition to an empty string, but I'd prefer this to not be specified by default since it's not required.