Introduced named route support. refs #779

* Provides for the registration of route either by class and method or via symbolic name
* Changed routes representation from simple dictionary to RKRoute model
* Eliminated RKRouter as a protocol
* Migrated RKObjectRouter to Network layer and renamed to RKRouter
* Added router as property of RKClient, RKObjectManager now proxies access
This commit is contained in:
Blake Watters
2012-05-31 17:46:55 -04:00
parent 81bcd17056
commit ffa2fc685e
17 changed files with 874 additions and 526 deletions

View File

@@ -20,7 +20,7 @@
#import "Network.h"
#import "RKObjectLoader.h"
#import "RKObjectRouter.h"
#import "RKRouter.h"
#import "RKObjectMappingProvider.h"
#import "RKConfigurationDelegate.h"
#import "RKObjectPaginator.h"
@@ -225,7 +225,7 @@ typedef enum {
Router object responsible for generating resource paths for
HTTP requests
*/
@property (nonatomic, retain) RKObjectRouter *router;
@property (nonatomic, retain) RKRouter *router;
/**
A Core Data backed object store for persisting objects that have been fetched from the Web
@@ -298,10 +298,12 @@ typedef enum {
@param object The object with which to initialize the object loader.
@return The newly created object loader instance.
@see RKObjectLoader
@see RKObjectRouter
@see RKRouter
*/
- (id)loaderForObject:(id<NSObject>)object method:(RKRequestMethod)method;
// TODO: loaderForRoute || loaderWithRoute: ???
/**
Creates and returns an RKObjectPaginator instance targeting the specified resource path pattern.