Ruby API to access https://distribution-xml.booking.com/.
My project do not use full API from Booking.com currently, so the implementation is partial.
This gem provides 2 modules to use booking
- API
- BP -> Best Practice
Here is a code snippets from my Rails project:
namespace :gm do
task :refresh_hotels => :environment do |tsk|
booking_client = Booking::Client.new({:cfg_file => "#{Rails.root.to_s}/config/database.yml"})
bp = Booking::BestPractice.new
bp.get_all_hotels(booking_client, 0, 10) do |hotel_hash_array|
hotel_hash_array.each do |hotel_hash|
puts hotel_hash
end
end
end
end
You can download Booking City data from http://api.goodappworks.com/system/booking/cities.sql.gz