Inherits from NSObject
Conforms to RKRouter
Declared in RKDynamicRouter.h
RKDynamicRouter.m

Overview

An implementation of the RKRouter protocol that is suitable for use in either static or dynamic route generation. Static routes are added by simply encoding the resourcePath that the mappable object should be sent to when a GET, POST, PUT or DELETE action is invoked. Dynamic routes are available by encoding key paths into the resourcePath surrounded by parentheses (i.e. /users/(userID))

Tasks

Other Methods

  • – routeClass:toResourcePath:

    Register a mapping from an object class to a resource path. This resourcePath can be static (i.e. /this/is/the/path) or dynamic (i.e. /users/(userID)/(username)). Dynamic routes are evaluated against the object being routed using Key-Value coding and coerced into a string.

  • – routeClass:toResourcePath:forMethod:

    Register a mapping from an object class to a resource path for a specific HTTP method.

Other Methods

Other Methods

Instance Methods

resourcePathForObject:method:

Returns the resource path to send requests for a given object and HTTP method

- (NSString *)resourcePathForObject:(NSObject<RKObjectMappable> *)object method:(RKRequestMethod)method

Declared In

RKRouter.h

routeClass:toResourcePath:

Register a mapping from an object class to a resource path. This resourcePath can be static (i.e. /this/is/the/path) or dynamic (i.e. /users/(userID)/(username)). Dynamic routes are evaluated against the object being routed using Key-Value coding and coerced into a string.

- (void)routeClass:(Class<RKObjectMappable>)objectClass toResourcePath:(NSString *)resourcePath

Declared In

RKDynamicRouter.h

routeClass:toResourcePath:forMethod:

Register a mapping from an object class to a resource path for a specific HTTP method.

- (void)routeClass:(Class<RKObjectMappable>)objectClass toResourcePath:(NSString *)resourcePath forMethod:(RKRequestMethod)method

Declared In

RKDynamicRouter.h

serializationForObject:method:

- (NSObject<RKRequestSerializable> *)serializationForObject:(NSObject<RKObjectMappable> *)object method:(RKRequestMethod)method

Declared In

RKRouter.h