连接到LCU
lcu-connector-python的Python项目详细描述
此项目有助于轻松连接Riot Games的LCU API。 要使用此功能,请使用安装
pip install lcu_connector_python
当你想用的时候。
import lcu_connector_python as lcu
api_connection_data = lcu.connect()
如果在defualt位置没有安装“c:/riot games/league of legends”,则需要传递您的league文件夹的位置。示例:
import lcu_connector_python as lcu
api_connection_data = lcu.connect("C:/Riot Games/League of Legends/RADS/projects/league_client/releases/0.0.0.178/deploy/LeagueClient.exe")
函数的作用是:返回一个字典,其中包含连接到lcu所需的数据
{
port: "localhost port number",
url: "url used to communicated with the lcu",
authorization: "auth token",
connection_method: "http or https"
}