【问题标题】:some of the countries do not seem to be supported?有些国家好像不支持?
【发布时间】:2021-07-28 12:13:41
【问题描述】:

我正在尝试了解是否可以使用 Amadeus 的 API 来处理法国的机场和航班。

我正在使用amadeus-node

当我添加countryCode 时返回 0 结果(即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,
});

我是否遗漏了文档中的某些内容?这适用于法国吗?感谢您的帮助!

【问题讨论】:

    标签: amadeus


    【解决方案1】:

    我认为this post from StackOverflow 实际上回答了我的问题。

    这是因为并非所有数据都在生产之外可用。一旦我使用 prod 环境,我很可能会得到我期望的结果!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-23
      • 2013-07-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多