class TRIPALERTZ::Deal

Attributes

auth_key[RW]
auth_login[RW]
open_timeout[RW]
timeout[RW]
url[RW]

Public Class Methods

new(args={}) click to toggle source
# File lib/tripalertz/deal.rb, line 7
def initialize(args={})
  @auth_login = TRIPALERTZ.auth_login
  @auth_key = TRIPALERTZ.auth_key
  @url = TRIPALERTZ.url
  @timeout = TRIPALERTZ.timeout.to_i
  @open_timeout = TRIPALERTZ.open_timeout.to_i
end

Public Instance Methods

GetCurrentDeals() click to toggle source
# File lib/tripalertz/deal.rb, line 15
def GetCurrentDeals()
  @response = RestClient::Request.execute(:method => :get, :url => [@url,'getCurrentDeals'].join, :headers => { :'X-Auth-Login' => '1', :'X-Auth-Key'=> '86f7e437faa5a7fce15d1ddcb9eaeaea377667b8'}, :timeout => @timeout, :open_timeout => @open_timeout)
  puts @response
end