titravel/api-sdk-php
Composer 安装命令:
composer require titravel/api-sdk-php
包简介
To Island Travel's PHP SDK for API
README 文档
README
This repository contains To Islands Travel's PHP SDK and samples for our API
Prerequisites
- PHP 5.3 or above
- curl extension must be enabled
- json extension must be enabled
- composer for fetching dependencies (See http://getcomposer.org)
Samples
Usage
To write an app that uses the SDK
- add
titravel/api-sdk-phpto yourcomposer.jsonrequire list or copy the sample/composer.json to your project's root - run
composer update --no-devto fetch dependencies - obtain API credentials from To Islands Travel
- now you are all set to make your first API call
$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());
统计信息
- 总下载量: 1.28k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2013-12-30