How to fetch the next results page?

26 views
Skip to first unread message

RG

unread,
Feb 11, 2012, 3:43:12 AM2/11/12
to Google APIs Client Library for Objective-C
Hi,

I'm trying to figure out how to fetch the next result page for a
query. The docs say there's supposed to be a "nextPageToken" or
"nextStartIndex" property.

However, the result object is of the type "GTLAnalyticsGaData" and
only has a "nextLink" property which is set to a URL with the query
parameters (and a correct start index).

How would I retrieve the new start index from the query result object?
Can I set the "nextLink" property somewhere to execute a subsequent
query or do I have to parse the nextLink URL to extract the startIndex
myself?

Thanks!
Rico

Greg Robbins

unread,
Feb 11, 2012, 10:35:00 AM2/11/12
to google-api-obj...@googlegroups.com
Until the API is fixed to properly provide a nextStartIndex or a nextPageToken field in the responses, you will need to scan the nextLink for its start-index value, and set the startIndex property of the query to that.

RG

unread,
Feb 11, 2012, 2:23:40 PM2/11/12
to Google APIs Client Library for Objective-C
Ok, thanks for the confirmation. Just wanted to make sure I didn't
miss an API call.

-Rico
Reply all
Reply to author
Forward
0 new messages