Skip to content

Instantly share code, notes, and snippets.

@modocache
Created April 9, 2014 01:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save modocache/10217269 to your computer and use it in GitHub Desktop.
Save modocache/10217269 to your computer and use it in GitHub Desktop.
#import "AppDelegate.h"
#import <OctoKit/OctoKit.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
OCTUser *user = [[OCTUser alloc] initWithDictionary:@{ @"login": @"modocache" } error:NULL];
OCTClient *client = [OCTClient unauthenticatedClientWithUser:user];
RACSignal *request = [client fetchUserRepositories];
[request subscribeNext:^(OCTRepository *repository) {
NSLog(@"Repository: %@", repository);
} error:^(NSError *error) {
NSLog(@"Error: %@", error);
} completed:^{
NSLog(@"Completed.");
}];
return YES;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment