Connection module

class lcu_driver.connection.Connection(connector, process_or_string: Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7f5d21b7da10>, str])

Bases: object

Parameters:
  • connector (lcu_driver.connector.Connector) – Connector instance where connection should look for events handlers
  • process_or_string (psutil.Process or string) – psutil.Process object or lockfile string
address

Return HTTPS Base URL

Returns:str
auth_key

Return League Client API current connection password

Return type:str or None
init()

Initialize the connection. It’s called by the connector when it finds a connection

Return type:none
installation_path

Return League Client installation path

Returns:optional[str]
pid

League Client Process Id

Return type:int
port

Return the League Client API current connection port

Return type:int
protocols

Return a tuple with League Client API supported protocols

Return type:tuple(str, str)
request(method: str, endpoint: str, **kwargs)

Run an HTTP request against the API

Parameters:method – HTTP method :type method: str :param endpoint: Request Endpoint :type endpoint: str :param

kwargs: Arguments for aiohttp.Request. The data keyworded argument will be JSON encoded automatically.

run_ws()

Start the websoocket connection. This is responsible to raise Connector close event and handling the websocket events.

Returns:None
ws_address

Return Websocket Base URL

Returns:str