Skip to content

Riot / League of Legends api wrapper. Now includes TFT endpoints.

Notifications You must be signed in to change notification settings

brianjp93/lolapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Riot / League of Legends api wrapper. Now includes TFT endpoints.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages