Skip to content

Commit eaedee0

Browse files
authored
Merge pull request #25 from anthonyroux/sdk-updates_12NOV18
Redesign of the Flight Most Searched Destinations API
2 parents b5844a7 + 00c83d6 commit eaedee0

File tree

17 files changed

+153
-62
lines changed

17 files changed

+153
-62
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
To run the project locally, clone the repository, and then create a virtual environment and install the dependencies.
44
```sh
55
git clone https://github.com/amadeus4dev/amadeus-python.git
6-
cd amadeus-ruby
6+
cd amadeus-python
77
```
88

99
First, ensure you have a version of every Python we support installed. Your versions may differ.

CHANGELOG.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,38 @@
11
Changelog
22
=========
33

4+
2.0.0 - 2018-10-14
5+
--------------------
6+
7+
`Flight Most Searched Destinations <https://developers.amadeus.com/self-service/category/203/api-doc/6>`_: Redesign of the API - Split the previous endpoint in 2 endpoints:
8+
9+
- 1st endpoint to find the most searched destinations
10+
- 2nd endpoint to have more data about a dedicated origin & destination
11+
12+
`Flight Most Booked Destinations <https://developers.amadeus.com/self-service/category/203/api-doc/27>`_:
13+
14+
- Rename origin to originCityCode
15+
16+
`Flight Most Traveled Destinations <https://developers.amadeus.com/self-service/category/203/api-doc/7>`_:
17+
18+
- Rename origin in originCityCode
19+
20+
`Flight Check-in Links <https://developers.amadeus.com/self-service/category/203/api-doc/8>`_:
21+
22+
- Rename airline to airlineCode
23+
24+
`Airport & City Search <https://developers.amadeus.com/self-service/category/203/api-doc/10>`_:
25+
26+
- Remove parameter onlyMajor
27+
28+
`Airport Nearest Relevant <https://developers.amadeus.com/self-service/category/203/api-doc/9>`_:
29+
30+
- Add radius as parameter
31+
32+
`Airline Code Lookup <https://developers.amadeus.com/self-service/category/203/api-doc/26>`_:
33+
34+
- Regroup parameters *IATACode* and *ICAOCode* under the same name *airlineCodes*
35+
436
1.1.0 - 2018-08-01
537
--------------------
638

README.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,10 @@ List of supported endpoints
209209
amadeus.shopping.flight_offers.get(origin='MAD', destination='NYC', departureDate='2019-08-01')
210210
211211
# Flight Checkin Links
212-
amadeus.reference_data.urls.checkin_links.get(airline='BA')
212+
amadeus.reference_data.urls.checkin_links.get(airlineCode='BA')
213213
214214
# Airline Code Lookup
215-
amadeus.reference_data.airlines.get(IATACode='U2')
215+
amadeus.reference_data.airlines.get(airlineCodes='U2')
216216
217217
# Airport and City Search (autocomplete)
218218
# Find all the cities and airports starting by 'LON'
@@ -224,16 +224,16 @@ List of supported endpoints
224224
amadeus.reference_data.locations.airports.get(longitude=49.000, latitude=2.55)
225225
226226
# Flight Most Searched Destinations
227-
amadeus.travel.analytics.fare_searches.get(origin='MAD', sourceCountry='SP', period='2017-08')
227+
amadeus.travel.analytics.fare_searches.get(originCityCode='MAD', sourceCountry='SP', period='2017-08')
228228
229229
# Flight Most Booked Destinations
230-
amadeus.travel.analytics.air_traffic.booked.get(origin='MAD', period='2017-08')
230+
amadeus.travel.analytics.air_traffic.booked.get(originCityCode='MAD', period='2017-08')
231231
232232
# Flight Most Traveled Destinations
233-
amadeus.travel.analytics.air_traffic.traveled.get(origin='MAD', period='2017-01')
233+
amadeus.travel.analytics.air_traffic.traveled.get(originCityCode='MAD', period='2017-01')
234234
235235
# Flight Busiest Travel Period
236-
amadeus.travel.analytics.air_traffic.busiest_period.get(origin='MAD', period='2017', direction='ARRIVING')
236+
amadeus.travel.analytics.air_traffic.busiest_period.get(cityCode='MAD', period='2017', direction='ARRIVING')
237237
238238
# Hotel Search API
239239
# Get list of Hotels by city code

amadeus/reference_data/_airlines.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ def get(self, **params):
88
99
.. code-block:: python
1010
11-
amadeus.reference_data.airlines.get(IATACode='U2')
11+
amadeus.reference_data.airlines.get(airlineCodes='U2')
1212
13-
:param IATACode: the IATA code for the airline, e.g. ``"1X"``
13+
:param airlineCodes: the IATA or ICAO code for the airline, e.g.
14+
:``"AF"`` (Air France IATA code)
15+
:or ``"AFR"`` (Air France ICAO code)
1416
1517
:rtype: amadeus.Response
1618
:raises amadeus.ResponseError: if the request could not be completed

amadeus/reference_data/urls/_checkin_links.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ def get(self, **params):
99
1010
.. code-block:: python
1111
12-
amadeus.reference_data.urls.checkin_links.get(airline='1X')
12+
amadeus.reference_data.urls.checkin_links.get(airlineCode='BA')
1313
14-
:param airline: the IATA code for the airline, e.g. ``"1X"``
14+
:param airlineCode: the IATA code for the airline, e.g. ``"BA"``
1515
:param language: the locale for the links, for example ``"en-GB"``
1616
1717
:rtype: amadeus.Response

amadeus/travel/_analytics.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
from amadeus.client.decorator import Decorator
22
from .analytics._air_traffic import AirTraffic
3-
from .analytics._fare_searches import FareSearches
43

54

65
class Analytics(Decorator, object):
76
def __init__(self, client):
87
Decorator.__init__(self, client)
9-
self.fare_searches = FareSearches(client)
108
self.air_traffic = AirTraffic(client)
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from ._fare_searches import FareSearches
21
from ._air_traffic import AirTraffic
32

43

5-
__all__ = ['FareSearches', 'AirTraffic']
4+
__all__ = ['AirTraffic']

amadeus/travel/analytics/_air_traffic.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from amadeus.client.decorator import Decorator
22
from .air_traffic._traveled import Traveled
33
from .air_traffic._booked import Booked
4+
from .air_traffic._searched import Searched
5+
from .air_traffic._searched_by_destination import SearchedByDestination
46
from .air_traffic._busiest_period import BusiestPeriod
57

68

@@ -9,4 +11,6 @@ def __init__(self, client):
911
Decorator.__init__(self, client)
1012
self.booked = Booked(client)
1113
self.traveled = Traveled(client)
14+
self.searched = Searched(client)
15+
self.searched_by_destination = SearchedByDestination(client)
1216
self.busiest_period = BusiestPeriod(client)

amadeus/travel/analytics/_fare_searches.py

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
from ._traveled import Traveled
2+
from ._searched import Searched
3+
from ._searched_by_destination import SearchedByDestination
24
from ._booked import Booked
35
from ._busiest_period import BusiestPeriod
46

57

6-
__all__ = ['Traveled', 'Booked', 'BusiestPeriod']
8+
__all__ = ['Searched', 'SearchedByDestination',
9+
'Traveled', 'Booked', 'BusiestPeriod']

0 commit comments

Comments
 (0)