PHP code example of titravel / api-sdk-php
1. Go to this page and download the library: Download titravel/api-sdk-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
titravel / api-sdk-php example snippets
$apiCredentials = new \TiTravel\Auth\Credentials($config['b2b'], $config['code']);
try {
$params = array(
'city_id' => null,
'category_id' => null,
);
$properties = PropertiesInfo::all($params, $apiCredentials);
} catch (Exception $ex) {
echo 'Exception:', $ex->getMessage(), PHP_EOL;
exit(1);
}
print_r($properties->toArray());