pub const GEOLOCATION_API_URL: &str = "http://api.openweathermap.org/geo/1.0/direct?q={QUERY}&limit=10&appid={API_KEY}";Expand description
§Geocoding API
Geocoding API is a simple tool that we have developed to ease the search for locations while working with geographic names and coordinates. API Documentation: https://openweathermap.org/api/geocoding-api
{QUERY}: City search query.{API_KEY}: OpenWeatherMap API key.
§Example Usage
let url = GEOLOCATION_API_URL
.replace("{QUERY}", "Toronto")
.replace("{API_KEY}", "EXAMPLE_KEY");
assert_eq!(url, "http://api.openweathermap.org/geo/1.0/direct?q=Toronto&limit=10&appid=EXAMPLE_KEY");