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.0.0
Infinite Flight LiveAPI, made swimple
⭐️ 4
🕓 3 days ago
iOS macOS tvOS
.package(url: "https://github.com/sqeezelemon/SwiftyLiveApi.git", from: "3.0.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: 4
Last commit: 3 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

3.0 - New world, new SwiftyLiveApi
3 days ago

Complete overhaul of SwiftyLiveApi, see README and docs for more info.

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