Swiftpack.co -  nikitikinikitin/SwiftyLiveApi as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
nikitikinikitin/SwiftyLiveApi
A simple pure Swift client for everything the Infinite Flight Live API can offer.
.package(url: "https://github.com/nikitikinikitin/SwiftyLiveApi.git", from: "2.1.0")

SwiftyLiveApi

SwiftyLiveApi is a simple package to work with Infinite Flight Live API. It features support for all available endpoints, safety mechanisms against exceeding request limits, Live API error types, beautiful documentation right in XCode and support up to Swift 3.

Usage

Setup is as easy as initializing an instance of LiveApiClient with your API key. If needed, you can set the requestLimitPerMinute value both in the initializer and later as just a value of the class. Please remember that just like on the road, unless you know what you're doing you shouldn't go over 100. Results have different extensions which transform stuff like Int frequency type into a nice enum. For your convenience, all functions are named almost exactly as the pages on them in the User Guide.

Reporting bugs

I tested it on random flights from expert server to the point I didn't get errors, but I could have easily missed an optional somewhere or misspelled a value. If you stumble upon something, just PM me your problem and a copy of the JSON response that causes problems on Discord or IFC.

GitHub

link
Stars: 3
Last commit: 20 hours ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

2.1.0
20 hours ago

New

  • Convenience functions which use a LiveServer case instead of a String to get the serverId
  • Optional validation for getUserStats
  • Setter for LiveServer.id
  • LiveApiClientError now has an errorDescription

Changed

  • LiveApiError is now LiveApiClient.LiveApiError. You will be prompted by XCode to update it upon update, but it will work fine without it.
  • LiveApiClientError was moved to LiveApiJsonTypes.swift. This change should be unnoticeable to the end user.

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