Skip to main content

Riot API Wrapper

Project description

Coverage Badge

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for lolwrapper, version 1.4
Filename, size File type Python version Upload date Hashes
Filename, size lolwrapper-1.4-py3-none-any.whl (16.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size lolwrapper-1.4.tar.gz (8.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page