mtasuandi/tiket-php
Composer 安装命令:
composer require mtasuandi/tiket-php
包简介
Tiket.com PHP Wrapper
README 文档
README
Tiket.com PHP Library
Tiket.com PHP Library http://docs.tiket.com/.
Quickstart
Register for an API key for production here and for development here.
Installation
composer require mtasuandi/tiket-php dev-master
Environment
By default, the API will point to sandbox url. If you want to change to production, change Util/config.php.
From:
'settings' => [ 'version' => '1.0', /** * Determine application environment * Development: api-sandbox * Production: api */ 'api' => 'api-sandbox' ]
To:
'settings' => [ 'version' => '1.0', /** * Determine application environment * Development: api-sandbox * Production: api */ 'api' => 'api' ]
Usage Auth
<?php require_once __DIR__ . '/../vendor/autoload.php'; use Mtasuandi\Tiket\Auth\TiketAuth; use Mtasuandi\Tiket\Exceptions\AuthException; $auth = new TiketAuth( 'API_KEY' ); try { $access_token = $auth->getToken(); echo '<pre>'; print_r( $access_token ); echo '</pre>'; } catch (AuthException $e) { echo $e->getMessage(); }
License
The MIT License (MIT).
统计信息
- 总下载量: 72
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-10-06