/// <summary> /// Gets qualifying results given the year and round of the race. /// </summary> /// <param name="year">Year of the race.</param> /// <param name="round">Round of the season.</param> /// <returns>Race data with qualifying provided.</returns> public async Task <Race> QualifyingByRaceAsync(int year, int round) { try { HttpResponseMessage response = await _client.GetAsync(_api.QualifyingByRace(year, round)); if (response.IsSuccessStatusCode) { string content = await response.Content.ReadAsStringAsync(); return(JsonConvert.DeserializeObject <DataErgastRaces>(DataErgast.RemoveMRData(content))?.RaceTable.Races[0]); } } catch (Exception ex) { Debug.WriteLine("\tERROR {0}", ex.Message); } return(null); }