yhdjy025 / weimob-php-sdk
此包最新版本(v1.1.1)没有提供许可证信息。
weimob api sdk for php
v1.1.1
2018-06-21 11:30 UTC
Requires
- php: >=5.6
- league/oauth2-client: 2.3.0
- rmccue/requests: v1.7.0
This package is not auto-updated.
Last update: 2024-09-29 05:42:02 UTC
README
此包为weimob云API设计,您可以使用Oauth类获取访问令牌,并通过Api类调用API。
示例
//require class use Weimob\Oauth\Oauth; use Weimob\Api\Api; //a simple example $oauth = new Oauth([ 'clientId' => 'demoapp', // The client ID assigned to you by the provider 'clientSecret' => 'demopass', // The client password assigned to you by the provider 'redirectUri' => 'http://example.com/your-redirect-url/', 'urlAuthorize' => 'http://brentertainment.com/oauth2/lockdin/authorize', 'urlAccessToken' => 'http://brentertainment.com/oauth2/lockdin/token', 'urlResourceOwnerDetails' => 'http://brentertainment.com/oauth2/lockdin/resource' ]); $token = $oauth->auth(); $api = new Api($token['accessToken']); try { $result = $api->send('wangpu/Order/FullInfoGetHighly', [ 'order_no' => '201806211425', 'shop_id' => '123456' ]); var_dump($result); } catch (\Exception $e) { echo $e->getMessage(); }