async Task GetMatches(int id) { try { Loading = true; Status = false; RestService.For <IApiServices>(Links.url); var response1 = await apiServices.GetFixtures(id); Fixture = response1; this.Matches = Fixture.Matches; foreach (var item in Matches) { var x = Teamm.Where(elemento => elemento.Id == item.HomeTeam.Id).ToList(); var y = Teamm.Where(elemento => elemento.Id == item.AwayTeam.Id).ToList(); } Loading = false; Status = true; } catch (Exception ex) { Debug.WriteLine($"Error en el metodo Matches: {ex.Message}"); Loading = true; Status = false; } }
//Retrieve data about matches for selected league// async Task GetMatches(int id) { try { Loading = true; Status = false; RestService.For <IApiServices>(Links.url); var fixtures = await apiServices.GetFixtures(id); Matches = fixtures.Matches; //Fill list of fixtures// foreach (var item in fixtures.Matches) { Teamm.Where(element => element.Id == item.HomeTeam.Id); Teamm.Where(element => element.Id == item.AwayTeam.Id); } Loading = false; Status = true; } catch (Exception ex) { Debug.WriteLine($"Error en el metodo Matches: {ex.Message}"); Loading = true; Status = false; } }