amadeus4dev / amadeus-python

Python library for the Amadeus Self-Service travel APIs
https://developers.amadeus.com
MIT License
201 stars 80 forks source link

amadeus.shopping.flight_dates.get() giving HTTP Error 404: Not Found #31

Closed lzhengem closed 5 years ago

lzhengem commented 5 years ago

Description

Attempting to run code from README (https://github.com/amadeus4dev/amadeus-python) fails

Flight Cheapest Date Search: amadeus.shopping.flight_dates.get(origin='NYC', destination='MAD')

Steps to Reproduce

  1. Run
    
    from amadeus import Client, ResponseError

amadeus = Client( client_id=AMADEUS_ID, client_secret=AMADEUS_SECRET )

try: response = amadeus.shopping.flight_dates.get(origin='NYC', destination='MAD') print(response.data) except ResponseError as error: print(error) except Exception as e: print(e)



## Expected Behavior:
To get a response object

## Actual Bahavior:
```HTTP Error 404: Not Found```

## Stable Behavior? [What percentage of the time does it reproduce?]
Right now it is stable, 100% reproducibility.

# Versions
Python: python2.7

Pip: pip 19.0.1

# Checklist
Please make sure you checked the following:

Are you running Python 2.7 or 3.6? Yes

Did you download the latest version of this package? Yes
lzhengem commented 5 years ago

So it looks like its not an issue with the python API, this is an issue with amadeus returning data:

https://developers.amadeus.com/self-service/category/203/api-doc/5/api-docs-and-example/10003

When testing this out, with origin='NYC', destination='MAD' it is return 404. However, it will work for SFO to NYC:

https://test.api.amadeus.com/v1/shopping/flight-dates?origin=SFO&destination=NYC

anthonyroux commented 5 years ago

Hi!

You are right, we had a technical issue with the cache we use for the test environment of this API. We are restoring the data in test, for the moment NYC is not in the dataset (as origin).

In any case, the dataset we have in the test environment is much smaller and contains only cached data. If you want a much bigger coverage and refreshed data you will need to move to production.

By beg of next week, we will publish the new list of origins and destinations we are supporting in test.

So far you can use: SFO -> PSP SFO -> PDX SFO -> MKC SFO -> BOS SFO -> NYC

BOS -> BNA BOS -> BUF BOS ->PHL BOS -> CLE BOS -> SNA

MAD -> LON MAD -> ALC MAD -> GOA MAD -> MUC MAD -> TUN MAD -> WAW

MUC -> BKK MUC -> SIN MUC -> SAN MUC -> DEN

It's just a subset of the data we have in test, hope it should be enough until we publish the full list.

Regards, Anthony

anthonyroux commented 5 years ago

You can find the current list here.