Code Monkey home page Code Monkey logo

lcuapihelper's Introduction

LOLHelper

League Of Legends LCU(LegueClientUx) API usage example.
英雄联盟客户端API调用示例,调用API时需要先运行游戏并保证RiotClientServices通讯正常。 你可以通过以下方式确定:

# lHelper = LoLHelper(port,token);
lHelper.get("riot-messaging-service/v1/state") # 如果返回 "Connected" 则说明 RiotClientServices 通讯正常。

此外,还需要确定账号的登录状态:

# lHelper = LoLHelper(port,token);
lHelper.get("lol-summoner/v1/status") # 如果返回 { "ready":true } 则说明登录成功;否则可能登录失败或正在服务器排队队列中。

在此之后你可以正常调用LCU API(当然上述情况是先运行程序后运行游戏的情况下要做的,如果是后运行程序你完全可以爱搞不搞),另外你可以自己扩展一些API调用实现的功能。

你还可以在以下文档中了解到更多的LCU API:
LCU API Document
Riot官方的开发者(LOL)文档:
Riot Developer Document

你可以在官方开发者文档里的Data Dragon(数据龙)中找到游戏中基本能看到的所有资源,例如召唤师技能,装备和英雄的图片资源等,Data Dragon会随着游戏版本的更新而更新(也可能提前或延后),Data Dragon是静态的数据,获取Data Dragon数据需要指定游戏版本,你可以通过 (https://ddragon.leagueoflegends.com/api/versions.json) 中第[1]个项、下标[0]来获取当前游戏的的版本。

还有一件事:用到的第三方库需要自己去下载:requests 和 pustil,嗯、当然你也可以选择其他的。

lcuapihelper's People

Contributors

snxialianxin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.