Module: AltFlights
- Defined in:
- lib/altflights.rb
Defined Under Namespace
Classes: Booking, Flight, KayakWrapper
Class Method Summary collapse
- .check_search(searchid, sid) ⇒ Object
-
.get_flights(searchid, sid, count) ⇒ Object
date_string format => ‘%m/%d/%y’.
-
.start_search(origin, destination, date_string) ⇒ Object
date_string format => ‘%m/%d/%y’.
Class Method Details
.check_search(searchid, sid) ⇒ Object
16 17 18 |
# File 'lib/altflights.rb', line 16 def check_search(searchid, sid) return AltFlights::KayakWrapper.poll_results(searchid, sid, nil) end |
.get_flights(searchid, sid, count) ⇒ Object
date_string format => ‘%m/%d/%y’
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/altflights.rb', line 20 def get_flights(searchid, sid, count) # date_string format => '%m/%d/%y' if count.to_i > 100 count = 100 end results = AltFlights::KayakWrapper.poll_results(searchid, sid, count) return results end |
.start_search(origin, destination, date_string) ⇒ Object
date_string format => ‘%m/%d/%y’
8 9 10 11 12 13 14 |
# File 'lib/altflights.rb', line 8 def start_search(origin, destination, date_string) # date_string format => '%m/%d/%y' kayak = AltFlights::KayakWrapper.new kayak.get_session() kayak.start_flight_search('y', origin, destination, date_string, 'a', nil, 'a', '1', 'e') return kayak.to_json end |