SwiftyLiveApi - Live API for Swift

SwiftyLiveApi

SwiftyLiveAPI

SwiftyLiveApi is a simple, 100% Swift wrapper around Infinite Flight Live API.

Requirements

Platform Min. Version
iOS 10
TvOS 10
MacOS 10.12

Installation

This package is available with the Swift Package Manager in XCode.

To install it manually, insert this in your Package.swift:

.package(url: "https://github.com/sqeezelemon/SwiftyLiveApi.git", from: "3.0.0")

and then add it to your target, for example, like this:

.target(name: "YourTarget", dependencies: [
    .product(name: "SwiftyLiveApi", package: "SwiftyLiveApi")
],

Getting started

All SwiftyLiveApi types have a LA prefix, just like the big boy libraries.
To get started, import SwiftyConnectApi, create an instance of LAClient and get straight into coding.
The methods are named in accordance to their Developer Manual names. For example, the Get Sessions method becomes getSessions().
Some structures were changed and some variables were renamed for better uniformity and readability. In places where this might get confusing, variable aliases were added to help.

// 1) Import the package
import SwiftyLiveApi

// 2) Initialise the client
let client = LAClient("your api key")

// 3) Ready to rock!
let sessions = try client.getSessions()

GitHub

SwiftyLiveApi

17 Likes

3.1 - The edgy one

This release adds several endpoints undocumented in the User Guide, but that were mentioned by devs in the API changelogs on IFC.

Added:

  • Get Session
  • Get Session Flight
  • Get Aircraft (by aircraftId)
2 Likes