nathanhosselton / DadKit

The network+model layer for the http://raiddad.com native iOS app: https://apps.apple.com/us/app/raid-dad/id1441280856
13 stars 0 forks source link

Flesh out request API with relevant failure errors #7

Open nathanhosselton opened 5 years ago

nathanhosselton commented 5 years ago

So can do things like

firstly {
    Bungie.searchForClan(named: "Meow Pew Pew")
}.then { clan in
    Bungie.getClanMembers(in: clan)
}.done { members in
    //…
}.catch { error in
    switch error {
    case Bungie.Error.clanNotFound:
        //e.g. bounce the search bar
    default:
        //show generic message
    }
}