loudclear / boxsuite-api
This package is abandoned and no longer maintained.
No replacement package was suggested.
BoxSuite API
0.2
2015-09-25 16:52 UTC
Requires
- php: >=5.4.0
- ext-curl: *
Requires (Dev)
- phpunit/phpunit: ~4.8
This package is auto-updated.
Last update: 2017-04-17 13:10:23 UTC
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