loudclear/boxsuite-api
最新稳定版本:0.2
Composer 安装命令:
composer require loudclear/boxsuite-api
包简介
BoxSuite API
README 文档
README
- Installation
- API 2.1 Authenticate 2.2 Make Api Request
Installation
To install using Composer, add this dependency to your project's composer.json:
{
"require": {
"loudclear/boxsuite-api": "~0.1"
}
}
Then install via:
composer install
To use the bindings use Composer's autoload:
require_once('vendor/autoload.php');
API
Please see full documentation at http://docs.mobile7.apiary.io/
Auth
Almost all API requests should be completed after authentication. Please see example here
$boxsuite = Boxsuite\Boxsuite::instance();
// Get list of existing accounts. account_id will be used for auth/login request
$accounts = $boxsuite->request('GET', 'auth/list_accounts', ['term' => 'alpha']);
// Authenticate
$session = $boxsuite->auth([
'username' => 'alpha1admin',
'password' => '1',
'account_id' => 36,
'remember' => 1
]);
$boxsuite->setSession($session);
// Check is user logged in
$is_logged_in = $boxsuite->isLoggedIn();
Request
Please see examples of API requests
$manager_dasboard = $boxsuite->request('GET', 'manager/dashboard');
// Request with params
$sites = $boxsuite->request('GET', 'manager/get_sites', [
'user_id' => $user_id
]);
Support
If you have any question or need help integrating with us just let us know at info@getboxsuite.com
License
MIT License. Copyright 2015 Get BoxSuite Pty Ltd. https://getboxsuite.com
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-09-21