Skip to content

Hugo-CASTELL/riot_api_manipulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

riot_api_manipulation : access games' data with ease

Logo Python Version 0.0.8

riot_api_manipulation is a python library designed to manipulate Riot APIs with ease. Its key benefits include three fundamentals : simple usage, technical abstraction and reliability.

📦 Setup

Installation
pip install --index-url https://test.pypi.org/simple/ riot-api-manipulation 
Upgrade
pip install --upgrade --index-url https://test.pypi.org/simple/ --no-deps riot-api-manipulation 

💯 Covering

League of Legends
Valorant
Teamfight Tactics
League of Runeterra

All routes listed here : click me to discover what is implemented !

💻 Getting started

1. Important point : closing

riot_api_manipulation uses parallel threads to track left requests and the function API.close() terminates these threads. Make sure to add it at the end of your script or at the closing of your application.

api_lol = API_LOL("YOUR_API_KEY", Region.EUROPE, Server.EU_WEST)
# Exploiting api [...]
api_lol.close()

2. Usage examples

To see more usage examples with expected outputs, take a look here.

Get summoner's last game infos
# Opening the api manager with a key, a region and a server
api_lol = API_LOL("YOUR_API_KEY", Region.EUROPE, Server.EU_WEST)

# Getting summoner's details
summoner = api_lol.get_summoner_by_name("SUMMONER_NAME")

# Recovering his last game and searching his infos in it
last_match_infos = (summoner.get_last_game()
                    .get_infos_of_summoner())

# Closing the api manager (for threads, as said earlier !)
api_lol.close()

# Enjoy results
print(summoner)
print(last_match_infos)
Get summoner's last ranked games with infos and timeline
# Opening the api manager with a key, a region and a server
api_lol = API_LOL("YOUR_API_KEY", Region.EUROPE, Server.EU_NORTH)

# Getting summoner's details
summoner = api_lol.get_summoner_by_name("SUMMONER_NAME")

# Recovering his 10 last ranked games infos and timelines
last_games_full = summoner.get_match_history(nb_matches=10, queue=QueueType.RANKED, load_infos=True, load_timelines=True)

# Closing the api manager (for threads, as said earlier !)
api_lol.close()

# Enjoy results
for game in last_games_full:
    print(game.json)
    print(game.json_timeline)

🔭 How to contribute

Do you have a suggestion or a new feature in mind ?
Take a look to the issue tracker !

Maybe do you want to contribute, solve an issue or develop new enhancements ?
Read the contributing guidelines, create a new branch and let's start !

📚 Documentation

Usage examples
Riot api routes covering
Contributing guidelines

About

Python library to ease the manipulation of Riot Games' apis

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages