0

I am attempting to build an application for a personal project using Xamarin in Visual Studio for Android. I am using the internet game database igdb.com api to retrieve the required information based off user filtered search with selected genre, platform, and rating.

I found an api wrapper that I was able to install through the nuget package manager. The api uses flurl, and is in my references for my project and also in my using for my main activity class.

My question is, how do I utilize this api wrapper, I have it referenced, but how do I set my api key to the ApiKey variable in the wrapper? And how do I call on this wrapper in a class now that it is referenced? I do have a valid API key for the igdb.com api

https://bitbucket.org/coldacid/igdb-api-net/overview

Chad Nedin
  • 15
  • 1
  • 7

1 Answers1

0

Briefly looking at the source, you simply pass it into the constructor as an argument.

var api = new IgdbApi("my-api-key");

Usage can be seen in the tests. I.e. getting games would look like:

IIgdbGamesApi gamesApi = new IgdbApi("my-api-key");
var games = await gamesApi.GetGamesAsync();
Cheesebaron
  • 24,131
  • 15
  • 66
  • 118
  • Thank you so much for your reply/answer. This helped me out greatly in making use of the wrapper. However that wrapper is not working/out of date, and had that confirmed by the author of that wrapper. – Chad Nedin Apr 18 '17 at 03:17