Project

tourico

0.01
No commit activity in last 3 years
No release in over 3 years
Tourico gem is a ruby wrapper for Tourico API Affiliate Network
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 2.6

Runtime

~> 2.5.0
 Project Readme

Tourico

Tourico gem is a ruby wrapper for Tourico API Affiliate Network

Installation

Add this line to your application's Gemfile:

gem 'tourico'

And then execute:

$ bundle

Or install it yourself as:

$ gem install tourico

Usage

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

Sample

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

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request