adamdburton / destiny-2-api-client
Destiny 2 的 PHP API 客户端
Requires
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- guzzlehttp/guzzle: ~6.0
- phpunit/phpunit: ^6.2
This package is not auto-updated.
Last update: 2024-09-29 23:34:10 UTC
README
API 文档
端点文档可在 https://bungie-net.github.io/multi/ 查看
用法
您需要从 https://www.bungie.net/en/Application 获取 API 密钥,并且一些端点需要访问令牌(通过 Bungie oAuth 登录获取 - 查看 https://lowlidev.com.au/destiny/authentication-2 以获取认证流程示例)
$api = new \AdamDBurton\Destiny2ApiClient\Api('{api-key}');
模块
应用
实现 - https://github.com/adamdburton/destiny-2-api-client/blob/master/src/Api/Module/App.php 通过 - $api->app()
访问
Destiny2
实现 - https://github.com/adamdburton/destiny-2-api-client/blob/master/src/Api/Module/Destiny2.php 通过 - $api->destiny2()
访问
用户
实现 - https://github.com/adamdburton/destiny-2-api-client/blob/master/src/Api/Module/User.php 通过 - $api->user()
访问
论坛
尚未实现
GroupV2
尚未实现
社区内容
尚未实现
趋势
尚未实现
oAuth
某些端点需要带有适用作用域权限的 oAuth 令牌。
$api->user()->withAccessToken('{oauth-token}')->getMembershipDataForCurrentUser();