Skip to content

Instantly share code, notes, and snippets.

@baz
Created March 13, 2015 17:46
Show Gist options
  • Save baz/b182d6563c108765ffea to your computer and use it in GitHub Desktop.
Save baz/b182d6563c108765ffea to your computer and use it in GitHub Desktop.
RAC dependent calls
RACSignal *signal = [[[[[SomeClient clientForAccount:account] enqueueHTTPRequestWithMethod:@"GET" path:path parameters:nil]
flattenMap:^(id responseObject) {
NSMutableArray *signals = [NSMutableArray array];
[signals addObject:[SomeClient fetchEditmetaForItems:[NSSet setWithObject:item] account:account]];
[signals addObject:[SomeClient fetchTransitionsForItem:item]];
return [signals.rac_sequence.signal flatten:1];
}]
then:^{
return [SomeClient resolveAllIssueLinksForItem:item];
}]
then:^{
return [SomeClient updateTimeLogsForItem:item];
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment