How to use the amadeus.Location.ANY function in amadeus

To help you get started, we’ve selected a few amadeus examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github amadeus4dev / amadeus-python / specs / client_spec.py View on Github external
from mamba import description, it
from expects import expect, be_none, equal

from amadeus import Client, Location

with description('Client') as self:
    with it('should exist'):
        expect(Client).not_to(be_none)

    with it('should have helper locations'):
        expect(Location).not_to(be_none)
        expect(Location.ANY).to(equal('AIRPORT,CITY'))
github amadeus4dev / amadeus-python / samples / airport_and_city_search / airport_and_city_search.py View on Github external
from amadeus import Client, ResponseError
from amadeus import Location

amadeus = Client()

print('Airport and City Search')
try:
    '''
    Which cities or airports start with 'r'?
    '''
    response = amadeus.reference_data.locations.get(keyword='r',
                                                    subType=Location.ANY)
    print(response.data)
except ResponseError as error:
    raise error