Created
April 9, 2014 01:32
-
-
Save modocache/10217269 to your computer and use it in GitHub Desktop.
This file contains 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
#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