Skip to content

Instantly share code, notes, and snippets.

View tdieterich-bb's full-sized avatar

Thom Dieterich tdieterich-bb

  • Best Buy
  • Minneapolis
View GitHub Profile
@tdieterich-bb
tdieterich-bb / getProductAvailability
Last active August 29, 2015 14:09
NodeJS compatible example that allows a search for a product by keyword, and provide product availability in stores near the zip code and radius.
/*jslint node:true*/
'use strict';
var _ = require('lodash'),
bluebird = require('bluebird'),
request = bluebird.promisifyAll(require('request')),
baseUrl = 'http://api.remix.bestbuy.com',
compiled = _.template('(search=${searchTerm})+stores(area(${zipCode},${radius}))'),
defaults = {
searchTerm: 'ipad',