Function open_notify::blocking::spot[][src]

pub fn spot(
    latitude: f64,
    longitude: f64,
    altitude: f64,
    n: u8
) -> Result<Vec<Spot>, String>
Expand description

Fetches a ISS spotting update once and stops the thread immediately after success then returns the update.

Parameters

  • latitude: latitude in decimal degrees of the ground station. required Range: -90..90
  • longitude: longitude in decimal degress of the ground station. required Range: -180..180
  • altitude: altitude in meters of the ground station. optional. Range: 0..10000
  • n: number of spotting events to fetch (<=100)

Return value

  • Ok(Vec<Spot>): vector of upcoming spotting events
  • 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