Skip to main content

Python package to communicate to riot client and league client

Project description

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

Project details


Download files

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

Source Distribution

league-connection-1.0.1.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

league_connection-1.0.1-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page