f3ath / simpleuber
Simple UBER API client
1.0.0
2016-02-04 06:54 UTC
Requires
- php: >=5.4
- phpcurl/curlhttp: ^1.0
Requires (Dev)
- phpunit/phpunit: ^4.8 || ^5.0
This package is auto-updated.
Last update: 2024-11-05 05:59:52 UTC
README
Simple UBER API client for PHP
This implementation is for Products, Price Estimates, and Time Estimates API endpoints. It only requires the server_token, no OAth involved.
##Install Via composer:
$ composer require "f3ath/simpleuber"
##Usage
<?php require_once 'vendor/autoload.php'; $uber = new \F3\SimpleUber\Uber('your server token'); try{ var_dump($uber->getProducts(37.773972, -122.431297)); var_dump($uber->getPriceEstimates(37.773972, -122.431297, 37.333333, -121.9)); var_dump($uber->getTimeEstimates(37.773972, -122.431297)); } catch (\F3\SimpleUber\ApiException $e) { var_dump($e->getErrorMessage()); var_dump($e->getErrorCode()); }