Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
This is a node.js wrapper for the Domino's pizza APIs
npm install dominos
argument | type | default | required |
---|---|---|---|
address | full or partial address string | null | true |
callback | function to pass the api result to | null | true |
type | Delivery, Carryout, all | all | false |
this yields the least accurate information
dominos.store.find(
'20500',
function(storeData){
console.log(storeData);
}
);
this yields less accurate information but is better than just using the postal code
dominos.store.find(
'Beverly Hills 90210',
function(storeData){
console.log(storeData);
}
);
this yields the best information and sorts stores by actual distance
dominos.store.find(
'1600 Pennsylvania Ave NW, 20500',
function(storeData){
console.log(storeData);
}
);
argument | type | default | required |
---|---|---|---|
storeID | string or int | null | true |
callback | function to pass the api result to | null | true |
//Get Store Info for Store #4336
dominos.store.info(
4336,
function(storeData){
console.log(storeData);
}
);
argument | type | default | required |
---|---|---|---|
storeID | string or int | null | true |
callback | function to pass the api result to | null | true |
lang | language string | en | false |
//Get Menu for Store #4336
dominos.store.menu(
4336,
function(storeData){
console.log(storeData);
}
);
argument | type | default | required |
---|---|---|---|
phone | Phone number string or int | null | true |
callback | function to pass the api result to | null | true |
dominos.track.phone(
2024561111,
function(pizzaData){
console.log(pizzaData);
}
);
argument | type | default | required |
---|---|---|---|
orderKey | string or int | null | true |
storeID | sting or int | null | true |
callback | function to pass the api result to | null | true |
dominos.track.orderKey(
123456,
12345,
function(pizzaData){
console.log(pizzaData)
}
);
Three classes exist to get orders started,
Class | Description |
---|---|
dominos.class.Order | creates a basic order object |
dominos.class.Product | creates a basic product with a quantity of 1 |
dominos.class.Payment | creates a basic credit card payment object |
var order=new dominos.class.Order();
order.Order.Phone='2024561111';
order.Order.FirstName='Barack';
order.Order.LastName='Obama';
order.Order.Email='CommanderInChief@whitehouse.gov';
var product=new dominos.class.Product();
product.Code='14SCREEN' //14" Hand Tossed Cheese Pizza
order.Order.Products.push(product);
This step is *Strongly recommended
dominos.order.validate(
order,
function(data){
console.log(data);
}
);
This step is *Strongly recommended
dominos.order.validate(
order,
function(data){
console.log(data);
}
);
dominos.order.price(
order,
function(data){
console.log(data);
}
);
Before you can place an order you must create a payment method and add it to the order :
paramater | type | required | default |
---|---|---|---|
Amount | Float | true | 0 |
Number | Credit Card Number Int/String | true | |
CardType | String | true | |
Expiration | Digits only Int/String | true | |
SecurityCode | Int/String | true |
var cardInfo=new dominos.class.Payment();
cardInfo.Amount=42.50;
//get amount from dominos.order.price request
//data.result.Order.Amounts.Customer
cardInfo.Number='4444888888888888';
cardInfo.CardType='VISA';
cardInfo.Expiration='1017';
cardInfo.SecurityCode='189';
cardInfo.PostalCode='20500';
order.Order.Payments.push(cardInfo);
Then you can place the order and catch placement failures :
dominos.order.place(
order,
function(data){
console.log(data);
if(data.result.Order.Status==-1){
console.log(
'\n###### NO PIZZA FOR YOU! ######\n',
orderData.result.Order.StatusItems,
'\n#########################\n\n'
);
return;
}
}
);
FAQs
node js API for Domino's pizza
The npm package dominos receives a total of 66 weekly downloads. As such, dominos popularity was classified as not popular.
We found that dominos demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.