public Task <IList <Location> > GetLocationListByTextAsync(string searchText) { return(RequestBuilder.BuildGetRequest($"{BaseUrI}") .SetPathPart($"locations/v1/search") .AddQueryStringParameter("apikey", $"{ApiKey}") .AddQueryStringParameter("q", $"{searchText}") .GetAsync <IList <Location> >()); }
public Task <IList <Weather> > GetWeatherByLocationAsync(string locationKey) { return(RequestBuilder.BuildGetRequest($"{BaseUrI}") .SetPathPart($"forecasts/v1/hourly/1hour/{locationKey}") .AddQueryStringParameter("apikey", $"{ApiKey}") .AddQueryStringParameter("details", "true") .AddQueryStringParameter("metric", "true") .GetAsync <IList <Weather> >()); }