amadeus-ruby icon indicating copy to clipboard operation
amadeus-ruby copied to clipboard

Pagination documentation needs improvement

Open jtFrancisco opened this issue 4 years ago • 2 comments

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.

jtFrancisco avatar Mar 03 '21 19:03 jtFrancisco

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

anthonyroux avatar Mar 04 '21 12:03 anthonyroux

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!

jtFrancisco avatar Mar 04 '21 16:03 jtFrancisco