nek-v/wargaming-api

Wargaming.net api oriented object.

1.4.3 2021-04-04 18:30 UTC

This package is auto-updated.

Last update: 2024-04-05 00:59:23 UTC


README

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

This package composer, allows to use more simply the wargaming API with a very simple and well documented object-oriented code for your IDE (integrated development environment).

  1. Get your application id here
  2. Initialise your application
Region code
Russia ru
Europe eu
Asia asia
North America na
  1. Make request
$WarGaming = new WargamingApi($application_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", $region = "eu");
  1. Search player
$WarGaming->searchPlayers($search = "volca", $options = [
    "limit"     => 10,
    "method"    => "startswith",
    "region"    => "eu"
]);
  1. Search player(s) by id
$WarGaming->infoPlayersById($players_id = ["500080014", "514444123", "514444121"], $options = [
    "region" => "eu"
]);
  1. Server info
$WarGaming->serverInfo($region = "eu");
  1. Search clans
$WarGaming->searchClans($search = "volca", $options = [
    "limit"         => 10,
    "pagination"    => "1",
    "region"        => "eu"
]);
  1. Search clans by id
$WarGaming->infoClansById($clans_id = ["500041879", "500034196"], $options = [
    "region" => "eu"
]);
  1. Search clans of player(s) id
$WarGaming->playerClans($players_id = ["500450795", "503197062", "500435236"]);