Go OpenSky API Functions — Go OpenSky Network API 0.3.0 documentation (original) (raw)

func NewConnection

Creates a new connection context to OpenSky Network live API server.

func NewConnection(ctx context.Context, username string, password string) (context.Context, error)

Parameters:

Returns:

context.Context, error

func GetStates

Retrieve state vectors for a given time.

func GetStates(ctx context.Context, time int64, icao24 []string, bBox *BoundingBoxOptions, extended bool) (*States, error)

Parameters:

Returns:

*States, error

func GetArrivalsByAirport

Retrieves flights for a certain airport which arrived within a given time interval [being, end].

The given time interval must not be larger than seven days!

func GetArrivalsByAirport(ctx context.Context, airport string, begin int64, end int64) ([]FlightData, error)

Parameters:

Returns:

[]FlightData, error

func GetDeparturesByAirport

Retrieves flights for a certain airport which departed within a given time interval [being, end].

The given time interval must not be larger than seven days!

func GetDeparturesByAirport(ctx context.Context, airport string, begin int64, end int64) ([]FlightData, error)

Parameters:

Returns:

[]FlightData, error

func GetFlightsByInterval

Retrieves flights within a given time interval [being, end].

The given time interval must not be larger than two hours!

func GetFlightsByInterval(ctx context.Context, begin int64, end int64) ([]FlightData, error)

Parameters:

Returns:

[]FlightData, error

func GetFlightsByAircraft

Retrieves flights for a particular aircraft within a certain time interval.

The given time interval must not be larger than 30 days!

func GetFlightsByAircraft(ctx context.Context, icao24 string, begin int64, end int64) ([]FlighData, error)

Parameters:

Returns:

[]FlightData, error

func GetTrackByAircraft

Retrieves the trajectory for a certain aircraft at a given time.

It is not possible to access flight tracks from more than 30 days in the past.

func GetTrackByAircraft(ctx context.Context, icao24 string, time int64) (FlightTrack, error)

Parameters:

Returns:

FlightTrack, error

func NewBoundingBox

Creates a new bounding (min_latitude, max_latitude, min_longitude, max_longitude) box option.

func NewBoundingBox (lamin float64, lomin float64, lamax float64, lomax float64) *BoundingBoxOptions

Parameters:

Returns:

*BoundingBoxOptions