class Elong::Client

Elong Client Class

Attributes

request[R]

Public Class Methods

new(user, appKey, secretKey, opts={}) click to toggle source

Instantiate a new Elong API client using the user, appKey and secretKey registered to your application

@param [String] user the user value @param [String] appKey the appKey value @param [String] secretKey the secretKey value @param opts [String] :domain elong api url (default: ‘api.elong.com/rest’) @param opts [String] :version the version of elong api version (default: ‘1.0’) @param opts [String] :local the data return language (ONLY ‘en_US’ and ‘zn_CN’, default: ‘zh_CN’) @param opts [String] :format the data return foramat (ONLY ‘json’ and ‘xml’, default: ‘json’) @return [Elong::Client]

# File lib/elong/client.rb, line 18
def initialize(user, appKey, secretKey, opts={})
  @request = Elong::Request.new(user, appKey, secretKey, opts)
end

Public Instance Methods

common() click to toggle source

The Common section

@return [Elong::API::Common::Core]

# File lib/elong/client.rb, line 39
def common
  @common ||= Elong::API::Common::Core.new(self)
end
ghotel() click to toggle source

The Globel Hotel section

@return [Elong::API::GHotel::Core]

# File lib/elong/client.rb, line 32
def ghotel
  @ghotel ||= Elong::API::GHotel::Core.new(self)
end
hotel() click to toggle source

The Hotel section

@return [Elong::API::Hotel::Core]

# File lib/elong/client.rb, line 25
def hotel
  @hotel ||= Elong::API::Hotel::Core.new(self)
end