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

Search function calls the wrong API #7

Open
HonzaStefanik opened this issue Mar 10, 2022 · 6 comments
Open

Search function calls the wrong API #7

HonzaStefanik opened this issue Mar 10, 2022 · 6 comments

Comments

@HonzaStefanik
Copy link
Contributor

HonzaStefanik commented Mar 10, 2022

According to the ButterCMS' documentation, the search URL is the following

GET 'https://api.buttercms.com/v2/posts/search/?query=buttercmsapi&page=1&page_size=10&auth_token=your_api_token'

However, using the search function according to docs from the Java SDK calls the following

GET https://api.buttercms.com/v2/posts/?auth_token=token&query=test HTTP/1.1

The /search/ part is missing.

@jakelumetta
Copy link
Contributor

We actually changed/normalized the URL for blog post search when we added search for pages: https://buttercms.com/docs/api/#search-pages

So this issue should really 1) update the url for blog post search and 2) add support for tapping into page search as well

@martinalbert
Copy link
Contributor

@jakelumetta @ViolanteCodes this was fixed by bfd47ad. Documentation contains incorrect API though.

@ViolanteCodes
Copy link
Contributor

@martinalbert can you put in a PR to update the documentation?

@ViolanteCodes
Copy link
Contributor

@martinalbert can you put in a PR to update the documentation?

Actually, sorry, can you point out where the documentation is incorrect?

@martinalbert
Copy link
Contributor

@ViolanteCodes here in readme is mentioned getPostsSearch where as client contains getSearchPosts, same with getPageSearch in readme and getSearchPages in client

@ViolanteCodes
Copy link
Contributor

@martinalbert thank you, i've opened an internal ticket :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants