Class: Ean::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/ean/request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method = "") ⇒ Request

Returns a new instance of Request.



7
8
9
10
11
# File 'lib/ean/request.rb', line 7

def initialize(method="")
  @api      = Ean::API.instance
  @base_url = "http://api.ean.com/ean-services/rs/hotel/v#{api.version}/#{method}?cid=#{api.cid}&apiKey=#{api.key}\
               &locale=#{api.locale}&currencyCode=#{api.currency_code}&minorRev=#{api.minor_rev}"
end

Instance Attribute Details

#apiObject

Returns the value of attribute api.



5
6
7
# File 'lib/ean/request.rb', line 5

def api
  @api
end

#base_urlObject

Returns the value of attribute base_url.



5
6
7
# File 'lib/ean/request.rb', line 5

def base_url
  @base_url
end