Function open_notify::spot [−][src]
pub async fn spot(
latitude: f64,
longitude: f64,
altitude: f64,
n: u8
) -> Result<Vec<Spot>, String>
Expand description
Fetch current ISS spotting update once and stop thread immediately after success. Returns the result in a future.
Parameters
latitude
: latitude in decimal degrees of the ground station. required Range: -90..90longitude
: longitude in decimal degress of the ground station. required Range: -180..180altitude
: altitude in meters of the ground station. optional. Range: 0..10000n
: number of spotting events to fetch (<=100)
Return value
- ⇒
Ok(Vec<Spot>)
: vector of upcoming spotting events (see also open-notify documentation for details) - ⇒
Err(String)
: Error message about any occured http or json issue - e.g. `500 Internal Server Error“ - some json parser error message if response from open-notify.org could not be parsed