Can't access DataDragon
Opened this issue · 5 comments
I'am using this example:
var allVersion = api.DataDragon.Versions.GetAllAsync().Result;
var latestVersion = allVersion[0]; // Example of version: "10.23.1"
var champions = api.DataDragon.Champions.GetAllAsync(latestVersion).Result.Champions.Values;
foreach (var champion in champions)
{
Console.WriteLine(champion.Name);
Console.WriteLine(champion.Lore);
}
Have you build your own nugget package?
The available nugget package is not up to date and you need to build one your own.
check out https://github.com/BenFradet/RiotSharp#build-your-own-latest-nuget-package for some information on that
Ye I build it, I downloaded the zip and executed the command dotnet pack /p:Configuration=Release
, then opened the folder RiotSharp > bin > Release
and copied the nugget file into the root folder of my project and installed it but it still doesn't work.
what is api
defined as? because DataDragon
is part of RiotApi
: https://github.com/BenFradet/RiotSharp/blob/develop/RiotSharp/RiotApi.cs#L62
I defined api as: var api = RiotApi.GetDevelopmentInstance("MY_API_KEY");
Can you check if you can access 'api.StaticData' instead?
This would be an indicator for the nugget being of older version