Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonmagic/kayakfares
Library to return fares from the Kayak Search Gateway using Mechanize.
https://github.com/jonmagic/kayakfares
Last synced: 30 days 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 (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-04-10T21:14:06.000Z (over 12 years ago)
- Last Synced: 2023-04-10T22:39:32.893Z (over 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
=> $1240search.results[0].airline
=> Unitedsearch.results[0].leg0_departure_time
=> 7:44psearch.results[0].leg0_arrival_time
=> 10:35psearch.results[0].leg0_duration
=> 20h 51msearch.results[0].leg1_departure_time
=> 6:55asearch.results[0].leg1_arrival_time
=> 11:26psearch.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.