raidkeeper / battlenet-api
Raidkeeper Battlenet API 接口
v0.0.3
2022-11-28 21:38 UTC
Requires
- php: ^8.0
- laravel/framework: ^8.0
Requires (Dev)
README
这是一个暴雪《魔兽世界》游戏的API客户端,主要用于Raidkeeper,但也可用于任何应用程序。
安装
您应该使用composer来安装此程序
composer require raidkeeper/battlenet-api
用法
// You will need a Battlnet ClientID and ClientSecret from https://api.battlenet.com $clientId = 'foobar'; $clientSecret = 'fizzbuzz'; $region = 'us'; // The Battlenet client grants access to the API $client = new Raidkeeper\Api\Battlenet\Client($region, $clientId, $clientSecret); // Create a new Character object to interact with the $character = $client->loadCharacter('charname', 'sargeras'); // Once you have the Character object, you can start reaching out to API endpoints $data = $character->getProfile(); $data2 = $character->getEquipment();
许可证
此库在MIT许可证下发布