socialconnect/common
最新稳定版本:3.1.7
Composer 安装命令:
composer require socialconnect/common
包简介
Common library
README 文档
README
Build Client for your REST application
use SocialConnect\Common\ClientAbstract; class MySocialNetworkClient extends ClientAbstract { public function requestMethod($method, $parameters) { //... } public function getUser($id) { $result = $this->requestMethod('/user/get/', $id); if ($result) { $user = new User(); $user->id = $result->id; //... return $user; } return false; } }
Next you can use it
$client = new MySocialNetworkClient($appId, $appSecret); // You can use any client that implements Psr\Http\Client\ClientInterface $client->setHttpClient(new \SocialConnect\HttpClient\Curl()); $user = $client->getUser(1); //Custom rest methods $client->requestMethod('myTestMethod', []); $client->requestMethod('myTest', []);
统计信息
- 总下载量: 238.74k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 1
- 依赖项目数: 6
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-08-11