response = amadeus.shopping.flight_dates.get(origin='JTR', destination='SFO', oneWay='true', departureDate='2019-05-01,2019-06-01', nonStop=False)
这将返回一个错误。
*** amadeus.client.errors.ServerError: [500]
这不是身份验证错误或其他一些参数错误,因为具有不同机场代码的完全相同的代码有效。
response = amadeus.shopping.flight_dates.get(origin='NYC', destination='SFO', oneWay='true', departureDate='2019-05-01,2019-06-01', nonStop=False)
客户端正在使用生产密钥并将主机名设置为生产。
Client(client_id=get_api_key(), client_secret=get_api_secret(), hostname='production')