Riot API Wrapper
Project description
League of Legends API Wrapper
lolwrapper is a Python wrapper for the Riot League of Legends API endpoints. lolwrapper works with Python >= 3.6
Installation
$ pip install lolwrapper
Usage
>>> from lol.riot import Riot
>>>
>>> api = Riot('your-api-key')
Available Resources
>>> api.champion
>>> api.championmastery
>>> api.league
>>> api.lolstaticdata
>>> api.lolstatus
>>> api.masteries
>>> api.match
>>> api.spectator
>>> api.summoner
>>> api.thirdpartycode
>>> api.tftleague
>>> api.tftmatch
>>> api.tftsummoner
Get a summoner
- Get by name, encrypted account ID, encrypted summoner ID, or encrypted PUUID
>>> r = api.summoner.get(name='tenmo player', region='na')
>>> r = api.summoner.get(encrypted_account_id='account-id', region='na')
>>> r = api.summoner.get(encrypted_summoner_id='summoner-id', region='na')
>>> r = api.summoner.get(encrypted_puuid='puuid', region='na')
>>> r.json()
Testing
Testing requires pytest-cov
, pytest
, and coverage
Tests can be run using just pytest
>>> pytest
Or with coverage
>>> pytest --cov=lol ./
Add coverage badge with
>>> coverage-badge
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lolwrapper-1.4.1.tar.gz
(9.3 kB
view hashes)
Built Distribution
lolwrapper-1.4.1-py3-none-any.whl
(17.0 kB
view hashes)
Close
Hashes for lolwrapper-1.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a577d1dc8ca4efc6d1e57b7becef4c62a10c70b70bb946fd4f8628e68d54cb84 |
|
MD5 | 0737955ae356249236af2060e64937ae |
|
BLAKE2b-256 | 7f6c83ecb141cf3efdcbd63d27bfeefb511f728b7c17399b5b54b4692af19f4b |