///<inheritdoc cref="IIndices.FiveDaysOfDailyIndexValues(int, bool)"/> public async Task <string> FiveDaysOfDailyIndexValues(int locationKey, bool details = false) { var obj = GetObjectIndices(details); var url = $"{_baseUrl}/daily/5day/{locationKey}?apikey={_apiKey}&"; return(await SendGetRequest(UrlEncodeHelper.UrlEncode(obj, url))); }
public async Task <string> TwelveHoursOfHourlyForecasts(int locationKey, bool details = false, bool metric = false) { var obj = GetObjectForecasts(details, metric); var url = $"{_baseUrl}/hourly/12hour/{locationKey}?apikey={_apiKey}&"; return(await SendGetRequest(UrlEncodeHelper.UrlEncode(obj, url))); }
public async Task <string> GetTopCities(int group) { var obj = new { language = _language }; var url = $"{_baseUrl}topcities/{group}?apikey={_apiKey}&"; return(await SendGetRequest(UrlEncodeHelper.UrlEncode(obj, url))); }
public async Task <string> AutoCompleteSearch(string searchText) { var obj = new { q = searchText, language = _language }; var url = $"{_url}/cities/autocomplete?apikey={_apiKey}&"; return(await SendGetRequest(UrlEncodeHelper.UrlEncode(obj, url))); }
public async Task <string> GetAreaList(string areaCode, int?offset = null) { var obj = new { language = _language, offset }; var url = $"{_url}/adminareas/{areaCode}?apikey={_apiKey}&"; return(await SendGetRequest(UrlEncodeHelper.UrlEncode(obj, url))); }
public async Task <string> GetHistorical6Hours(int locationKey, bool details = false) { var obj = new { language = _language, details }; var url = $"{_baseUrl}{locationKey}/historical?apikey={_apiKey}&"; return(await SendGetRequest(UrlEncodeHelper.UrlEncode(obj, url))); }
public async Task <string> IpAddressSearch(string ipAddress, bool details = false) { var obj = new { q = ipAddress, language = _language, details }; var url = $"{_url}/cities/ipaddress?apikey={_apiKey}&"; return(await SendGetRequest(UrlEncodeHelper.UrlEncode(obj, url))); }
public async Task <string> PostalCodeSearch(string countryCode, string searchText, bool details = false) { var obj = new { q = searchText, language = _language, details }; var url = $"{_url}/postalcodes/{countryCode}/search?apikey={_apiKey}&"; return(await SendGetRequest(UrlEncodeHelper.UrlEncode(obj, url))); }
public async Task <string> PointsOfInterestSearch(string searchText, POI?type = null, bool details = false) { var obj = new { q = searchText, language = _language, type = (int?)type.Value, details }; var url = $"{_url}/poi/search?apikey={_apiKey}&"; return(await SendGetRequest(UrlEncodeHelper.UrlEncode(obj, url))); }
public async Task <string> TextSearch(string countryCode, string adminCode, string searchText, bool details = false, int?offset = null, string alias = null) { var obj = new { q = searchText, language = _language, details, offset, alias }; var url = $"{_url}/{countryCode}/{adminCode}/search?apikey={_apiKey}&"; return(await SendGetRequest(UrlEncodeHelper.UrlEncode(obj, url))); }
public async Task <string> GeoPositionSearch(double lat, double lon, bool details = false, bool topLevel = false) { var q = lat.ToString(CultureInfo.InvariantCulture) + $",{lon.ToString(CultureInfo.InvariantCulture)}"; var obj = new { q, language = _language, details, topLevel }; var url = $"{_url}/cities/geoposition/search?apikey={_apiKey}&"; return(await SendGetRequest(UrlEncodeHelper.UrlEncode(obj, url))); }
public async Task <string> GetCityNeighbors(string locationKey, bool details = false) { var url = $"{_url}/cities/neighbors/{locationKey}?apikey={_apiKey}&"; return(await SendGetRequest(UrlEncodeHelper.UrlEncode(GetLanguageDetailsObject(details), url))); }
public async Task <string> SearchByLocationKey(string locationKey, bool details = false) { var url = $"{_url}/{locationKey}?apikey={_apiKey}&"; return(await SendGetRequest(UrlEncodeHelper.UrlEncode(GetLanguageDetailsObject(details), url))); }
public async Task <string> GetTopCitiesList(int group, bool details = false) { var url = $"{_url}/topcities/{group}?apikey={_apiKey}&"; return(await SendGetRequest(UrlEncodeHelper.UrlEncode(GetLanguageDetailsObject(details), url))); }
public async Task <string> GetRegionList() { var url = $"{_url}/regions?apikey={_apiKey}&"; return(await SendGetRequest(UrlEncodeHelper.UrlEncode(GetLanguageObject, url))); }
public async Task <string> GetCountryList(string countryCode) { var url = $"{_url}/countries/{countryCode}?apikey={_apiKey}&"; return(await SendGetRequest(UrlEncodeHelper.UrlEncode(GetLanguageObject, url))); }