Skip to content

Commit 2062d0c

Browse files
committed
Documentation in readme file.
1 parent 90894f9 commit 2062d0c

File tree

2 files changed

+42
-8
lines changed

2 files changed

+42
-8
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
cloc.txt
2+
13
.idea/
24

35
composer.phar

README.md

+40-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
23
# Wargaming Api
34

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

89
## Documentation
910

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

14-
//Search players
15-
$WargamingApi->searchPlayers("volca780", [
16-
"method" => "exact"
17-
]);
18-
```
14+
| Region | code |
15+
| ------------- | ---- |
16+
| Russia | ru |
17+
| Europe | eu |
18+
| Asia | asia |
19+
| North America | na |
20+
```php
21+
$WarGaming = new WargamingApi($application_id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", $region = "eu");
22+
```
23+
3) Make request
24+
25+
1) Search player
26+
```php
27+
$WarGaming->searchPlayers($search = "volca", $options = [
28+
"limit" => 10,
29+
"method" => "startswith",
30+
"region" => "eu"
31+
]);
32+
```
33+
2) Player(s) info
34+
```php
35+
$WarGaming->searchPlayer($players_id = ["500080014", "514444123", "514444121"], $options = [
36+
"region" => "eu"
37+
]);
38+
```
39+
3) Server info
40+
```php
41+
$WarGaming->serverInfo($region = "eu");
42+
```
43+
4) Search clans
44+
```php
45+
$WarGaming->searchClans($search = "volca", $options = [
46+
"limit" => 10,
47+
"pagination" => "1",
48+
"region" => "eu"
49+
]);
50+
```
1951

2052
## License
2153

0 commit comments

Comments
 (0)