This gem makes it easy to get usually difficult-to-access information on the availability of British Airways reward flights.
I use the private API from the new Avios Flight Finder app for iOS to grab this data. Thanks to Raffles at Head for Points for covering this very helpful little app.
Pretty simple. First, add the gem to your Gemfile:
gem 'ba_rewards', github: 'timrogers/ba_rewards'
Simply call BARewards.availability
with the code of your
departure and destinations airports. You can then optionally choose a fare class (I'll assume Economy) and the number of seats you need:
require 'ba_rewards'
# I'm looking for two seats from any London airport to San Francisco in Business
result = BARewards.availability("LON", "SFO", :business, 2)
It'll return a BARewards::Result
object, or raise an error if something goes wrong. You can call the following methods on the result object:
HTTParty::Response
object returned from the request to the Avios private APIReleased by Tim Rogers (@timrogers) under the MIT license. Any questions? Email [email protected].