- Get local updates on the in-store and online availablility
- Automatically add items to the cart if re-instock
- Keep a log of availability of watched items
Currently there are two runnable scripts for use.
-
main.js
is well-commented. Feel free to fork the repo and customize the code to track any otheritems on Best Buy. -
EasyRunSwitchInStockTracker.js
needs no more edits than setting up the api key. You only need to run this script if you want to buy the Nintendo Switch.
- Sign-up for a developer API Key at https://developer.bestbuy.com/
- The library requires an API key to be provided before it can be used. You can set that depends on the script you are using:
-
Create a separate file named
apikey.txt
containg the API key. -
Edit the key as a string when invoking the method. The key here only serves as an example.
-
const BestBuyAPI = require('bestbuy')('ABp3jkZI5KOzCdTDzkofjo19');
- Run
npm install open
if needed - Run either command in the Terminal depends on your need:
node EasyRunSwitchInStockTracker.js
node main.js
Here's a snippet of the console outputs.
⚠️ The time string is given out by BestBuy API, not reflecting your local time:
4/8/2020
LATEST ONLINE STOCK UPDATE for Neon Red/N at 2020-04-08T11:32:11
LATEST ONLINE STOCK UPDATE for Animal Cro at 2020-04-06T12:27:13
1:01:37 PM
Gray Joy-C becomes available
LATEST ONLINE STOCK UPDATE for Gray Joy-C at 2020-04-08T11:30:41
1:33:18 PM
Neon Red/N becomes available
LATEST ONLINE STOCK UPDATE for Neon Red/N at 2020-04-08T12:32:15
1:33:18 PM
Gray Joy-C becomes unavailable
LATEST ONLINE STOCK UPDATE for Gray Joy-C at 2020-04-08T12:11:15
An example of the console outputs for the easy run script monitoring the shiping availability for Nintendo Switch would be: