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, = {}) = { :timestamp => Time.now.to_i }.merge(data) response = request(File.join(uri.path, method), ) parse_response(response) end |
.uri ⇒ Object
20 21 22 23 |
# File 'lib/loginza/api.rb', line 20 def uri @@uri ||= URI.parse(BASE_URL) @@uri end |