/// <summary> /// Gets all drivers that has signed a specific constructor. /// </summary> /// <param name="constructor">Constructor ID.</param> /// <returns>Drivers info.</returns> public async Task <DriverTable> DriversByConstructorAsync(string constructor) { try { HttpResponseMessage response = await _client.GetAsync(_api.DriversByConstructor(constructor)); if (response.IsSuccessStatusCode) { string content = await response.Content.ReadAsStringAsync(); return(JsonConvert.DeserializeObject <DataErgastDrivers>(DataErgast.RemoveMRData(content))?.DriverTable); } } catch (Exception ex) { Debug.WriteLine("\tERROR {0}", ex.Message); } return(null); }