Sha256: 05972741ec9968d9695d5bcd24edb2fa8c834adc5dcd728f4c384193bbe7158d

Contents?: true

Size: 806 Bytes

Versions: 2

Compression:

Stored size: 806 Bytes

Contents

#!/usr/bin/env ruby
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w(.. lib))

require 'VIAJERO'

market = ARGV[0]
currency = ARGV[1]
locale = ARGV[2]
originPlace = ARGV[3]
destinationPlace = ARGV[4]
outboundPartialDate = ARGV[5]
unless market && currency && locale && originPlace && destinationPlace && outboundPartialDate
	puts 'arguments are need for skyscanner method(market currency locale originPlace destinationPlace outboundPartialDate)'
	exit(1)
end

unless ENV['SKYSCANNER_API']
	puts 'you haven\'t set your environment variable yet'
	exit(1)
end

flight = Skyscanner::FlightInfo.find(market: market, currency: currency, locale: locale, originPlace: originPlace, destinationPlace: destinationPlace, outboundPartialDate: outboundPartialDate)
flightInfo = flight.flightInfo

puts flightInfo

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
VIAJERO-0.1.74 bin/flight
VIAJERO-0.1.73 bin/flight