#!/usr/bin/env ruby $LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w(.. lib)) require 'VIAJERO' location = ARGV[0] unless location puts 'no location' exit(1) end unless ENV['AIRBNB_API'] puts 'you haven\'t set your environment variable yet' exit(1) end airbnb_load = Airbnb::RentInfo.find(location: location) rooms = airbnb_load.infos puts rooms