Skip to content

Commit

Permalink
Documentation in readme file.
Browse files Browse the repository at this point in the history
  • Loading branch information
hichxm committed Feb 19, 2018
1 parent 90894f9 commit 2062d0c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
cloc.txt

.idea/

composer.phar
Expand Down
48 changes: 40 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@


# Wargaming Api

This package composer, allows to use more simply the
Expand All @@ -7,15 +8,46 @@ object-oriented code for your IDE (*integrated development environment*).

## Documentation

```php
//Init Wargaming.net api key and region
$WargamingApi = new WargamingApi("YOUR API KEY", "REGION");
1) Get your application id [here](https://developers.wargaming.net/applications/)
2) Initialise your application

//Search players
$WargamingApi->searchPlayers("volca780", [
"method" => "exact"
]);
```
| Region | code |
| ------------- | ---- |
| Russia | ru |
| Europe | eu |
| Asia | asia |
| North America | na |
```php
$WarGaming = new WargamingApi($application_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", $region = "eu");
```
3) Make request

1) Search player
```php
$WarGaming->searchPlayers($search = "volca", $options = [
"limit" => 10,
"method" => "startswith",
"region" => "eu"
]);
```
2) Player(s) info
```php
$WarGaming->searchPlayer($players_id = ["500080014", "514444123", "514444121"], $options = [
"region" => "eu"
]);
```
3) Server info
```php
$WarGaming->serverInfo($region = "eu");
```
4) Search clans
```php
$WarGaming->searchClans($search = "volca", $options = [
"limit" => 10,
"pagination" => "1",
"region" => "eu"
]);
```

## License

Expand Down

0 comments on commit 2062d0c

Please sign in to comment.