Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get position/role of a current game? #689

Open
GithubStalker opened this issue Jun 21, 2021 · 3 comments
Open

Get position/role of a current game? #689

GithubStalker opened this issue Jun 21, 2021 · 3 comments

Comments

@GithubStalker
Copy link

I'd like to know what's the participant's role. I saw that Match has properties for this. But this is not for a current match.

 List<CurrentGameParticipant> currentMatch = 
                api.Spectator.GetCurrentGameAsync(Region.Euw, summonerObject.Id).Result.Participants;

how could I know the order (TOP, JUNGLE, MID, ADC, SUPPORT) for these participants?

@xXLAOKOONXx
Copy link
Contributor

please take a look here: https://developer.riotgames.com/apis#match-v4/GET_getMatch
RiotSharp is on MATCH-V5 since a few days, but there is no documentation from riot to refer yet

@GithubStalker
Copy link
Author

GithubStalker commented Jun 21, 2021

Can I get a current match in Riot Sharp using Match's methods?

For example

  long idMatch = api.Spectator.GetCurrentGameAsync(Region.Euw, summonerObject.Id).Result.GameId;
 return api.Match.GetMatchAsync(Region.Euw, idMatch.ToString()).Result.Info.Participants.First().Lane;

This doesn't work for me. I can get the CurrentGame but there's no Lane properties. And the idMatch I got it's not valid

@xXLAOKOONXx
Copy link
Contributor

I assume the spectator api does not give those information. And match api is for completed games only.
So it is not possible to recieve the information you want via riot api.

I am not aware whether the order has something to do with theire position. You also could try to assume positions based on the participants and their picks (caitlyn most likely adc, etc.) i think there are some frameworks to do so (not sure if compatible with c#).

If you have further questions in that regard i recommend the official riot third party discord. RiotSharp makes the Riot api available in c#, your problem goes beyond that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants