Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
@protocol AGResponse <NSObject>
// Array of unmarshaled objects
@property (readonly, nonatomic) NSArray* objects;
@property (readonly, nonatomic) BOOL hasPrevious;
@property (readonly, nonatomic) BOOL hasNext;
-(void)next:(void (^)(id<AGResponse> response))success failure:(void (^)(NSError *error))failure;
-(void)previous:(void (^)(id<AGResponse> response))success failure:(void (^)(NSError *error))failure;
[pipe read:^(id<AGResponse> response) {
if(response.hasNext) {
[response next:^(id<AGResponse> response) {
} failure:^(NSError* error) {
} failure:^(NSError* error) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment