Comparing version 2.0.1 to 2.1.0
{ | ||
"name": "dominos", | ||
"payment=disallowed-name": "pizzapi", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "node js API for Domino's pizza", | ||
@@ -6,0 +6,0 @@ "main": "dominos-pizza-api.js", |
@@ -71,2 +71,25 @@ Domino's PizzAPI | ||
For Canada | ||
==== | ||
Set the urls.json file to be: | ||
``` | ||
{ | ||
"referer":"https://order.dominos.ca/en/pages/order/", | ||
"sourceUri":"order.dominos.ca", | ||
"store": { | ||
"find": "https://order.dominos.ca/power/store-locator?s=${line1}&c=${line2}&type=${type}", | ||
"info": "https://order.dominos.ca/power/store/${storeID}/profile", | ||
"menu": "https://order.dominos.ca/power/store/${storeID}/menu?lang=${lang}&structured=true" | ||
}, | ||
"order": { | ||
"validate": "https://order.dominos.ca/power/validate-order", | ||
"price": "https://order.dominos.ca/power/price-order", | ||
"place": "https://order.dominos.ca/power/place-order" | ||
}, | ||
"track": "https://trkweb.dominos.ca/orderstorage/GetTrackerData?" | ||
} | ||
``` | ||
Finding Stores | ||
@@ -73,0 +96,0 @@ ==== |
@@ -96,3 +96,3 @@ 'use strict'; | ||
this.PostalCode=Number(splitAddress[splitAddress.length-1]) | ||
this.PostalCode= splitAddress[splitAddress.length-1] | ||
@@ -99,0 +99,0 @@ //need better intellegence for auto determining address parts |
var http = require('request'); | ||
var urls = require('./urls.json') | ||
@@ -10,3 +11,3 @@ module.exports.post = function(url, req, callback) { | ||
headers: { | ||
Referer:'https://order.dominos.com/en/pages/order/', | ||
Referer: urls.referer, | ||
'Content-Type': 'application/json' | ||
@@ -53,3 +54,3 @@ }, | ||
headers: { | ||
'Referer': 'https://order.dominos.com/en/pages/order/' | ||
'Referer': urls.referer | ||
} | ||
@@ -56,0 +57,0 @@ }; |
@@ -30,3 +30,3 @@ 'use strict'; | ||
this.ServiceMethod = parameters.deliveryMethod || 'Delivery'; | ||
this.SourceOrganizationURI = 'order.dominos.com'; | ||
this.SourceOrganizationURI = urls.sourceUri; | ||
this.StoreID = parameters.storeID||''; | ||
@@ -33,0 +33,0 @@ this.Tags = {}; |
{ | ||
"referer":"https://order.dominos.com/en/pages/order/", | ||
"sourceUri":"order.dominos.com", | ||
"store": { | ||
@@ -3,0 +5,0 @@ "find": "https://order.dominos.com/power/store-locator?s=${line1}&c=${line2}&type=${type}", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
391326
10024
559