承接 cobiyu/hiworks-oauth-sdk 相关项目开发

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

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

cobiyu/hiworks-oauth-sdk

最新稳定版本:0.3.0

Composer 安装命令:

composer require cobiyu/hiworks-oauth-sdk

包简介

Hiworks Oauth SDK for PHP

关键字:

README 文档

README

Build Status Latest Stable Version License

Hiworks Oauth v2 PHP 연동 모듈

Install

composer require cobiyu/hiworks-oauth-sdk

Usage

Note: Note: This version of this SDK for PHP requires PHP 5.6 or greater.

Doc Link: https://documenter.getpostman.com/view/6863253/S1TVWcri?version=latest#intro

Generate Hiworks SDK instance

$client = new \Hiworks\Hiworks($app_client_id,$app_password);

Get Access Token using Authorization Code

$client = new \Hiworks\Hiworks($app_client_id,$app_password);

// getAccessToken return Hiworks\Auth\AccessToken instance.
// $auth_code is received parameter(name:auth_code) in your app's callback.
$access_token = $client->getAccessToken->getAccessToken($auth_code);

echo $access_token->getAccessToken();   // print access_toekn (example. fh283nfdsialvcxzvclxzvcxz)

Get Hiworks API response using access token

// $path and $access token must be string.
// api result is object.
$get_response = $client->get($path, $access_token)
$post_response = $client->post($path, $access_token)
$put_response = $client->put($path, $access_token)
$delete_response = $client->delete($path, $access_token)

Exception

Hiworks\Exceptions\HiworksSDKException : package의 최상위 Exception

자세한 exception 내용이 필요하다면 , Hiworks\Exceptions 참조

catch(HiworksSDKException $e)
{
    /// some logic
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-05-30