首页 > 解决方案 > Amadeus POI Java 要求下一个,最后一个不工作

问题描述

我正在使用 Java SDK 并尝试了 Point of Interest API。我只能获得第一页,如果我尝试获得下一页或最后一页,我仍然会得到原始结果。

PointOfInterest[] pointsOfInterest =  amadeus.referenceData.locations.pointsOfInterest.get(Params
   .with("latitude", "41.39715")
   .and("longitude", "2.160873"));
pointsOfInterest = (PointOfInterest[]) amadeus.last(pointsOfInterest[0]);

这两个都返回相同的结果。看起来下一个、最后一个等字段的 URL 未正确编码。这是这些字段的原始调用返回的内容:“下一个”:“ https://test.api.amadeus.com/v1/reference-data/locations/pois?latitude=41.39715&longitude=2.160873&page[offset]=10&page [limit]=10 ","last":" https://test.api.amadeus.com/v1/reference-data/locations/pois?latitude=41.39715&longitude=2.160873&page[offset]=260&page[limit]= 10 "

标签: javaamadeus

解决方案


This is a limitation of the test environment.

Amadeus for Developers Self-Service APIs comes with 2 environments: - Test: free of access but limited in terms of data (you can find the list here) and the number of transactions you can do per month. - Production: unlimited access to production live data with a fee for each transaction.

For Points Of Interest, the API returns data for a limited number of cities, and for each city, a limited number of points of interest. This is why the pagination returns the same POIs.


推荐阅读