Class: R43::Service

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, url, proxy_addr, proxy_port, proxy_user, proxy_pass) ⇒ Service

This method is only intended to be called by R43::Connection objects



25
26
27
28
29
30
31
32
# File 'lib/r43.rb', line 25

def initialize(key, url, proxy_addr, proxy_port, proxy_user, proxy_pass)
  @url        = url
  @key        = key.to_s
  @proxy_addr = proxy_addr
  @proxy_port = proxy_port
  @proxy_user = proxy_user
  @proxy_pass = proxy_pass
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



20
21
22
# File 'lib/r43.rb', line 20

def key
  @key
end

#proxy_addrObject (readonly)

Returns the value of attribute proxy_addr.



20
21
22
# File 'lib/r43.rb', line 20

def proxy_addr
  @proxy_addr
end

Instance Method Details

#get_response(url) ⇒ Object

This method is only meant to be called by R43::Connection objects, it’s the mechanism for getting data from the web service



80
81
82
# File 'lib/r43.rb', line 80

def get_response(url)
  _get_response(_inject_key(url))
end