Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brianjp93/lolapi
Riot / League of Legends api wrapper. Now includes TFT endpoints.
https://github.com/brianjp93/lolapi
league-of-legends leagueoflegends riot
Last synced: 6 days ago
JSON representation
Riot / League of Legends api wrapper. Now includes TFT endpoints.
- Host: GitHub
- URL: https://github.com/brianjp93/lolapi
- Owner: brianjp93
- Created: 2019-02-05T05:01:26.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-05T21:01:38.000Z (4 months ago)
- Last Synced: 2024-12-16T11:57:56.349Z (about 1 month ago)
- Topics: league-of-legends, leagueoflegends, riot
- Language: Python
- Homepage:
- Size: 40 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![Coverage Badge](./coverage.svg)
# 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
```bash
$ pip install lolwrapper
```# Usage
```python
>>> from lol.riot import Riot
>>>
>>> api = Riot('your-api-key')
```## Available Resources
```python
>>> 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
```python
>>> 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
```