Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blogger API v3 : when calling /posts/search/, parameter nextPageToken is ignored #1381

Open
ludovic-lambert opened this issue Sep 19, 2019 · 6 comments
Labels
priority: p4 type: question Request for information or clarification. Not an issue.

Comments

@ludovic-lambert
Copy link

Env : javascript, using XMLHttpRequest and JSON API.

When calling {URL}/posts/?{parameters} :

  • the 10 first items are returned
  • if the response contains more than 10 items, an attribute { "nextPageToken":"xyz" } is added to the JSON data response.

Then when calling {URL}/posts/?{parameters}&pageToken={nextPageToken} :

  • the response contains the next 10 items
  • a new nextPageToken is returned until no more page

=> Looks like the expected behavior, working fine.

However:
When calling {URL}/posts/search/?q={query_string}{parameters} :

  • the 10 first items are returned
  • if the response contains more than 10 items, an attribute { "nextPageToken":"xyz" } is added to the JSON data response.

Then when calling
{URL}/posts/search/?q={query_string}{parameters}&pageToken={nextPageToken} :
- the 10 first items are displayed again (ie not the next 10),
- returned nextPageToken is the same than first call

Looks like pageToken is ignored for /posts/search/.
Is this the expected behavior ? How to access items of /posts/search/ response returning more than 10 items?

@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Sep 20, 2019
@chingor13 chingor13 added the type: question Request for information or clarification. Not an issue. label Sep 25, 2019
@chingor13
Copy link
Collaborator

This is the repository for the java client so this issue doesn't belong here.

However, to answer the question, the posts search endpoint does not appear to accept a pageToken parameter.

@yoshi-automation yoshi-automation removed triage me I really want to be triaged. 🚨 This issue needs some love. labels Sep 25, 2019
@ludovic-lambert
Copy link
Author

ludovic-lambert commented Sep 25, 2019

Hi, thank you for your answer. According to the fact a nextPageToken is provided, and as it should be possible to retrieve more than 10 items from a /posts/search/, I think this might be a bug. Could you please guide me to the right place to open this issue?

@pradyum619
Copy link

Is the issue resolved? if yes please share the solution, I am facing the same issue, can't get the next 10 items in the search endpoint.

@lglf77
Copy link

lglf77 commented Nov 20, 2021

Meu blogger na api não tem nextPageToken nem nextPage. O que fazer? Só tenho 3 postagens por página. E 3 páginas ao total do blogger. 9 postagens. O blogger retirou isso para novos blogs?

@mortezaadi
Copy link

mortezaadi commented Jan 12, 2022

Definitely, it's not a bug, though it needs more clarification, you can refer to this document from Blogger API v3.

to get the pagination work you need to call the API with maxResults={pageSize} then you will get an extra value in the response 'nextPageToken', you should use the value of this field and pass it with. 'pageToken' NOT 'nextPageToken'

https://blablabla?maxResults=10&pageToken={VALUE_OF_NEXTPAGETOKEN}

when you reach the end of the list you won't get the nextPageToken anymore and it means nothing more to fetch.

gcf-owl-bot bot added a commit that referenced this issue Apr 6, 2022
* chore: Enable Size-Label bot in all googleapis Java repositories

Auto-label T-shirt size indicator should be assigned on every new pull request in all googleapis Java repositories

* Remove product

Remove product since it is by default true

* add license header

Co-authored-by: Neenu Shaji <Neenu1995@users.noreply.github.com>
Source-Link: googleapis/synthtool@54b2c6a
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:fc52b202aa298a50a12c64efd04fea3884d867947effe2fa85382a246c09e813
eaball35 pushed a commit that referenced this issue Apr 6, 2022
…) (#2031)

* chore: Enable Size-Label bot in all googleapis Java repositories

Auto-label T-shirt size indicator should be assigned on every new pull request in all googleapis Java repositories

* Remove product

Remove product since it is by default true

* add license header

Co-authored-by: Neenu Shaji <Neenu1995@users.noreply.github.com>
Source-Link: googleapis/synthtool@54b2c6a
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:fc52b202aa298a50a12c64efd04fea3884d867947effe2fa85382a246c09e813

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Neenu Shaji <Neenu1995@users.noreply.github.com>
@meltsufin
Copy link
Member

It doesn't appear to be an issue with the library itself. If anything, it's the service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p4 type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

7 participants