Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9265769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:09:28+00:00 2026-06-18T14:09:28+00:00

how can I use the RKPaginator with a custom page paramter? My API doesn’t

  • 0

how can I use the “RKPaginator” with a custom “page paramter? My API doesn’t provide a “page” param, it uses a pattern like this for pagination:

“http://my.domain.com/api/lists/?limit=5&offset=10”

“offset” is the param for the next page.

The JSON return form my API looks like this:

"meta": {
    "next": "/api/lists/?limit=5&offset=15",
    "total_count": 22,
    "previous": "/api/lists/?limit=5&offset=5",
    "limit": 5,
    "offset": 10
},

Or would it be easier to customize tastypie to handle requests like this?
“http://my.domain.com/api/lists/?page=1”
Which methods I’ve to override?

Thanks a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T14:09:30+00:00Added an answer on June 18, 2026 at 2:09 pm

    Override the RKPaginator::loadPage method with a objective-c category and calculate the offset from the page number and limit as shown in the following lines of code:

    #import "RKPaginator+Tastypie.h"
    #import <objc/runtime.h>
    
    @implementation RKPaginator (Tastypie)
    
    - (void)TastypieLoadPage:(NSUInteger)pageNumber
    {
        [self TastypieLoadPage:(pageNumber-1) * self.perPage];
    }
    
    + (void)load {
        method_exchangeImplementations(class_getInstanceMethod(self, @selector(loadPage:)), class_getInstanceMethod(self, @selector(TastypieLoadPage:)));
    }
    
    @end
    

    And here comes the construction of the RKPaginator object:

    RKPaginator *paginator = [[RKObjectManager sharedManager] paginatorWithPathPattern:@"yourResource/?limit=:perPage&offset=:currentPage"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

we can use SQL just like this: SELECT * FROM student WITH(NOLOCK); How can
We can use the web worker in HTML5 like this: var worker = new
I can use get for individual properties, like this: function MyObjectConstructor() { this._internalValueOne =
I can use this maven plugin maven-jaxb-plugin to generate Java Classes from XSD file.
We can use solr range query like: http://localhost:8983/solr/select?q=queryStr&fq=x:[10 TO 100] AND y:[20 TO 300]
You can use the Filter property of a BindingSource to do SQL like filtering.
I can use .map(func) on any column in a df, like: df = DataFrame({'a':[1,2,3,4,5,6],
can i use hibernate to login jsp page using (session) if i'm not using
I can use this jQuery code to dynamically change the RSS link in the
I can use: Mage::getModel('cms/page')->getCollection()->addStoreFilter($store_id); to retrieve a collection of CMS pages filtered by Store

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.