diff --git a/owm_api25/src/query.rs b/owm_api25/src/query.rs index 67fc65d..c1db86a 100644 --- a/owm_api25/src/query.rs +++ b/owm_api25/src/query.rs @@ -36,12 +36,22 @@ pub struct QueryParams { } impl QueryParams { - /// Build query URL for the `/weather` endpoint + /// Build query URL for the `/weather` endpoint. + /// + /// # Errors + /// + /// Returns an `Err` if no valid location is specified + /// (e.g., `city_id`, `city_name`, `lat`/`lon`, or `zip` are all `None`). pub fn weather_url(&self) -> Result { self.build_url(WEATHER_URL) } - /// Build query URL for the `/forecast` endpoint + /// Build query URL for the `/forecast` endpoint. + /// + /// # Errors + /// + /// Returns an `Err` if no valid location is specified + /// (e.g., `city_id`, `city_name`, `lat`/`lon`, or `zip` are all `None`). pub fn forecast_url(&self) -> Result { self.build_url(FORECAST_URL) }