lib/wialon_api/api.rb in wialon_api-0.0.2 vs lib/wialon_api/api.rb in wialon_api-0.0.3
- old
+ new
@@ -1,11 +1,11 @@
require 'json'
module WialonApi
module Api
def self.call(service_name, args = {}, sid = nil)
- parameters = { svc: service_name, params: args.to_json, sid: sid }
- connection(url: WialonApi.wialon_host, sid: sid).send(WialonApi.http_verb, WialonApi.wialon_host, parameters).body
+ parameters = { svc: service_name, params: args.to_json, ssid: sid }
+ connection(url: WialonApi.wialon_host).send(WialonApi.http_verb, nil, parameters).body
end
def self.connection(options = {})
url = options.delete(:url)
Faraday.new(url, WialonApi.faraday_options) do |builder|