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

Changes to Getting Matches by SummoneriD? (MATCH-V4 Deprecation?) #706

Open
itorres008 opened this issue Apr 18, 2022 · 4 comments
Open

Comments

@itorres008
Copy link

Hello,

I have some elementary code for RiotSharp beginners, kindly provided by Jan Ouborny a couple of years back. I setup VS project, RiotSharp, etc and got it to work back then.

I went into the project today and tried running it and get a 403 on
var matchListOfSummoner = riotApi.Match.GetMatchListAsync(RiotSharp.Misc.Region.Na, summoner.AccountId, null, null, null, null, null, null, numberOfMatches).Result;

Since I generated new API Key and GetSummonerByNameAsync works OK, I presume API Key is not the problem.

  • Did the RiotSharp wrapper change? I see Riot deprecated the MATCH-V4 for MATCH-V5 and think maybe that could have affected the call parameters. I’ve also seen some code in GitHub discussions calling GetMatchList by PUUID instead of AccountID.
  • What is the latest RiotSharp version I should be using? I am using 4.0.0 according to VS, but have seen some mention of a new 5 version in GitHub. Although, GitHub also says latest version is 2.5.5 on Apr 12, 2017. 🙂
  • I downloaded the zip file with files from 11/08/21, but I really couldn’t find a version number within files I checked. Should I manually install this one?

Thanks,
Iván Torres

PS: Sorry for not knowing certain things about GitHub, nomenclature, etc. Most programming I’ve done predates their existence. I joined GitHub for RiotSharp and I’m figuring out its correct use in Visual Studio.

@xXLAOKOONXx
Copy link
Contributor

xXLAOKOONXx commented Apr 18, 2022

Version 5 Alpha is a newer Version.
Version 4 ist deprecated.
GitHub branching and building yourself should bei the was to go.
I have a nuget called xxlaokoonxx.riotsharp with current GitHub Version

@itorres008
Copy link
Author

Thanks.

I'll look into branching and building...but since I'm not too familiar with this it would be kind of uphill for me.
I'm glad you edited to correct "nuget" because what I read on the email was "I have a Niger called xxlaokoonxx.riotsharp Wirth current GitHub Version" and I was wondering what would the name of a river in Africa apply to in this technology. 🙂 I'll assume it's "with" not Wirth.

Can I presume enough number of people use RiotSharp that there will exist a new installable package released for 5.0.0? Sometime in the near future?😬

I'll look into your solution to see if I can make sense of what I need to do, but I think I may have to wait for an official easy-install package.

@xXLAOKOONXx
Copy link
Contributor

Sorry for autocompletion, was answering from phone^^
I would say there are enough people using and contributing that RiotSharp/develop branch will have the currently required features available.
Having a new release of 5.0.0 is tied to the actions of the owner. I would not assume nuget to be a maintained package. (that's why I published the current state as rogue nuget 'xxlaokoonxx.riotsharp')
I recommend:

  • Download the current develop branch
  • Add the downloaded project to your solution
    Alternatively you could build a nuget package yourself and import from a local nuget library. If you are not into this it will take for sure longer than binding the project into your solution.

@itorres008
Copy link
Author

Ok. Thanks for the help and links.

I've managed to add 5.0.13 library and started debugging sample code I have.
I downloaded the Zip file. Just opened it in VS to look at it and see if I could find a version number to verify, which I didn't. Did some basic research on NuGet, versioning, branching, external references... Why? Never used this stuff before...last worked on VB .Net 20+ yrs ago.😕 OOP was not what it is now. Also, never used C#.

The NuGet for your 5.0.13 appeared in VS to add to solution. I don't know if it pulled it from online repo or local directory where I unzipped, but I'll look for that answer later.

I had errors I traced to changes on v5.0, Regions from NA to Americas, changes in structure of Match Info... Couldn't see API Documentation in Riot Dev Portal about changes from v4 to v5 that needed changing our code. So, went into library code, debugged and figured it out the hard way.

Have retrieved Summoner, MatchList, Match... The next part is accessing stats for the Match Participants, which I believe have changes in structure, too. The next couple of lines I'll tackle later because I need to research and understand the syntax to really know what they do.

            // Get participant stats object of summoner (summonerName)
            var particpantsId = match.ParticipantIdentities.Single(x => x.Player.AccountId == summoner.AccountId);
            var participantsStats = match.Participants.Single(x => x.ParticipantId == particpantsId.ParticipantId);

I presume the call changes to using puuid, the Participant structure changes. And "=>", lambda expression? Will have to research. But I'm moving.

I have some general questions about redundant API data querying vs storing history, etc. I will have to ask later what you guys do when I get to that point.

Thanks.

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