Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 500 Bytes

ReactiveCocoa.md

File metadata and controls

23 lines (19 loc) · 500 Bytes

ReactiveCocoa examples

A ReactiveCocoaMoyaProvider can be created much like a MoyaProvider and can be used as follows:

let GitHubProvider = ReactiveCocoaMoyaProvider<GitHub>()

After that simple setup, you're off to the races:

provider.request(.zen).start { event in
    switch event {
    case .next(let response):
        // do something with the data
    case .failed(let error):
        // handle the error
    default:
        break
    }
}