Skip to content

nathanhosselton/DadKit

Repository files navigation

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
}