Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 531 Bytes

ReactiveCocoa.md

File metadata and controls

24 lines (20 loc) · 531 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) -> Void in
    switch event {
    case .next(let response):
        // do something with the data
    case .failed(let error):
        // handle the error
    default:
        break
    }
}