Documentation
¶
Index ¶
- type CallSignTrim
- type Client
- func (c *Client) GetFlights(begin time.Time, end time.Time) (flights []Flight, err error)
- func (c *Client) GetFlightsByAircraft(icao24 string, begin time.Time, end time.Time) (flights []Flight, err error)
- func (c *Client) GetFlightsByArrival(airport string, begin time.Time, end time.Time) (flights []Flight, err error)
- func (c *Client) GetFlightsByDeparture(airport string, begin time.Time, end time.Time) (flights []Flight, err error)
- func (c *Client) GetFlightsByInterval(begin time.Time, end time.Time) (flights []Flight, err error)
- func (c *Client) GetTrackByAircraft(icao24 string, time time.Time) (response GetTracksResponse, err error)
- type Flight
- type GetTracksResponse
- type Waypoint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallSignTrim ¶
type CallSignTrim string
func (*CallSignTrim) UnmarshalJSON ¶
func (c *CallSignTrim) UnmarshalJSON(data []byte) error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client An OpenSky API client.
func (*Client) GetFlights ¶
GetFlights retrieves all flight information within a certain time interval. Flights departed and arrived within the [begin, end] boundaries will be returned.
If no flights were found for the given time period, a 404 error will be returned instead.
func (*Client) GetFlightsByAircraft ¶
func (c *Client) GetFlightsByAircraft(icao24 string, begin time.Time, end time.Time) (flights []Flight, err error)
GetFlightsByAircraft retrieves flight information for a particular aircraft, identified by the icao24 address parameter, within a certain time interval. Flights departed and arrived within the [begin, end] boundaries will be returned.
If no flights were found for the given time period, a 404 error will be returned instead.
func (*Client) GetFlightsByArrival ¶
func (c *Client) GetFlightsByArrival(airport string, begin time.Time, end time.Time) (flights []Flight, err error)
GetFlightsByArrival retrieve flights for a certain airport which arrived within a given time interval [begin, end].
If no flights were found for the given time period, a 404 error will be returned instead.
func (*Client) GetFlightsByDeparture ¶
func (c *Client) GetFlightsByDeparture(airport string, begin time.Time, end time.Time) (flights []Flight, err error)
GetFlightsByDeparture retrieve flights for a certain airport which departed within a given time interval [begin, end].
If no flights were found for the given time period, a 404 error will be returned instead.
func (*Client) GetFlightsByInterval ¶
GetFlightsByInterval retrieves flights for a certain time interval [begin, end].
If no flights were found for the given time period, a 404 error will be returned instead.
func (*Client) GetTrackByAircraft ¶
func (c *Client) GetTrackByAircraft(icao24 string, time time.Time) (response GetTracksResponse, err error)
GetTrackByAircraft Retrieve the trajectory for a certain aircraft at a given time. The trajectory is a list of waypoints containing position, barometric altitude, true track and an on-ground flag.
If no flights were found for the given time period, a 404 error will be returned instead.
type Flight ¶
type Flight struct { Icao24 string `json:"icao24"` FirstSeen int `json:"firstSeen"` EstDepartureAirport string `json:"estDepartureAirport"` LastSeen int `json:"lastSeen"` EstArrivalAirport string `json:"estArrivalAirport"` Callsign CallSignTrim `json:"callsign"` EstDepartureAirportHorizDistance int `json:"estDepartureAirportHorizDistance"` EstDepartureAirportVertDistance int `json:"estDepartureAirportVertDistance"` EstArrivalAirportHorizDistance int `json:"estArrivalAirportHorizDistance"` EstArrivalAirportVertDistance int `json:"estArrivalAirportVertDistance"` DepartureAirportCandidatesCount int `json:"departureAirportCandidatesCount"` ArrivalAirportCandidatesCount int `json:"arrivalAirportCandidatesCount"` }