- Update axios dependency to a version that fixes a security vulnerability.
- Add configurable timeout duration.
- Add missing
cause
key to error.
- Change emitted error format—errors now have
headers
,status
,body
, andcause
keys. - Always emit errors when
maxRetries
is exhausted during streaming.
- Add
maxRetries
andretryInterval
configuration options.
- Pass errors to debug function.
- Fix bug in openBox endpoint that prevented searching for all open box items (null search).
- Updated tests to ensure all work offline
- Updated travis tests to target node versions 6, 8, and 9.
- Fix retry logic to ensure streams are even more resilient.
- Added retry logic to ensure streams are more resilient.
- Show more data when debugging streams.
- Added new endpoint:
realTimeAvailability
to check the near real-time availability of a sku for a store or postal code.
- Fix error when search query is blank.
BREAKING CHANGES
- The reviews function has been removed as its no longer available in the API.
- If errors are encountered, functions will now return an
Error
object instead of a string.- This may mean updating existing code to check
err.message
instead oferr
.
- This may mean updating existing code to check
- Native
Promise
is now used instead ofbluebird
- Node version 4 or higher is now required to use this package.
- We've switched from
request
/request-promise
toaxios
which is has built-inPromise
usage. This means Error objects may look slightly different.- For Example.
status
is returned now instead ofstatusCode
.
- For Example.
With the exception of the reviews function (and returning Error
s), the API interface should be nearly identical as the existing test suite was used to ensure the same functionality. The code behind all other funtions has been refactored to make adding some new features a bit easier.
Features:
-
Added
version()
which returns the current API version and package version. -
Added the ability pass a custom function via
debug
for debug information. -
Added automatic rate limiting to avoid
429 Too Many Requests
errors.- This can be manually adjusted via the
requestsPerSecond
option.
- This can be manually adjusted via the
-
Added Node stream support as JSON and XML via these new endpoints:
availabilityAsStream
openBoxAsStream
(xml streaming not supported)categoriesAsStream
productsAsStream
storesAsStream
- These endpoints will return all results and handle pagination/throttling automatically.
- Check the README/examples for more details.
Features:
- Added warrany endpoint support. (thanks @troymccabe!)
- Removing references to the deprecated "similar" endpoint
- Added addtional test coverage.
Breaking Changes:
- Initialization method must be invoked even when setting environment variables
var bby = require('bestbuy')();
- Callbacks were changed to correctly implement 'error first' pattern.
Features:
- Travis CI builds
- Coveralls code coverage
- Jasmine-Node integration / unit tests
- Availability
- OpenBox (the "Buying Options" part of our API)
- Categories
- Products
- Recommendations
- Reviews
- Stores
- Pass custom headers
- Toggle request/response debugging
- Invoke helper using promises