mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-03-30 17:43:22 +08:00
Merge branch 'master' of git://github.com/twotoasters/RestKit
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
#import "RKObjectSeeder.h"
|
||||
#import "RKManagedObjectStore.h"
|
||||
|
||||
@implementation RKObjectSeeder
|
||||
|
||||
|
||||
@@ -106,9 +106,8 @@ static RKObjectManager* globalManager = nil;
|
||||
return nil;
|
||||
}
|
||||
|
||||
NSURL* URL = [self.client URLForResourcePath:resourcePath];
|
||||
RKRequest* request = [[[RKRequest alloc] initWithURL:URL] autorelease];
|
||||
[self.client setupRequest:request];
|
||||
// Grab request through client to get HTTP AUTH & Headers
|
||||
RKRequest* request = [self.client requestWithResourcePath:resourcePath delegate:nil callback:nil];
|
||||
RKObjectLoader* loader = [RKObjectLoader loaderWithMapper:self.mapper request:request delegate:delegate];
|
||||
loader.objectClass = objectClass;
|
||||
|
||||
|
||||
@@ -103,9 +103,10 @@ typedef enum {
|
||||
// Non-element based object mapping
|
||||
|
||||
/**
|
||||
* Map the objects in a given payload string to a particular object class
|
||||
* Map the objects in a given payload string to a particular object class, optionally filtering
|
||||
* the parsed result set via a keyPath before mapping the results.
|
||||
*/
|
||||
- (id)mapFromString:(NSString *)string toClass:(Class)class;
|
||||
- (id)mapFromString:(NSString *)string toClass:(Class)class keyPath:(NSString*)keyPath;
|
||||
|
||||
/**
|
||||
* Map an array of object dictionary representations to instances of a particular
|
||||
|
||||
@@ -125,7 +125,7 @@ static const NSString* kRKModelMapperMappingFormatParserKey = @"RKMappingFormatP
|
||||
}
|
||||
|
||||
- (id)mapFromString:(NSString*)string {
|
||||
return [self mapFromString:string toClass:nil];
|
||||
return [self mapFromString:string toClass:nil keyPath:nil];
|
||||
}
|
||||
|
||||
- (void)mapObject:(id)model fromString:(NSString*)string {
|
||||
|
||||
Reference in New Issue
Block a user