forked from amadeus4dev/amadeus-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_locations.py
More file actions
39 lines (29 loc) · 1.29 KB
/
_locations.py
File metadata and controls
39 lines (29 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from amadeus.client.decorator import Decorator
from amadeus.reference_data.locations._airports import Airports
from amadeus.reference_data.locations._hotels import Hotels
from amadeus.reference_data.locations._hotel import Hotel
from amadeus.reference_data.locations._cities import Cities
class Locations(Decorator, object):
def __init__(self, client):
Decorator.__init__(self, client)
self.airports = Airports(client)
self.hotels = Hotels(client)
self.hotel = Hotel(client)
self.cities = Cities(client)
def get(self, **params):
'''
Returns details for a specific airport.
.. code-block:: python
from amadeus import Location
amadeus.reference_data.locations.get(
keyword='lon',
subType=Location.ANY
)
:param keyword: keyword that should represent the start of
a word in a city or airport name or code
:param subType: a comma seperate list of location types to search
for. You can use :class:`amadeus.Location` as a helper for this.
:rtype: amadeus.Response
:raises amadeus.ResponseError: if the request could not be completed
'''
return self.client.get('/v1/reference-data/locations', **params)