nek-v / wargaming-api
面向Wargaming.net API的对象。
1.4.3
2021-04-04 18:30 UTC
Requires
- php: >=7.4
- guzzlehttp/guzzle: ^7.3
Requires (Dev)
- phpunit/phpunit: ^7.0
README
此包composer允许您以非常简单和文档齐全的对象化代码在IDE(集成开发环境)中使用Wargaming API。
- 在这里获取您的应用程序ID(此处)
- 初始化您的应用程序
- 发起请求
$WarGaming = new WargamingApi($application_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", $region = "eu");
- 搜索玩家
$WarGaming->searchPlayers($search = "volca", $options = [ "limit" => 10, "method" => "startswith", "region" => "eu" ]);
- 按ID搜索玩家
$WarGaming->infoPlayersById($players_id = ["500080014", "514444123", "514444121"], $options = [ "region" => "eu" ]);
- 服务器信息
$WarGaming->serverInfo($region = "eu");
- 搜索公会
$WarGaming->searchClans($search = "volca", $options = [ "limit" => 10, "pagination" => "1", "region" => "eu" ]);
- 按ID搜索公会
$WarGaming->infoClansById($clans_id = ["500041879", "500034196"], $options = [ "region" => "eu" ]);
- 搜索玩家ID的公会
$WarGaming->playerClans($players_id = ["500450795", "503197062", "500435236"]);