コード例 #1
0
    def test_search_airport(self):
        cars = Cars(self.api_key)

        currency = "USD"
        max_rate = 100
        latitude = 16.44671
        longitude = 102.833
        location = "BKK"

        resp = cars.search_airport(
            pick_up=self.pick_up, drop_off=self.drop_off, location=location, currency=currency, lang="EN"
        )

        self.assertTrue(len(resp) > 0)
コード例 #2
0
ファイル: test_amadeus.py プロジェクト: jpmunic/udest
    def test_search_airport(self):
        cars = Cars(self.api_key)

        currency = 'USD'
        max_rate = 100
        latitude = 16.44671
        longitude = 102.833
        location = 'BKK'

        resp = cars.search_airport(pick_up=self.pick_up,
                                   drop_off=self.drop_off,
                                   location=location,
                                   currency=currency,
                                   lang='EN')

        self.assertTrue(len(resp) > 0)
コード例 #3
0
    def test_search_circle(self):
        cars = Cars(self.api_key)

        currency = 'USD'
        max_rate = 100
        latitude = 16.44671
        longitude = 102.833
        location = 'BKK'

        resp = cars.search_circle(
            pick_up=self.pick_up,
            drop_off=self.drop_off,
            latitude=latitude,
            longitude=longitude,
            radius=70,
            currency=currency,
            lang='EN')

        self.assertTrue(len(resp) > 0)
コード例 #4
0
ファイル: rentals.py プロジェクト: jhirniak/pinkunicorns
class CarRental:

    def __init__(self):
        self.cars = Cars('s0XN9NBwpcEGmc9cL0NpSKs9rh5FRIpV')

    def get_cars(self, lat, lng):
        resp = self.cars.search_circle(
        pick_up='2015-11-25',
        drop_off='2015-11-26',
        latitude=lat,
        longitude=lng,
        radius=70,
        currency='USD',
        lang='EN')

        return resp
コード例 #5
0
ファイル: rentals.py プロジェクト: jhirniak/pinkunicorns
 def __init__(self):
     self.cars = Cars('s0XN9NBwpcEGmc9cL0NpSKs9rh5FRIpV')