The impl code:
-(void) read:(id)value success:(void (^)(id responseObject))success failure:(void (^)(NSError *error))failure { if (value == nil || [value isKindOfClass:[NSNull class]]) { [self raiseError:@"read" msg:@"read id value was nil" failure:failure]; // do nothing return; } // try to add auth.token: [self applyAuthToken]; // TODO: move to function: NSString* objectKey; if ([value isKindOfClass:[NSString class]]) { objectKey = value; } else { objectKey = [value stringValue]; } [_restClient getPath:[self appendObjectPath:objectKey] parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) { if (success) { //TODO: NSLog(@"Invoking successblock...."); success(responseObject); } } failure:^(AFHTTPRequestOperation *operation, NSError *error) { if (failure) { //TODO: NSLog(@"Invoking failure block...."); failure(error); } }]; }
More todo:
[_tasks read:@"72" success:^(id responseObject) {........
[_tasks read:@72 success:^(id responseObject) {........
The impl code:
More todo:
[_tasks read:@"72" success:^(id responseObject) {........