Sha256: 5b6f8c2fc0458b75846397bc12348b04794b19a3c0f345a7c5a46ff802fe4b7f

Contents?: true

Size: 546 Bytes

Versions: 2

Compression:

Stored size: 546 Bytes

Contents

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

require 'Time_Traveler'

origins = ARGV[0]
destinations = ARGV[1]
mode = ARGV[2]
unless origin && destination && mode
	puts 'two arguments are need for origin, destination and traffic method'
	exit(1)
end

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

traffic_load = Google::TrafficInfo.find(origins: origins, destinations: destinations,mode: mode)
distance_data = traffic_load.trafficAnaly

puts distance_data

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
Time_Traveler-0.1.4 bin/traffic
Time_Traveler-0.1.3 bin/traffic