Developers

Flat
Pagination Issues
User: Alecat
Date: 2/7/2014 9:18 pm
Views: 2666
Rating: 0

Hi guys,

I'm having some trouble with fetching back a series of game mats.

Based on the pagination doco here I'm calling this url:

api/game/xxx/halfmats?page_number=2&_items_per_page=100

However, regardless of what "page_number" I specify, I appear to be getting back the first page of results.

Anyone know what I might be doing wrong?

Thanks for your help :)

[edit] For clarification, I'm actually calling this via a python script:

    params = {'session_id': session['id'], 'page_number' : page, '_items_per_page' : 100 }
    response = requests.get(url + "/game/" + gamekey + "/halfmats", params=params)

But in order to verify the URLs I'm using I have also attempted to visit the URL directly in-browser

Re: Pagination Issues
User: Alecat
Date: 2/7/2014 9:31 pm
Views: 97
Rating: 0

A little bit of digging around to see what TGC itself called - the argument should be _page_number, not page_number

Looks like my script is working now. Could we please get this updated in the doco :)

Re: Pagination Issues
User: colink
Date: 2/8/2014 4:51 pm
Views: 1139
Rating: 0

All fixed up.  Thanks for finding it and pointing it out!

PreviousNext