Tourico gem is a ruby wrapper for Tourico API Affiliate Network
Add this line to your application's Gemfile:
gem 'tourico'
And then execute:
$ bundle
Or install it yourself as:
$ gem install tourico
Create initializers/tourico.rb
Tourico.setup do |config|
config.login_name = ''
config.password = ''
config.culture = 'en_US'
config.hotels_service_version = '8.5'
config.reservations_service_version = '8.5'
config.location_service_version = '1'
end
api = Tourico::Api.new
args = {
'hot:request' => {
'hot1:Destination' => 'NYC',
'hot1:CheckIn' => '2013-10-23',
'hot1:CheckOut' => '2013-10-25',
'hot1:RoomsInformation' => {
'hot1:RoomInfo' => {
'hot1:AdultNum' => '2',
'hot1:ChildNum' => '0',
}
},
'hot1:MaxPrice' => '0',
'hot1:StarLevel' => '0',
'hot1:AvailableOnly' => 'true'
}
}
response = api.get_list(args)
All the other samples could be found inside the Rspec directory: spec/models/api_spec.rb
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request