Function open_notify::spot [−][src]
pub async fn spot(
latitude: f64,
longitude: f64,
altitude: f64
) -> 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..10000poll_mins
: Update interval:> 0
: duration of poll period in minutes (10
is recommended)= 0
: thread will terminate after the first successful update.
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