blob: be279c23f7085018b41931a04aa358640cf84fa1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
python-gamelocker
===
[Private mirror](https://git.schneefux.xyz/schneefux/python-gamelocker) [GitHub mirror](https://github.com/schneefux/python-gamelocker)
Python 3 wrapper for the Gamelocker API. Currently supports [Vainglory](https://developers.vainglorygame.com). Install with PyPi: `pip install python-gamelocker`.
[Private docs mirror](https://docs.schneefux.xyz/python-gamelocker/gamelocker.html#module-gamelocker.api)
Example usage:
```python
>>> import gamelocker
>>> APIKEY = "aaa.bbb.ccc"
>>> api = gamelocker.Gamelocker(APIKEY).Vainglory()
>>> m = api.matches({"page[limit]": 2, "filter[playerNames]": "TheLegend27"})
>>> m
[<gamelocker.datatypes.Match object at 0x7f2682314ac8>, <gamelocker.datatypes.Match object at 0x7f26823d3c50>]
>>> m.rosters[0].participants[0].player.name
"iiDruid"
>>> m.rosters[0].participants[0].stats["kills"]
10
>>> m.rosters[0].stats["acesEarned"]
2
```
[More examples](/examples)
Running the tests:
```bash
GAMELOCKER_APIKEY=your.api.key PYTHONPATH=. python -m pytest tests
```
|