Swiftpack.co - nathanhosselton/DadKit as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by nathanhosselton.
nathanhosselton/DadKit 0.9.1
The network+model layer for the http://raiddad.com native iOS app: https://apps.apple.com/us/app/raid-dad/id1441280856
⭐️ 13
🕓 3 years ago
iOS
.package(url: "https://github.com/nathanhosselton/DadKit.git", from: "0.9.1")

DadKit

The complete documentation for the public APIs of the DadKit framework which backs the Raid Dad iOS app.

Carthage

github "nathanhosselton/DadKit" ~> 0.9

Update and build with carthage then add the frameworks to the Xcode project.

Configuring Project

import DadKit and ensure Bungie.key, Bungie.appId, and Bungie.appVersion are set before executing any requests.

Making Requests

DadKit uses PromiseKit to return a Promise from each API request instead of taking a completion handler. For instance:

import PromiseKit
import DadKit

firstly {
    Bungie.searchForClan(named: "Meow Pew Pew")
}.then { clan in
    Bungie.getMembers(in: clan)
}.done { members in
    //e.g. display the members in a list
}.catch { error in
    //handle or display any error that may occur throughout the chain
}

GitHub

link
Stars: 13
Last commit: 3 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Dependencies

Release Notes

Stasis Fixes, Bungie APIs with OAuth Support
3 years ago

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