buildasaurs / XcodeServerSDK

Access Xcode Server API with native Swift objects.
MIT License
399 stars 30 forks source link

[WIP]: Added ReactiveCocoa-fied API Calls #106

Closed czechboy0 closed 8 years ago

czechboy0 commented 8 years ago

Now all public API calls can be asked for a SignalProducer instead of just calling it immediately and passing a completion block.

Example

When getting the names of your bots, in addition to the existing call

server.getBots { (bots, error) -> ()
    if let bots = bots {
        print("My Bots: \(bots.map { $0.name })")
    }
}

you can instead call

server.getBots()
.map { $0.name }
.start(Event.sink(
                error: { print("Error: \($0)") },
                next: { print("My Bots Names: \($0)") }
            ))

Waiting For

cojoj commented 8 years ago

@czechboy0 example you've provided doesn't look like RAC can bring something better 😜 We need to find more hardcore example 😁

buildasaur commented 8 years ago

Result of Integration 1

Duration: 1 minute and 38 seconds Result: Perfect build! All 73 tests passed. :+1: Test Coverage: 54%.

buildasaur commented 8 years ago

Result of Integration 1

Duration: 1 minute and 59 seconds Result: 8 errors, failing state: build-errors

buildasaur commented 8 years ago

Result of Integration 2

Duration: 2 minutes and 16 seconds Result: 1 error, failing state: build-errors

buildasaur commented 8 years ago

Result of Integration 1

Duration: 2 minutes and 29 seconds Result: 3 errors, failing state: build-errors