Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

sirius-beck/lcu-connector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


LCU Connector

Description

This library serves to make the connection with the League Client API in a simple way, although there are others, such as lcu-driver (which by the way is very good), but with lcu-driver, for example, I couldn't work and structure my code the way I wanted it to, so I decided to make my own wrapper.

Features

  • Easy and fast setup
  • Multi platform
  • Extensible

Example

from lcu_connector import Connector

conn = Connector(start=True)

# Getting the data of the currently connected summoner
res = conn.get('/lol-summoner/v1/current-summoner')
print(res.json())

# Getting a summoner's data by name
summoner_name = 'JohnDoe'
res = conn.get('/lol-summoner/v1/summoners?name={summoner_name}')
print(res.json())

# Performing POST request
data = {
    'foo': 'bar'
}
res = conn.post('API_URL', data=data)
if res.status_code == 200:
    do_something()

conn.stop()

To-do

  • More detailed documentation
  • API event watcher
  • Built-in functions for commonly used tasks (like a get_summoner_by_name())