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

Can't access DataDragon #681

Open
Bruno-Marley opened this issue Mar 5, 2021 · 5 comments
Open

Can't access DataDragon #681

Bruno-Marley opened this issue Mar 5, 2021 · 5 comments

Comments

@Bruno-Marley
Copy link

Bruno-Marley commented Mar 5, 2021

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);
}

But it's giving me a error:
Capturar

@xXLAOKOONXx
Copy link
Contributor

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

@Bruno-Marley
Copy link
Author

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.

@BenFradet
Copy link
Owner

what is api defined as? because DataDragon is part of RiotApi: https://github.com/BenFradet/RiotSharp/blob/develop/RiotSharp/RiotApi.cs#L62

@Bruno-Marley
Copy link
Author

I defined api as: var api = RiotApi.GetDevelopmentInstance("MY_API_KEY");

@xXLAOKOONXx
Copy link
Contributor

Can you check if you can access 'api.StaticData' instead?
This would be an indicator for the nugget being of older version

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

3 participants