/
_locations.py
33 lines (23 loc) · 1.01 KB
/
_locations.py
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
from amadeus.client.decorator import Decorator
from amadeus.reference_data.locations._airports import Airports
class Locations(Decorator, object):
def __init__(self, client):
Decorator.__init__(self, client)
self.airports = Airports(client)
def get(self, **params):
"""
Returns details for a specific airport.
.. code-block:: python
from amadeus import Location
client.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)