Source code: source/airports/
Retrieves a list of all active airports.
Returns: Promise<Airport[]>
import { airports } from '@2bad/ryanair'
const airports = await airports.getActive()
Retrieves a list of all active airports.
Returns: Promise<AirportV3[]>
import { airports } from '@2bad/ryanair'
const airports = await airports.getActiveV3()
Returns information about the closest airport based on the user's IP address.
Returns: Promise<AirportShort>
import { airports } from '@2bad/ryanair'
const airport = await airports.getClosest()
Returns a list of available destinations from an airport.
- code: IataCode - The IATA code of the airport.
Returns: Promise<Destination[]>
import { airports } from '@2bad/ryanair'
const destinations = await airports.getDestinations('BER')
Returns information about an airport.
code: IataCode - The IATA code of the airport.
Returns: Promise<Airport>
import { airports } from '@2bad/ryanair'
const info = await airports.getInfo('BER')
Returns information about the nearby airports based on the user's IP address.
Returns: Promise<AirportShort[]>
import { airports } from '@2bad/ryanair'
const airports = await airports.getNearby()
Returns a list of available flight schedules departing from an airport.
Returns: Promise<Schedules>
import { airports } from '@2bad/ryanair'
const schedules = await airports.getSchedules()
Finds available routes between two airports.
from: IataCode - The departure airport IATA code. to: IataCode - The arrival airport IATA code.
Returns: Promise<IataCode[][]>
import { airports } from '@2bad/ryanair'
const routes = await airports.findRoutes('BER', 'GDN') // [["BER", "AGP", "GDN"], [ "BER", "ALC", "GDN",], ...]