承接 kobas/api-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

kobas/api-client

最新稳定版本:2.4

Composer 安装命令:

composer require kobas/api-client

包简介

README 文档

README

Latest Version Software License Build Status Documentation Coverage Status Quality Score Total Downloads

Signs API requests and allows interaction via cURL methods.

Example

/**
 * Setup
 */
$companyId = 0000;// company id provided by Kobas
$clientId = '';// client id provided by Kobas
$clientSecret = '';// client secret provided by Kobas
$clientScope = ''; // client scope provided by Kobas

$provider = new \Kobas\APIClient\Auth\Provider($companyId, $clientId, $clientSecret, $clientScope);
$client = new \Kobas\APIClient\Client($provider);

/**
 * Usage
 */
$response = $client->get('customer/search', ['email' => 'example@example.com']);
echo json_encode($response, JSON_PRETTY_PRINT);

Client Functions

get($route, $params = array(), $headers = array())

Sends a HTTP GET Request to the route provided.

post($route, $params = array(), $headers = array())

Sends a HTTP POST Request to the route provided.

put($route, $params = array(), $headers = array())

Sends a HTTP PUT Request to the route provided.

delete($route, $params = array(), $headers = array())

Sends a HTTP DELETE Request to the route provided.

getRequestInfo()

Returns the result of curl_getinfo()on the last request made as an array.

setAPIBaseURL($url)

Allows over-riding the base URL (only really needed for development)

setAPIVersion($version)

Allows over-riding of the API version. Might be useful in future?

统计信息

  • 总下载量: 1.23k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-10-09