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

Pagination documentation needs improvement #54

Open
jtFrancisco opened this issue Mar 3, 2021 · 2 comments
Open

Pagination documentation needs improvement #54

jtFrancisco opened this issue Mar 3, 2021 · 2 comments
Labels

Comments

@jtFrancisco
Copy link

jtFrancisco commented Mar 3, 2021

I am having a lot of difficulty using pagination, and the documentation on pagination in this repo and the API documentation in Amadeus's site is not clear on usage.

@anthonyroux
Copy link
Contributor

Hi @donbigote, can you provide some concrete examples of what you are trying to achieve and what is not working/not well documented? We will take a look and see both how we can help you and how we can improve the documentation

@jtFrancisco
Copy link
Author

jtFrancisco commented Mar 4, 2021

Based on the API documentation for hotel offers
https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-search/api-reference
You are supposed to use page[limit] and page[offset]
And then use the "next" link from the API response to show the next results.

How do I set page[limit] and page[offset] with the response = amadeus.shopping.hotel_offers.get(...?
When I tried: page:{ limit: 10, offset: 1} it returned a response, but it was a strange response with 7 results.

Then, when I tried to use next(response) the API was returning the same results from the first response

Once I started using the production API, I noticed that the response for hotel offers isn't that big (like 50-60 offers). So, I decided to just get a normal response and use javascript to show and hide a certain number of offers.

I am new at working with APIs. So, a lot of my confusion is probably just from a lack of experience. Thanks for this gem and the API, it is very nice!

@anthonyroux anthonyroux self-assigned this Mar 4, 2021
@anthonyroux anthonyroux removed their assignment Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants