hichxm/wargaming-api

面向对象的Wargaming.net API。

v1.3.1 2018-02-21 23:28 UTC

This package is auto-updated.

Last update: 2024-09-07 01:48:22 UTC


README

GitHub tag GitHub license PHP from Packagist GitHub issues

本包的composer,允许您以非常简单且文档良好的面向对象代码,更简单地使用Wargaming API,适用于您的IDE(集成开发环境)。

文档。 完整文档在此

  1. 在此获取您的应用ID

  2. 初始化您的应用

    $WarGaming = new WargamingApi($application_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", $region = "eu");
  3. 发起请求

    1. 搜索玩家
      $WarGaming->searchPlayers($search = "volca", $options = [
      	"limit" => 10,
      	"method" => "startswith",
      	"region" => "eu"
      ]);
    2. 通过ID搜索玩家
      $WarGaming->infoPlayersById($players_id = ["500080014", "514444123", "514444121"], $options = [
      	"region" => "eu"
      ]);
    3. 服务器信息
      $WarGaming->serverInfo($region = "eu");
    4. 搜索公会
      $WarGaming->searchClans($search = "volca", $options = [
      	"limit" => 10,
      	"pagination" => "1",
      	"region" => "eu"
      ]);
    5. 通过ID搜索公会
      $WarGaming->infoClansById($clans_id = ["500041879", "500034196"], $options = [
      	"region" => "eu"
      ]);
    6. 搜索玩家ID的公会
      $WarGaming->playerClans($players_id = ["500450795", "503197062", "500435236"]);

许可证

The MIT License (MIT)

Copyright (c) 2018 

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.