Last active
December 15, 2015 17:09
-
-
Save ashfurrow/5294706 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.gitHubCommand = [RACCommand command]; | |
self.gitHubSignal = [self.gitHubCommand addSignalBlock:^RACSignal *(id value) { | |
RACReplaySubject *subject = [RACReplaySubject subject]; | |
[engine teamsInOrganization:@"TeehanLax" withSuccess:^(id result) { | |
for (NSDictionary *team in result) | |
{ | |
[subject sendNext:team]; | |
} | |
} failure:^(NSError *error) { | |
[subject sendError:error]; | |
}]; | |
return subject; | |
}]; | |
[[self.gitHubSignal filter:^BOOL(id x) { | |
NSLog(@"%@", x); // Why is this not what I'm sending in sendNext:? | |
return YES; | |
// NSString *teamName = [team valueForKey:@"name"]; | |
// return [teamName isEqualToString:@"General"]; | |
}] subscribeNext:^(NSDictionary *team) { | |
NSInteger teamID = [[team valueForKey:@"id"] intValue]; | |
NSLog(@"Team ID: %lu", teamID); | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment