Skip to content

sandbox-pokhara/league-connection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

league-connection

league-connection is a python package to communicate to riot client and league client.

Installation

pip install league-connection

Examples

Logging in (Riot Client)

>>> import os
>>> from league_connection import LeagueConnection
>>> lockfile = os.path.expanduser('~\\AppData\\Local\\Riot Games\\Riot Client\\Config\\lockfile')
>>> connection = LeagueConnection(lockfile, timeout=10)
>>> data = {'username': 'yourusername', 'password': 'yourpassword', 'persistLogin': False}
>>> res = connection.put('/rso-auth/v1/session/credentials', json=data)
>>> res.status_code
201

Change summoner icon (League Client)

>>> from league_connection import LeagueConnection
>>> lockfile = 'C:\\Riot Games\\League of Legends\\lockfile'
>>> connection = LeagueConnection(lockfile, timeout=10)
>>> data = {'profileIconId': 1}
>>> res = connection.put('/lol-summoner/v1/current-summoner/icon', json=data)
>>> res.status_code
201

About

league-connection is a python package to communicate to riot client and league client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages