I'm working on a project using the Riot Games API, and have run into an issue. I'm able to receive and deserialize info using the "summoner" api call, but I cannot replicate my success with the "game" api call. Here is how I am attempting to receive the list from the Api.
var client = new RestClient("https://na.api.pvp.net");
RestRequest request = new RestRequest("/api/lol/na/v1.3/game/by-summoner/" + idReceived + "/recent?<my api key here>", Method.GET);
request.AddHeader("Content-type", "application/json");
var response = client.Execute<RecentGames>(request);
var recentGames = JsonConvert.DeserializeObject<RecentGames>(response.Content).games;
Once I have my recentGames, I am trying to put it into a ListView I have created as follows.
ListAdapter = new ArrayAdapter<Game>(this, Android.Resource.Layout.SimpleListItem1, recentGames);
The app runs fine until it hits the line of code above. Once it attempts to put the recentGames into a list the app crashes.
I've been able to add an empty list of Game to the ListAdapter and it worked fine. So I'm sort of stumped on where I'm going wrong. Any point in the right direction would help greatly!