caikeal / coding-open-api
Coding Open Api SDK
v1.0.4
2019-09-11 17:21 UTC
Requires
- php: >=7.0
- ext-fileinfo: *
- ext-openssl: *
- ext-simplexml: *
- guzzlehttp/guzzle: ^6.2
- illuminate/cache: ^5.6
- illuminate/container: ^5.6
- illuminate/events: ^5.6
- illuminate/queue: ^5.6
- monolog/monolog: ^1.22
- pimple/pimple: ^3.0
- symfony/cache: ^3.3|^4.0
- symfony/http-foundation: ^2.7|^3.0|^4.0
- symfony/psr-http-message-bridge: ^0.3|^1.0
Requires (Dev)
- mikey179/vfsstream: ^1.6
- mockery/mockery: ^1.0
- overtrue/phplint: dev-master
- phpunit/phpunit: ~6.0
README
composer install caikeal/coding-open-api
Settings
获取配置项:
php artisan vendor:publish --provider="CodingOpenApi\LaravelCoding\ServiceProvider"
Usage
... use CodingOpenApi\LaravelCoding\Facade; ... public function test () { return Facade::enterprise('ksbaozi')->access_token->getToken(); }
当用 refresh_token
刷新 access_token
时, 会同时更新原来的 refresh_token
, 并会发出事件CodingOpenApi\Enterprise\Events\RefreshTokenChanged
。
注意:首次生成 refresh_token
是不会触发该事件的