How can i get the infos like(LP, Division, Rank)
See original GitHub issueHey, i found the RiotSharp source on youtube and was interessted to work with … and now i got a problem where i cant continue working … could someone help me ?
so my problem is i’ve look at the issues and found some codes to get the LP, Rank and Divisions. but i think those are really old (from 2014) and i dont have the Methods that those ppl have written i dont have the methods like GetSummoner([Region], [summonername]); or GetEntireLeagues or GetLeagues();
what i want to do is adding a command on my discord bot and with 1 command it should show the Summonername, Level, Rank, LP, Division, and the 3 best Champions he have with the highest masterypoints.
i already have Installed the NuGet Packet RiotSharp 5.0.0-Alpha and also added RiotSharp.dll to the Reffrences.
you guys should also knew that im working first time with an api…
i leave my discord also maybe someone is interessted to help me there : Inno#2285
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (7 by maintainers)
Top GitHub Comments
ok so the item.Rank just shows the divison … like im Gold 3 and it shows Rank: III - 25 also there is nothing with division but it works like this Tier(Is the Rank you have like For example Gold) the Name Rank(Is the Division) and LeaguePoints is the LP thanks for all 😄
btw. thank you Lakoon and AoshiW for the help i never though that someone would help me …
[Alias(“info”)] public async Task LolAccInfo(string summonername) { try { var api = RiotApi.GetDevelopmentInstance(riotApiKey); var summoner = api.Summoner.GetSummonerByNameAsync(RiotSharp.Misc.Region.Euw, summonername).Result; await ReplyAsync($“SummonerName: {summoner.Name} \nLevel :{summoner.Level} \nTest:”); var allVersion = api.DataDragon.Versions.GetAllAsync().Result; var latestVersion = allVersion[0]; List <ChampionMastery> championMasteries; try { championMasteries = api.ChampionMastery.GetChampionMasteriesAsync(summoner.Region, summoner.Id).Result; } catch (RiotSharpException ex) { return; } foreach (var championMastery in championMasteries) { var id = championMastery.ChampionId; var chname = api.DataDragon.Champions.GetAllAsync(latestVersion).Result.Champions.Values.Single(x => x.Id == id).Name; var level = championMastery.ChampionLevel; var points = championMastery.ChampionPoints; await ReplyAsync($“Championname: {chname} Level: {level} Points: {points}”); //Console.WriteLine($“Championname: {chname} Level: {level} Points: {points}”); } } catch (RiotSharpException ex) { Console.WriteLine(ex); } }
this is the whole code
well, i have discord and im in the discord server thank you for that too 😄