Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from amadeus.client.decorator import Decorator
class HotelOffers(Decorator, object):
def __init__(self, client, hotel_id):
Decorator.__init__(self, client)
self.hotel_id = hotel_id
def get(self, **params):
"""
Get available offers for a specific hotel
.. code-block:: python
amadeus.shopping.hotel('SMPARCOL').hotel_offers.get()
:rtype: amadeus.Response
:raises amadeus.ResponseError: if the request could not be completed
"""
return self.client.get(
from amadeus.client.decorator import Decorator
class BusiestPeriod(Decorator, object):
def get(self, **params):
'''
Returns a list of air traffic reports, based on number of travelers.
.. code-block:: python
amadeus.travel.analytics.air_traffic.busiest_period.get(
cityCode='MAD',
period='2017',
direction=Direction.ARRIVING
)
:param cityCode: IATA code of the origin city, for
example ``"BOS"`` for Boston.
:param period: period when consumers are traveling
in ``YYYY`` format
from amadeus.client.decorator import Decorator
class HotelOffers(Decorator, object):
def get(self, **params):
"""
Search for hotels and retrieve availability and rates information.
Use either `cityCode`, `longitude` and `latitude` or `hotels` to
make a search.
.. code-block:: python
amadeus.shopping.hotel_offers.get(cityCode='PAR')
amadeus.shopping.hotel_offers.get(longitude=49.0, latitude=2.0)
amadeus.shopping.hotel_offers.get(hotels='RTPAR001, RTPAR002')
:param cityCode: the City IATA code for which to find a hotel, for
example ``"BOS"`` for Boston.
:param latitude: latitude of geographic location to search around.
from amadeus.client.decorator import Decorator
class FlightDates(Decorator, object):
def get(self, **params):
"""
Find the cheapest flight dates from an origin to a destination.
.. code-block:: python
amadeus.shopping.flight_dates.get(origin='LHR', destination='PAR')
:param origin: the City/Airport IATA code from which the flight will
depart. ``"BOS"``, for example for Boston.
:param destination: the City/Airport IATA code to which the flight is
going. ``"BOS"``, for example for Boston.
:rtype: amadeus.Response
:raises amadeus.ResponseError: if the request could not be completed
from amadeus.client.decorator import Decorator
class Airlines(Decorator, object):
def get(self, **params):
'''
Returns the name of the airline given an IATA code.
.. code-block:: python
amadeus.reference_data.airlines.get(airlineCodes='U2')
:param airlineCodes: the IATA or ICAO code for the airline, e.g.
:``"AF"`` (Air France IATA code)
:or ``"AFR"`` (Air France ICAO code)
:rtype: amadeus.Response
:raises amadeus.ResponseError: if the request could not be completed
'''
return self.client.get('/v1/reference-data/airlines', **params)