Skip to content
This repository was archived by the owner on Jul 13, 2021. It is now read-only.

Repository files navigation

Archived

This project is no longer maintained and is assumed to not work, given the underlying APIs have undergone changes that this has not been kept up to date with.

wm-pricer npm versionjs-standard-style

An inelegant helper for checking brickseek for Walmart inventory based on a query to Walmart API.

install

npm i wm-pricer

programmatic usage

Only one function exported with signature (opts, callback). Callback will be invoked with (err, data) with data being an array of item objects.

The api limits to 25 results each time. So the start arg allows pagination (i.e. for page 2 start at 26).

Provide API key (required)

constWmPricerApi=require('wm-pricer').apiconstsecrets=require('./secrets.json')constopts={zip: 33803,query: '4k tv',start: 1}constmain=async()=>{letdata=awaitnewPromise((resolve,reject)=>{letwmp=WmPricerApi.new(secrets.apiKey)wmp.on('error',reject)wmp.once('store-query-done',resolve)wmp.storeQuery(opts)})}

cli usage

npm i -g wm-pricer

wmp -h

or

WM-Pricer
===========
usage:
wmp [options]
wmp [zip] query
options:
-r, --remember Store options (i.e. store apiKey / zip for future calls)
-k, --apiKey Required to be set either when called or stored for subsequent calls
-q, --query Search terms (use double quotes if query contains whitespace)
-z, --zip Zip code to search within (50 mile radius)
-l, --limit Number of results to return (up to 25, limited by WM API)
-s, --start Result to start at, for pagination
-d, --diff In store price difference threshold
(i.e. only show results with X percent lower price in store than online)
To store apiKey and optionally zip
~ wmp -r -k xyz123 -z 33803
If apiKey is stored and no other options supplied you can call with
~ wmp zip query
If apiKey and zip is stored and no other options supplied you can call with
~ wmp query

About

Check WalMart's local store prices

Resources

Stars

11 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages