Skip to content

f3ath/simpleuber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simpe UBER

Total Downloads Latest Stable Version Travis Build SensioLabsInsight

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());
}