我正在尝试了解我是否可以使用Amadeus的API来处理法国的机场和航班。
我正在使用amadeus-node。
当我添加countryCode
(即.result.data
为空)
const airports = await amadeus.referenceData.locations.get({
keyword: keyword,
countryCode: "FR", // once added, results are gone
subType: "AIRPORT",
});
当我删除国家代码时,它工作得很好,并返回来自美国、西班牙和德国的结果。
此另一个请求仅返回西班牙的机场,而法国南部的机场(例如,MPL)
const airports = await amadeus.referenceData.locations.airports.get({
// next to Montpellier's airport https://goo.gl/maps/XfWBtsu6ZeF9SoDNA
longitude: 3.93,
latitude: 43.58,
});
我是不是在文档中遗漏了什么?这个可以在法国使用吗?谢谢你的帮忙!
发布于 2021-07-28 12:20:52
我认为this post from StackOverflow实际上回答了我的问题。
这是因为并非所有数据都在生产之外可用。一旦我使用了prod环境,我很可能会得到我期望的结果!
https://stackoverflow.com/questions/68560213
复制