Package | papajohns |
Description | Unofficial API client |
Node Version | >= 0.10 |
var papajohns = require('papajohns');
// also supports apt, floor, and suite
var customer = papajohns.customer({
type: "home", // home or business
address: "2939 W Durango Street",
city: "Phoenix",
state: "AZ"
});
// Find the nearest delivery store
customer.stores(function(err, stores){
if (!stores.Delivery) throw "No delivery available";
console.log(stores.Delivery[0]);
});