loudclear/boxsuite-api 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

loudclear/boxsuite-api

最新稳定版本:0.2

Composer 安装命令:

composer require loudclear/boxsuite-api

包简介

BoxSuite API

README 文档

README

  1. Installation
  2. 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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-21