Commit Graph

9 Commits

Author SHA1 Message Date
Blake Watters
fcb973056b Cleanup trailing whitespace. refs #743 2012-05-17 18:00:16 -04:00
Blake Watters
457a6126cf Refresh copyright notices for all source files 2012-04-04 09:08:54 -04:00
Blake Watters
d456c37a20 Minor documentation cleanup for paginator 2012-02-16 10:48:24 -05:00
Blake Watters
d69adccdd6 Added block callback handlers and tests for RKObjectPaginator. 2012-01-20 10:21:56 -05:00
Blake Watters
6abbb34ef0 Introduced mapping contexts support.
Extended RKObjectMappingProvider to store collections of object mappings for different use cases. The framework
now stores object mappings, serialization mappings, an error mapping and a pagination mapping using the context
support. Contexts can be added to the provider via method calls or extension via a category.
2012-01-20 10:21:19 -05:00
Blake Watters
89b02e7550 Refactored paginator to use RKURL rather than relying on its own baseURL and resource path. Expanded paginator documentation. 2012-01-20 10:21:18 -05:00
Blake Watters
412b0f9756 Work in progress on cleanup 2012-01-20 10:21:18 -05:00
Ray Fix
3d03959d06 Polish RKObjectPaginator.
Initialization
I need the object paginator's object loaders to 
know about the various header settings of 
the RKClient when it constructs them.  However,
the paginator should not depend on an RKObjectManager.
The proposed solution is to pass a block that lets
an outsider custom configure the object loaders
that get created.  The object manager shows how
it is done.

Error Handling
We don't want to have a separate set of error handling
if using a paginator versus using an RKObjectLoader.
When an error is encountered, the paginator should 
allow access to the underlying RKObjectRequest that
produced the error.

Cleanup
The contained object loader needs to nil out the delegate
before going away.

NSLogs changed to RKLog

Pagination computation
The page count can be computed when the pagination 
parameters are mapped.  Note you must use the ceil
operation to compute this value.  If there are 3.1 pages
that means there are 4 pages.
2012-01-20 10:21:18 -05:00
Blake Watters
254553dc7c Initial implementation of RKObjectPaginator 2012-01-20 10:21:18 -05:00