Versions in this module Expand all Collapse all v1 v1.6.1 Aug 25, 2026 v1.6.0 Aug 25, 2026 Changes in this version + const Author + const DefaultRetryBaseDelay + const DefaultRetryJitter + const DefaultRetryMaxDelay + const DefaultText + const DefaultTimeout + const MaxResponseBytes + const Version + var ErrAirportNotFound = fmt.Errorf("%w: airport not found", ErrFlightRadar) + var ErrCloudflare = fmt.Errorf("%w: blocked by cloudflare", ErrFlightRadar) + var ErrDecompressionLimit = fmt.Errorf("%w: response body past the size limit", ErrFlightRadar) + var ErrFlightRadar = errors.New("flightradar24") + var ErrLogin = fmt.Errorf("%w: login", ErrFlightRadar) + func SetLogger(l *slog.Logger) + type Airline struct + IATA string + ICAO string + Name string + NumAircrafts *int + type Airport struct + AircraftOnGround *float64 + AircraftVisibleOnGround *float64 + Altitude *float64 + Arrivals map[string]any + AverageRating *float64 + City string + Country string + CountryCode string + CountryID *float64 + Departures map[string]any + Evaluation *float64 + IATA string + ICAO string + Images map[string]any + Name string + RawDetails map[string]any + Reviews *float64 + ReviewsURL string + Runways []any + TimezoneAbbr string + TimezoneAbbrName string + TimezoneName string + TimezoneOffset *float64 + TimezoneOffsetHours string + TotalRating *float64 + Visible *bool + Weather map[string]any + Website string + Wikipedia string + func NewAirport() *Airport + func NewAirportFromBasicInfo(basicInfo map[string]any) *Airport + func NewAirportFromDetails(airportDetails map[string]any) *Airport + func NewAirportFromInfo(info map[string]any) *Airport + func (a *Airport) SetAirportDetails(airportDetails map[string]any) + func (a *Airport) String() string + type AirportNotFoundError struct + Code string + Errors map[string]any + Message string + func (e *AirportNotFoundError) Error() string + func (e *AirportNotFoundError) Unwrap() error + type Client struct + MaxWorkers int + Timeout time.Duration + func New(options ...Options) *Client + func (c *Client) GetAirlineLogo(ctx context.Context, iata, icao string) (*Image, error) + func (c *Client) GetAirlines(ctx context.Context) ([]Airline, error) + func (c *Client) GetAirport(ctx context.Context, code string, details bool) (*Airport, error) + func (c *Client) GetAirportDetails(ctx context.Context, code string, flightLimit, page int) (map[string]any, error) + func (c *Client) GetAirportDisruptions(ctx context.Context) (map[string]any, error) + func (c *Client) GetAirports(ctx context.Context, countries []Country) ([]*Airport, error) + func (c *Client) GetBookmarks(ctx context.Context) (map[string]any, error) + func (c *Client) GetBounds(zone Zone) string + func (c *Client) GetBoundsByPoint(latitude, longitude, radius float64) string + func (c *Client) GetCountryFlag(ctx context.Context, country string) (*Image, error) + func (c *Client) GetFlightDetails(ctx context.Context, flight *Flight) (map[string]any, error) + func (c *Client) GetFlightTrackerConfig() FlightTrackerConfig + func (c *Client) GetFlights(ctx context.Context, search FlightSearch) ([]*Flight, error) + func (c *Client) GetHistoryData(ctx context.Context, flight *Flight, fileType string, timestamp int64) (string, error) + func (c *Client) GetLoginData() (map[string]any, error) + func (c *Client) GetMostTracked(ctx context.Context) (map[string]any, error) + func (c *Client) GetVolcanicEruptions(ctx context.Context) (map[string]any, error) + func (c *Client) GetZones() map[string]Zone + func (c *Client) IsLoggedIn() bool + func (c *Client) Login(ctx context.Context, user, password string) error + func (c *Client) Logout(ctx context.Context) (bool, error) + func (c *Client) Search(ctx context.Context, query string, limit int) (map[string][]any, error) + func (c *Client) SetFlightTrackerConfig(config *FlightTrackerConfig, values map[string]string) error + type CloudflareError struct + Body []byte + Message string + Response *http.Response + func (e *CloudflareError) Error() string + func (e *CloudflareError) Unwrap() error + type Country string + const CountryAfghanistan + const CountryAlbania + const CountryAlgeria + const CountryAmericanSamoa + const CountryAngola + const CountryAnguilla + const CountryAntarctica + const CountryAntiguaAndBarbuda + const CountryArgentina + const CountryArmenia + const CountryAruba + const CountryAustralia + const CountryAustria + const CountryAzerbaijan + const CountryBahamas + const CountryBahrain + const CountryBangladesh + const CountryBarbados + const CountryBelarus + const CountryBelgium + const CountryBelize + const CountryBenin + const CountryBermuda + const CountryBhutan + const CountryBolivia + const CountryBosniaAndHerzegovina + const CountryBotswana + const CountryBrazil + const CountryBrunei + const CountryBulgaria + const CountryBurkinaFaso + const CountryBurundi + const CountryCambodia + const CountryCameroon + const CountryCanada + const CountryCapeVerde + const CountryCaymanIslands + const CountryCentralAfricanRepublic + const CountryChad + const CountryChile + const CountryChina + const CountryCocosKeelingIslands + const CountryColombia + const CountryComoros + const CountryCongo + const CountryCookIslands + const CountryCostaRica + const CountryCroatia + const CountryCuba + const CountryCuracao + const CountryCyprus + const CountryCzechia + const CountryDemocraticRepublicOfTheCongo + const CountryDenmark + const CountryDjibouti + const CountryDominica + const CountryDominicanRepublic + const CountryEcuador + const CountryEgypt + const CountryElSalvador + const CountryEquatorialGuinea + const CountryEritrea + const CountryEstonia + const CountryEswatini + const CountryEthiopia + const CountryFalklandIslandsMalvinas + const CountryFaroeIslands + const CountryFiji + const CountryFinland + const CountryFrance + const CountryFrenchGuiana + const CountryFrenchPolynesia + const CountryGabon + const CountryGambia + const CountryGeorgia + const CountryGermany + const CountryGhana + const CountryGibraltar + const CountryGreece + const CountryGreenland + const CountryGrenada + const CountryGuadeloupe + const CountryGuam + const CountryGuatemala + const CountryGuernsey + const CountryGuinea + const CountryGuineaBissau + const CountryGuyana + const CountryHaiti + const CountryHonduras + const CountryHongKong + const CountryHungary + const CountryIceland + const CountryIndia + const CountryIndonesia + const CountryIran + const CountryIraq + const CountryIreland + const CountryIsleOfMan + const CountryIsrael + const CountryItaly + const CountryIvoryCoast + const CountryJamaica + const CountryJapan + const CountryJersey + const CountryJordan + const CountryKazakhstan + const CountryKenya + const CountryKiribati + const CountryKosovo + const CountryKuwait + const CountryKyrgyzstan + const CountryLaos + const CountryLatvia + const CountryLebanon + const CountryLesotho + const CountryLiberia + const CountryLibya + const CountryLithuania + const CountryLuxembourg + const CountryMacao + const CountryMadagascar + const CountryMalawi + const CountryMalaysia + const CountryMaldives + const CountryMali + const CountryMalta + const CountryMarshallIslands + const CountryMartinique + const CountryMauritania + const CountryMauritius + const CountryMayotte + const CountryMexico + const CountryMicronesia + const CountryMoldova + const CountryMonaco + const CountryMongolia + const CountryMontenegro + const CountryMontserrat + const CountryMorocco + const CountryMozambique + const CountryMyanmarBurma + const CountryNamibia + const CountryNauru + const CountryNepal + const CountryNetherlands + const CountryNewCaledonia + const CountryNewZealand + const CountryNicaragua + const CountryNiger + const CountryNigeria + const CountryNorthKorea + const CountryNorthMacedonia + const CountryNorthernMarianaIslands + const CountryNorway + const CountryOman + const CountryPakistan + const CountryPalau + const CountryPanama + const CountryPapuaNewGuinea + const CountryParaguay + const CountryPeru + const CountryPhilippines + const CountryPoland + const CountryPortugal + const CountryPuertoRico + const CountryQatar + const CountryReunion + const CountryRomania + const CountryRussia + const CountryRwanda + const CountrySaintHelena + const CountrySaintKittsAndNevis + const CountrySaintLucia + const CountrySaintPierreAndMiquelon + const CountrySaintVincentAndTheGrenadines + const CountrySamoa + const CountrySaoTomeAndPrincipe + const CountrySaudiArabia + const CountrySenegal + const CountrySerbia + const CountrySeychelles + const CountrySierraLeone + const CountrySingapore + const CountrySlovakia + const CountrySlovenia + const CountrySolomonIslands + const CountrySomalia + const CountrySouthAfrica + const CountrySouthKorea + const CountrySouthSudan + const CountrySpain + const CountrySriLanka + const CountrySudan + const CountrySuriname + const CountrySweden + const CountrySwitzerland + const CountrySyria + const CountryTaiwan + const CountryTajikistan + const CountryTanzania + const CountryThailand + const CountryTimorLesteEastTimor + const CountryTogo + const CountryTonga + const CountryTrinidadAndTobago + const CountryTunisia + const CountryTurkey + const CountryTurkmenistan + const CountryTurksAndCaicosIslands + const CountryTuvalu + const CountryUganda + const CountryUkraine + const CountryUnitedArabEmirates + const CountryUnitedKingdom + const CountryUnitedStates + const CountryUnitedStatesMinorOutlyingIslands + const CountryUruguay + const CountryUzbekistan + const CountryVanuatu + const CountryVenezuela + const CountryVietnam + const CountryVirginIslandsBritish + const CountryVirginIslandsUs + const CountryWallisAndFutuna + const CountryYemen + const CountryZambia + const CountryZimbabwe + func AllCountries() []Country + type DecompressionLimitError struct + Message string + func (e *DecompressionLimitError) Error() string + func (e *DecompressionLimitError) Unwrap() error + type Entity struct + Latitude *float64 + Longitude *float64 + func (e Entity) GetDistanceFrom(other Positioned) (float64, error) + func (e Entity) Position() (*float64, *float64) + type Flight struct + AircraftCode string + AirlineIATA string + AirlineICAO string + Altitude *float64 + Callsign string + DestinationAirportIATA string + Details *FlightDetails + GroundSpeed *float64 + Heading *float64 + ICAO24Bit string + ID string + Number string + OnGround *float64 + OriginAirportIATA string + Registration string + Squawk string + Time *int64 + VerticalSpeed *float64 + func NewFlight(flightID string, info []any) *Flight + func (f *Flight) CheckInfo(criteria map[string]any) (bool, error) + func (f *Flight) GetAltitude() string + func (f *Flight) GetFlightLevel() string + func (f *Flight) GetGroundSpeed() string + func (f *Flight) GetHeading() string + func (f *Flight) GetVerticalSpeed() string + func (f *Flight) SetFlightDetails(flightDetails map[string]any) + func (f *Flight) String() string + type FlightDetails struct + AircraftAge string + AircraftCountryID *float64 + AircraftHistory []any + AircraftImages any + AircraftModel string + AirlineName string + AirlineShortName string + DestinationAirportAltitude *float64 + DestinationAirportBaggage string + DestinationAirportCountryCode string + DestinationAirportCountryName string + DestinationAirportGate string + DestinationAirportICAO string + DestinationAirportLatitude *float64 + DestinationAirportLongitude *float64 + DestinationAirportName string + DestinationAirportTerminal string + DestinationAirportTimezoneAbbr string + DestinationAirportTimezoneAbbrName string + DestinationAirportTimezoneName string + DestinationAirportTimezoneOffset *float64 + DestinationAirportTimezoneOffsetHours string + DestinationAirportVisible *bool + DestinationAirportWebsite string + OriginAirportAltitude *float64 + OriginAirportBaggage string + OriginAirportCountryCode string + OriginAirportCountryName string + OriginAirportGate string + OriginAirportICAO string + OriginAirportLatitude *float64 + OriginAirportLongitude *float64 + OriginAirportName string + OriginAirportTerminal string + OriginAirportTimezoneAbbr string + OriginAirportTimezoneAbbrName string + OriginAirportTimezoneName string + OriginAirportTimezoneOffset *float64 + OriginAirportTimezoneOffsetHours string + OriginAirportVisible *bool + OriginAirportWebsite string + Raw map[string]any + StatusIcon string + StatusText string + TimeDetails map[string]any + Trail []any + type FlightSearch struct + AircraftType string + Airline string + Bounds string + Details bool + Registration string + type FlightTrackerConfig struct + ADSB string + Air string + Estimated string + FAA string + FLARM string + GND string + Gliders string + Limit string + MLAT string + MaxAge string + Satellite string + Stats string + Vehicles string + func NewFlightTrackerConfig() FlightTrackerConfig + func (c FlightTrackerConfig) Values() url.Values + type Image struct + Data []byte + Extension string + type LoginError struct + Message string + func (e *LoginError) Error() string + func (e *LoginError) Unwrap() error + type Options struct + HTTPClient *http.Client + MaxWorkers int + Retry *RetryPolicy + TLSProfile *TLSProfile + Timeout time.Duration + type Positioned interface + Position func() (latitude, longitude *float64) + type Response struct + Body []byte + Cookies map[string]string + Header http.Header + Status string + StatusCode int + URL string + func (r *Response) IsJSON() bool + func (r *Response) JSON() (map[string]any, error) + func (r *Response) Text() string + type RetryPolicy struct + BaseDelay time.Duration + Jitter time.Duration + MaxAttempts int + MaxDelay time.Duration + func NewRetryPolicy(maxAttempts int) (*RetryPolicy, error) + func (p *RetryPolicy) SleepFor(attemptIndex int) time.Duration + type StatusError struct + Body []byte + Status string + StatusCode int + URL string + func (e *StatusError) Error() string + func (e *StatusError) Unwrap() error + type TLSProfile struct + CipherSuites []uint16 + CurvePreferences []tls.CurveID + MaxVersion uint16 + MinVersion uint16 + func Chrome136Profile() TLSProfile + type Zone struct + BRX float64 + BRY float64 + Subzones map[string]Zone + TLX float64 + TLY float64