https://github.com/jonmagic/kayakfares
Library to return fares from the Kayak Search Gateway using Mechanize.
https://github.com/jonmagic/kayakfares
Last synced: about 1 year ago
JSON representation
Library to return fares from the Kayak Search Gateway using Mechanize.
- Host: GitHub
- URL: https://github.com/jonmagic/kayakfares
- Owner: jonmagic
- License: mit
- Created: 2012-04-10T13:00:11.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2012-04-10T21:14:06.000Z (about 14 years ago)
- Last Synced: 2025-01-31T13:43:46.336Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 117 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KayakFares
Library to return fares from the [Kayak Search Gateway](http://www.kayak.com/labs/gateway/doc/air.vtl) using [Mechanize](http://mechanize.rubyforge.org/).
## Usage
Search for fares:
require 'kayakfares'
params = {:from => "SBN", :to => "VRN", :depart => "5/15/2012", :return => "5/20/2012"}
search = KayakFares.new(params)
search.results[0].price
=> $1240
search.results[0].airline
=> United
search.results[0].leg0_departure_time
=> 7:44p
search.results[0].leg0_arrival_time
=> 10:35p
search.results[0].leg0_duration
=> 20h 51m
search.results[0].leg1_departure_time
=> 6:55a
search.results[0].leg1_arrival_time
=> 11:26p
search.results[0].leg1_duration
=> 22h 31m
## Note on Patches/Pull Requests
* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so we don't break it in a future version unintentionally.
* Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine, but bump version in a commit by itself so we can ignore when we pull)
* Send us a pull request. Bonus points for topic branches.