Skip to content
anomaddevPublic

About

This library will connect any iOS or web app to the FlightAware AeroAPI

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

AeroAPI

Monorepo for native FlightAware AeroAPI libraries.

Package Path Runtime
Swift package AeroAPI packages/aeroapi-swift iOS 15 and macOS 11
npm package aeroapi packages/aeroapi-web Browsers and Node.js 18+

Package.swift stays at the repository root so Swift Package Manager and Xcode can add this repository as the iOS library. The sample iOS app is in apps/ios-demo.

Swift

dependencies: [
    .package(url: "https://github.com/anomaddev/AeroAPI.git", from: "0.5.0")
]
AeroAPI.manager.set(apiKey: "api-key-goes-here")

The Swift package depends on NomadUtilities 0.1.0+, resolved by Swift Package Manager. See packages/aeroapi-swift/README.md for the endpoint list.

Web

npm install aeroapi@0.5.0

From a checkout of this repository:

npm install
npm test
npm run build
import { AeroAPI, FlightDataRequest } from "aeroapi";

AeroAPI.manager.setApiKey(process.env.AEROAPI_KEY ?? "");
const flight = await AeroAPI.manager.getFlightData("UAL1-1700000000-fa-1");
const page = await AeroAPI.manager.getFlightData(
  FlightDataRequest.ident({ ident: "UAL1", type: "designator" }),
);

The web client uses the Swift method names (getFlightData, getAirportInfo, getMap, and the rest of the async surface). It calls https://aeroapi.flightaware.com/aeroapi with the x-apikey header. Details are in packages/aeroapi-web/README.md.

Documentation

The Swift reference is the Jazzy site in docs/. The HTTP contract both clients call is an OpenAPI document rendered with Redoc:

Pages publishes the whole docs/ directory from GitHub Actions (.github/workflows/pages.yml). In the repository settings, set Pages source to GitHub Actions once. The workflow cannot turn that setting on.

Licensed under the MIT license. See LICENSE.

About

This library will connect any iOS or web app to the FlightAware AeroAPI

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages