A simple client that allows to work with RESTful API of U-On Travel company.
composer require drteam/uon
This library is ready for production usage, all source codes provided "as is".
<?php
require_once __DIR__ . "/../vendor/autoload.php";
// Class with configuration options
$config = new \UON\Config();
$config
->set('token', 'some_token')
->set('timeout', 10);
// Main object for work with API
$uon = new \UON\API($config);
// Some examples
$users = $uon->users->all(); // Get a list of all users
$user = $uon->users->get(1); // Get user by unique id
$request = $uon->requests->get(1); // Get request by unique ID
$managers = $uon->misc->getManagers(); // Get list of managers
See other examples of usage here separated by class names.
All available methods of all classes with descriptions you can find here.
You need login into your account, then go to the Settings > API and WebHooks page and copy token code from API block.
If you have a desire, you can help with testing and bugs hunting or make some donation.
- U-On Travel - Official website
- U-On Travel API - API documentation
- Basic examples by U-On team of usage written on PHP-Curl library