BenFradet / RiotSharp

C# wrapper for the Riot Games API
http://benfradet.github.io/RiotSharp/
MIT License
301 stars 145 forks source link

Old static-data-v3 endpoint remaining parts #578

Closed GuillaumeBONHOMMEAU closed 5 years ago

GuillaumeBONHOMMEAU commented 5 years ago

I haven't forked yet the project, I am currently using it throught Nuget Packages. And under the 3.0.1 version, which is last stable one.

Notice that I don't have any problem with the main Riot API.

But with the following code :

var staticApi = StaticRiotApi.GetInstance(RIOT_API_KEY);
var champions = staticApi.GetChampions(Region.euw, ChampionData.All)?.Champions?.Values;

I have a 403 Forbidden error while I have a valid one day api key. Then inspecting the staticApi instance, I realize : RiotSharp.StaticRiotApi.StaticDataRootUrl = "/lol/static-data/v3/"

I suppose forking the project, under some branche, the problem is fully resolved.

JanOuborny commented 5 years ago

You have to use the latest build of the library. The NuGet version is heavily outdated. The version of the develop branch should work.

GuillaumeBONHOMMEAU commented 5 years ago

Alright, thanks man ;)