npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@datafire/lufthansa_public

v6.0.0

Published

DataFire integration for LH Public API

Downloads

2

Readme

@datafire/lufthansa_public

Client library for LH Public API

Installation and Usage

npm install --save @datafire/lufthansa_public
let lufthansa_public = require('@datafire/lufthansa_public').create({
  access_token: "",
  refresh_token: "",
  client_id: "",
  client_secret: "",
  redirect_uri: ""
});

.then(data => {
  console.log(data);
});

Description

Actions

oauthCallback

Exchange the code passed to your redirect URI for an access_token

lufthansa_public.oauthCallback({
  "code": ""
}, context)

Input

  • input object
    • code required string

Output

  • output object
    • access_token string
    • refresh_token string
    • token_type string
    • scope string
    • expiration string

oauthRefresh

Exchange a refresh_token for an access_token

lufthansa_public.oauthRefresh(null, context)

Input

This action has no parameters

Output

  • output object
    • access_token string
    • refresh_token string
    • token_type string
    • scope string
    • expiration string

CargoGetRouteFromDateProductCodeByOriginAndDestinationGet

Retrieve a list of all possible flights (both direct and connecting) between two airports on a given date. Routes are available for today and up to days in the future.

lufthansa_public.CargoGetRouteFromDateProductCodeByOriginAndDestinationGet({
  "origin": "",
  "destination": "",
  "fromDate": "",
  "productCode": "",
  "Accept": ""
}, context)

Input

  • input object
    • origin required string: Departure Airport : 3-letter IATA airport code, e.g. FRA.
    • destination required string: Arrival airport : 3-letter IATA airport code, e.g. HKG.
    • fromDate required string: Departure date in the local time of the departure airport. Based on LAT (Latest Acceptance Time). format : yyyy-MM-dd eg : 2017-07-15
    • productCode required string (values: FAN, FCO, FCP, FDG, FTF, FUN, FWN, YCO, YCP, YDG, YNB, YNZ, YTF, YUN, ZXB, ZXF, ZXR): Product code for requested service and specials : 3-letter eg: YNZ
    • Accept required string: http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")

Output

  • output object

CargoShipmentTrackingByAWBPrefixAndAWBNumberGet

With this tracking service you can easily retrieve your shipment or flight status information.

lufthansa_public.CargoShipmentTrackingByAWBPrefixAndAWBNumberGet({
  "aWBPrefix": "",
  "aWBNumber": "",
  "Accept": ""
}, context)

Input

  • input object
    • aWBPrefix required string: aWBPrefix : Represents the airline that is the owner of this AWB, i.e. "020" = Lufthansa Cargo, format : [0-9]{3} e.g. 020
    • aWBNumber required string: aWBNumber : The Air Waybill Number , format : [0-9]{8} e.g. 08002050
    • Accept required string: http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")

Output

  • output object

OffersLoungesByLocationGet

Lounge information

lufthansa_public.OffersLoungesByLocationGet({
  "location": "",
  "Accept": ""
}, context)

Input

  • input object
    • location required string: 3-leter IATA airport or city code (e.g. 'ZRH')
    • Accept required string: http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")
    • cabinClass string: Cabin class: 'M', 'E', 'C', 'F' (Acceptable values are: "", "M", "E", "C", "F")
    • tierCode string: Frequent flyer level ('FTL', 'SGC', 'SEN', 'HON') (Acceptable values are: "", "FTL", "SGC", "SEN", "HON")
    • lang string: Language code.

Output

  • output object

OffersSeatmapsDestinationDateCabinClassByFlightNumberAndOriginGet

Cabin layout and seat characteristics.

lufthansa_public.OffersSeatmapsDestinationDateCabinClassByFlightNumberAndOriginGet({
  "flightNumber": "",
  "origin": "",
  "destination": "",
  "date": "",
  "cabinClass": "",
  "Accept": ""
}, context)

Input

  • input object
    • flightNumber required string: Flight number including carrier code and any suffix (e.g. 'LH2037')
    • origin required string: Departure airport. 3-letter IATA airport code (e.g. 'TXL')
    • destination required string: Destination airport. 3-letter IATA airport code (e.g. 'MUC')
    • date required string: Departure date (YYYY-MM-DD)
    • cabinClass required string: Cabin class: 'M', 'E', 'C', 'F'. Some flights have fewer classes (Acceptable values are: "M", "E", "C", "F")
    • Accept required string: http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")

Output

  • output object

OperationsFlightstatusArrivalsByAirportCodeAndFromDateTimeGet

Status of all arrivals at a given airport up to 4 hours from the provided date time.

lufthansa_public.OperationsFlightstatusArrivalsByAirportCodeAndFromDateTimeGet({
  "airportCode": "",
  "fromDateTime": "",
  "Accept": ""
}, context)

Input

  • input object
    • airportCode required string: 3-letter IATA aiport code (e.g. 'ZRH')
    • fromDateTime required string: Start of time range in local time of arrival airport (YYYY-MM-DDTHH:mm)
    • Accept required string: http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")
    • limit string: Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken)
    • offset string: Number of records skipped. Defaults to 0

Output

  • output object

OperationsFlightstatusDeparturesByAirportCodeAndFromDateTimeGet

Status of all departures from a given airport up to 4 hours from the provided date time.

lufthansa_public.OperationsFlightstatusDeparturesByAirportCodeAndFromDateTimeGet({
  "airportCode": "",
  "fromDateTime": "",
  "Accept": ""
}, context)

Input

  • input object
    • airportCode required string: Departure airport. 3-letter IATA airport code (e.g. 'HAM')
    • fromDateTime required string: Start of time range in local time of departure airport (YYYY-MM-DDTHH:mm)
    • Accept required string: http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")
    • limit string: Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken)
    • offset string: Number of records skipped. Defaults to 0

Output

  • output object

OperationsFlightstatusRouteDateByOriginAndDestinationGet

Status of flights between a given origin and destination on a given date.

lufthansa_public.OperationsFlightstatusRouteDateByOriginAndDestinationGet({
  "origin": "",
  "destination": "",
  "date": "",
  "Accept": ""
}, context)

Input

  • input object
    • origin required string: 3-letter IATA airport (e.g. 'FRA')
    • destination required string: 3-letter IATA airport code (e.g. 'JFK')
    • date required string: Departure date (YYYY-MM-DD) in local time of departure airport
    • Accept required string: http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")
    • limit string: Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken)
    • offset string: Number of records skipped. Defaults to 0

Output

  • output object

OperationsFlightstatusByFlightNumberAndDateGet

Status of a particular flight (boarding, delayed, etc.).

lufthansa_public.OperationsFlightstatusByFlightNumberAndDateGet({
  "flightNumber": "",
  "date": "",
  "Accept": ""
}, context)

Input

  • input object
    • flightNumber required string: Flight number including carrier code and any suffix (e.g. 'LH400')
    • date required string: The departure date (YYYY-MM-DD) in the local time of the departure airport
    • Accept required string: http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")
    • limit string: Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken)
    • offset string: Number of records skipped. Defaults to 0

Output

  • output object

OperationsSchedulesFromDateTimeByOriginAndDestinationGet

Scheduled flights between given airports on a given date.

lufthansa_public.OperationsSchedulesFromDateTimeByOriginAndDestinationGet({
  "origin": "",
  "destination": "",
  "fromDateTime": "",
  "Accept": ""
}, context)

Input

  • input object
    • origin required string: Departure airport. 3-letter IATA airport code (e.g. 'ZRH')
    • destination required string: Destination airport. 3-letter IATA airport code (e.g. 'FRA')
    • fromDateTime required string: Local departure date and optionally departure time (YYYY-MM-DD or YYYY-MM-DDTHH:mm). When not provided, time is assumed to be 00:01
    • Accept required string: http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")
    • directFlights boolean: Show only direct flights (false=0, true=1). Default is false
    • limit string: Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken)
    • offset string: Number of records skipped. Defaults to 0

Output

  • output object

ReferencesAircraftByAircraftCodeGet

List all aircraft types or one specific aircraft type.

lufthansa_public.ReferencesAircraftByAircraftCodeGet({
  "Accept": "",
  "aircraftCode": ""
}, context)

Input

  • input object
    • Accept required string: http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")
    • aircraftCode required string: 3-character IATA aircraft code
    • limit string: Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken)
    • offset string: Number of records skipped. Defaults to 0

Output

  • output object

ReferencesAirlinesByAirlineCodeGet

List all airlines or one specific airline.

lufthansa_public.ReferencesAirlinesByAirlineCodeGet({
  "Accept": "",
  "airlineCode": ""
}, context)

Input

  • input object
    • Accept required string: http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")
    • airlineCode required string: 2-character IATA airline/carrier code
    • limit string: Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken)
    • offset string: Number of records skipped. Defaults to 0

Output

  • output object

ReferencesAirportsNearestByLatitudeAndLongitudeGet

List the 5 closest airports to the given latitude and longitude, irrespective of the radius of the reference point.

lufthansa_public.ReferencesAirportsNearestByLatitudeAndLongitudeGet({
  "latitude": 0,
  "longitude": 0,
  "Accept": ""
}, context)

Input

  • input object
    • latitude required integer: Latitude in decimal format to at most 3 decimal places
    • longitude required integer: Longitude in decimal format to at most 3 decimal places
    • Accept required string: http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")
    • lang string: 2 letter ISO 3166-1 language code

Output

  • output object

ReferencesAirportsByAirportCodeGet

List all airports or one specific airport. All airports response is very large. It is possible to request the response in a specific language.

lufthansa_public.ReferencesAirportsByAirportCodeGet({
  "Accept": "",
  "airportCode": ""
}, context)

Input

  • input object
    • Accept required string: http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")
    • airportCode required string: 3-letter IATA airport code
    • lang string: 2-letter ISO 3166-1 language code
    • limit string: Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken)
    • offset string: Number of records skipped. Defaults to 0
    • LHoperated boolean: Restrict the results to locations with flights operated by LH (false=0, true=1)

Output

ReferencesCitiesByCityCodeGet

List all cities or one specific city. It is possible to request the response in a specific language.

lufthansa_public.ReferencesCitiesByCityCodeGet({
  "Accept": "",
  "cityCode": ""
}, context)

Input

  • input object
    • Accept required string: http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")
    • cityCode required string: 3-letter IATA city code
    • lang string: 2 letter ISO 3166-1 language code
    • limit string: Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken)
    • offset string: Number of records skipped. Defaults to 0

Output

  • output object

ReferencesCountriesByCountryCodeGet

List all countries or one specific country. It is possible to request the response in a specific language.

lufthansa_public.ReferencesCountriesByCountryCodeGet({
  "Accept": "",
  "countryCode": ""
}, context)

Input

  • input object
    • Accept required string: http header: application/json or application/xml (Acceptable values are: "application/json", "application/xml")
    • countryCode required string: 2-letter ISO 3166-1 country code
    • lang string: 2 letter ISO 3166-1 language code
    • limit string: Number of records returned per request. Defaults to 20, maximum is 100 (if a value bigger than 100 is given, 100 will be taken)
    • offset string: Number of records skipped. Defaults to 0

Output

  • output object

Definitions

Airport

  • Airport object: Array of all available airports or one airport matching the request.
    • AirportCode string: 3-letter IATA airport code, e.g. “TXL”.
    • CityCode string: 3-letter IATA city code, e.g. “BER”.
    • CountryCode string: 2-letter ISO 3166-1 country code, e.g. “DE”.
    • LocationType string: “Airport”, “RailwayStation” or “BusStation”.
    • Names object: Container for airport names.
      • Name array: Array: language specific full name of airport.
    • Position object: Physical location of an airport. This data section is optional and therefore not always present.
    • TimeZoneId string: Time zone name airport is in
    • UtcOffset number: Hour offset of airport to UTC time zone

AirportResource

  • AirportResource object: Root element of airport response.
    • Airports object: Container for airport elements.
    • Meta object: Container for meta links.
      • @Version string
      • Link array: Array: links to resource itself and other related resources.
      • TotalCount integer

AirportResponse

Coordinate

  • Coordinate object: Container for coordinates.
    • Latitude number: Decimal latitude. Range: -90 (South Pole) to +90 (North Pole), e.g. “51.540”.
    • Longitude number: Decimal longitude. Range: -180 (West of Prime Meridian) to +180 (East of Prime Meridian).

Link

  • Link object
    • @Href string: Link to actual a resource.
    • @Rel string: Specifying kind of link such as ‘self’ (link that returned this response), ‘alternate’ (link that points to another resource) or ‘related’ (link that points to related resource).

Name

  • Name object: 2-letter ISO 639-1 language code for the corresponding item.
    • $ string
    • @LanguageCode string