Initial implementation of RKObjectPaginator

This commit is contained in:
Blake Watters
2012-01-04 23:36:53 -05:00
parent d0b859484e
commit 254553dc7c
18 changed files with 860 additions and 73 deletions

View File

@@ -22,7 +22,9 @@
@implementation RKObjectMappingProvider
+ (RKObjectMappingProvider *)objectMappingProvider {
@synthesize paginationMapping;
+ (RKObjectMappingProvider *)mappingProvider {
return [[self new] autorelease];
}
@@ -99,10 +101,22 @@
return ([objectMappings count] > 0) ? [objectMappings objectAtIndex:0] : nil;
}
- (void)addErrorMapping:(RKObjectMapping *)errorMapping {
[_errorMappings addObject:errorMapping];
}
- (void)removeErrorMapping:(RKObjectMapping *)errorMapping {
[_errorMappings removeObject:errorMapping];
}
- (NSArray *)errorMappings {
return [_errorMappings copy];
}
#pragma mark - Aliases
+ (RKObjectMappingProvider *)mappingProvider {
return [self objectMappingProvider];
+ (RKObjectMappingProvider *)objectMappingProvider {
return [self mappingProvider];
}
- (RKObjectMapping *)mappingForKeyPath:(NSString *)keyPath {