Swiftpack.co - sqeezelemon/SwiftyLiveApi as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by sqeezelemon.
sqeezelemon/SwiftyLiveApi 3.1.0
A Swifty client for Infinite Flight Live API
⭐️ 6
🕓 1 year ago
iOS macOS tvOS
.package(url: "https://github.com/sqeezelemon/SwiftyLiveApi.git", from: "3.1.0")

SwiftyLiveAPI

SwiftyLiveApi is a wrapper around Infinite Flight Live API.

Usage

The package is available for following platforms:

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

Live API Docs

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()

Running tests

In order for tests to work, please insert your Live API key into Tests/SwiftyLiveApiTests/apikey.txt, without any preceding whitespace. After that, the tests should run with your API key. To ignore changes to the file to avoid accidentally pushing your API key, use this command:

git update-index --skip-worktree Tests/SwiftyLiveApiTests/apikey.txt

Reporting bugs

If you encounter a bug, please file an issue with the reproduction steps and/or the json or request that caused problems.

Contacts

@sqeezelemon on IFC

GitHub

link
Stars: 6
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

3.1 - The edgy one
1 year ago

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)

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics