Module: Loginza::Api

Defined in:
lib/loginza/api.rb

Constant Summary collapse

BASE_URL =
"http://loginza.ru/api/"

Class Method Summary collapse

Class Method Details

.call(method, data, cookies = {}) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/loginza/api.rb', line 11

def call(method, data, cookies = {})
  options = {
    :timestamp => Time.now.to_i
  }.merge(data)
          
  response = request(File.join(uri.path, method), options)
  parse_response(response)
end

.uriObject



20
21
22
23
# File 'lib/loginza/api.rb', line 20

def uri
  @@uri ||= URI.parse(BASE_URL)
  @@uri
end