1 回答
TA贡献1773条经验 获得超3个赞
我将假设这是您提供的json(CH0G4TH,SummonerID)中的riot games API。
-
有很多库/模块可以用于riotsAPI,但我建议:LeagueJS(很多其他的都是垃圾)。既然你说你不是一个程序员,我建议你使用它,而不是自己弄清楚,使它变得容易得多。
注意
您将需要一个riot-api密钥,您可以从以下链接获取:
https://developer.riotgames.com/
示例代码:
const LeagueJS = require('leaguejs');
// Here you should put your RGAPI code
const leagueJs = new LeagueJS("RGAPI-SylasReallyBeBrokenRn");
// I like to create a region variable (makes it easier to change later on)
const region = "oce"
// although you dont need to have a user variable I will be using one for example purposes
const user = "AIIChat"
// Here I can get entries by name. It returns a body which I will log
leagueJs.Summoner.gettingByName(user, region).then(user => {
console.log(user)
})
// Returns {......}
端点:
(他们真的没有文档)
冠军积分
- gettingRotations
冠军大师积分
- gettingBySummoner - gettingScoresBySummoner
联赛积分
- gettingChallengerLeague - gettingMasterLeague - gettingGrandMasterLeague - gettingLeagueById - gettingEntriesForSummonerId - gettingLeagueEntriesForSummonerId - gettingEntries
LolStatusEndpoint
- gettingShardData
匹配端点
- gettingById - gettingTimelineById - gettingListByAccount - gettingListByAccountWithoutPagination - gettingRecentListByAccount - gettingIdsByTournament - gettingByIdForTournament
旁观者终点
- gettingActiveGame - gettingFeaturedGames
召唤师终点
- gettingByName - gettingByAccount - gettingById - gettingByPUUID
添加回答
举报