nek-v/wargaming-api

面向Wargaming.net API的对象。

1.4.3 2021-04-04 18:30 UTC

This package is auto-updated.

Last update: 2024-09-05 01:59:44 UTC


README

Build Status Coverage GitHub tag GitHub license PHP from Packagist GitHub issues

此包composer允许您以非常简单和文档齐全的对象化代码在IDE(集成开发环境)中使用Wargaming API。

  1. 在这里获取您的应用程序ID(此处)
  2. 初始化您的应用程序
  1. 发起请求
$WarGaming = new WargamingApi($application_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", $region = "eu");
  1. 搜索玩家
$WarGaming->searchPlayers($search = "volca", $options = [
    "limit"     => 10,
    "method"    => "startswith",
    "region"    => "eu"
]);
  1. 按ID搜索玩家
$WarGaming->infoPlayersById($players_id = ["500080014", "514444123", "514444121"], $options = [
    "region" => "eu"
]);
  1. 服务器信息
$WarGaming->serverInfo($region = "eu");
  1. 搜索公会
$WarGaming->searchClans($search = "volca", $options = [
    "limit"         => 10,
    "pagination"    => "1",
    "region"        => "eu"
]);
  1. 按ID搜索公会
$WarGaming->infoClansById($clans_id = ["500041879", "500034196"], $options = [
    "region" => "eu"
]);
  1. 搜索玩家ID的公会
$WarGaming->playerClans($players_id = ["500450795", "503197062", "500435236"]);