Code Monkey home page Code Monkey logo

api-php's Introduction

Ordr.in PHP API

A PHP wrapper for the Restaurant, User, and Order APIs provided by Ordr.in.

Usage

require_once('Ordrin.php');

$dt = new dT();
$dt->asap();

$api = new Ordrin('sLclVFC54BGXcjGku8bTaA', 'https://r-test.ordr.in');

$m = new Money(100.23);
$a = new Address('123 main st','cedar rapids','52404','Suite 200', 'ia','1234567890','test');

$subT = new Money(100);
$tip = new Money(15);

$r = new Restaurant();
$r->deliveryList($dt, $a);
$r->deliveryCheck("142", $dt, $a);

$r->deliveryFee("142", $subT, $tip, $dt, $a);
$r->details("142");

$api->_url = 'http://localhost'; // Test User API
$u = new User();
$u->makeAcct('[email protected]', 'pass', 'John','Doe');
$api->setCurrAcct('[email protected]', 'pass');

$u->updateAddress($a);
$u->getAddress('home');
$u->deleteAddress('home');

$u->updateCard('personal', 'John Doe', '4111111111111111','444','02','12',$a);

$u->getCard('personal');
$u->deleteCard('personal');

$u->orderHistory('12');

$u->updatePassword('newPassword');

$api->_url = 'http://localhost'; // Test Order API

$o = new Order();
$tray = '';
$o->submit('142', $tray, $tip, $dt, '[email protected]', 'John','Doe',$a, 'John Doe', '4111111111111111', '444', '0212', $a);

Notes

API docs available at http://www.ordr.in/developers/api.

api-php's People

Contributors

dabates avatar zainalam avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.