wndrfl / pizzaboy
There is no license information available for the latest version (v1.0.0) of this package.
An unofficial PHP wrapper for the Pizzaboy API
v1.0.0
2016-08-06 04:47 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-11-18 13:58:10 UTC
README
1. Authenticate a user with their Dominos account credentials
$user = $pizzaboy->login(<email>,<password>);
2. Create a new order
$order = $user->newOrder();
3. Add a pizza to this order
$order ->newPizza('medium','hand-tossed') ->setCheese('whole','normal') ->setSauce('tomato','normal') ->addPepperoni() ->addPineapple() ->save();
4. Set a delivery address for this order
$order ->address() ->setStreet($_POST['street']) ->setCity($_POST['city']) ->setRegion($_POST['state']) ->setPostalCode($_POST['postal_code']) ->save();
5. Place the order!
if($order->place()) { echo "Order placed!"; }else{ echo "Order was not placed."; }