Closed Janrin closed 5 years ago
Code: OCTUser user = [OCTUser userWithRawLogin:@"Janrin" server:OCTServer.dotComServer]; OCTClient client = [OCTClient unauthenticatedClientWithUser:user]; RACSignal request = [client fetchUserRepositories]; [request subscribeNext:^(OCTRepository repository) { NSLog(@"%@", repository.name); } error:^(NSError *error) { NSLog(@"%@", error); } completed:^{ NSLog(@"done....."); }];
Console Log: 2015-08-22 14:58:27.467 Example[5234:471735] Error Domain=OCTClientErrorDomain Code=668 "Not Found" UserInfo=0x7ff872c685a0 {NSLocalizedDescription=Not Found, OCTClientErrorHTTPStatusCodeKey=404, OCTClientErrorRequestURLKey=https://api.github.com/users/(null)/repos?per_page=100, NSUnderlyingError=0x7ff872d29bb0 "Expected status code in (200-299,304), got 404"}
Huh, that does indeed look like a bug.
+userWithRawLogin:server: should (probably?) set the login as well.
+userWithRawLogin:server:
login
Was this resolved ? I'm kinda experiencing the same issue ...
Code: OCTUser user = [OCTUser userWithRawLogin:@"Janrin" server:OCTServer.dotComServer]; OCTClient client = [OCTClient unauthenticatedClientWithUser:user]; RACSignal request = [client fetchUserRepositories]; [request subscribeNext:^(OCTRepository repository) { NSLog(@"%@", repository.name); } error:^(NSError *error) { NSLog(@"%@", error); } completed:^{ NSLog(@"done....."); }];
Console Log: 2015-08-22 14:58:27.467 Example[5234:471735] Error Domain=OCTClientErrorDomain Code=668 "Not Found" UserInfo=0x7ff872c685a0 {NSLocalizedDescription=Not Found, OCTClientErrorHTTPStatusCodeKey=404, OCTClientErrorRequestURLKey=https://api.github.com/users/(null)/repos?per_page=100, NSUnderlyingError=0x7ff872d29bb0 "Expected status code in (200-299,304), got 404"}