websupport/api_php
最新稳定版本:v1.0.0
Composer 安装命令:
composer require websupport/api_php
包简介
Wrapper around cURL for simpler REST API communication
README 文档
README
Instalation using composer
Require composer package using terminal:
composer require websupport/api_php
Or add following to composer.json file in your project:
{
"require" : {
"websupport/api_php" : "~1.0"
}
}
And then run:
composer update
Note: Requires PHP version 5.3 or higher and the PHP cURL extension
Quick Start Example
$api = new \websupport\RestConnection('https://rest.websupport.sk/v1/', 'login', 'pass'); // load user info try { $userInfo = $api->get('user/self'); var_dump($userInfo); } catch (\websupport\RestException $e) { var_dump($e); // error via exception } // ordering domain try { $orderInfo = $api->post('user/self/order', array( "services"=>array( array('type'=>'domain', 'domain'=>'newdomain.com') ) )); var_dump($orderInfo); } catch (\websupport\RestException $e) { var_dump($e); // error via exception }
API Docs
More detailed documentation of all api methods can be found at our docs page.
统计信息
- 总下载量: 4.94k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2015-02-28