lib/qismo/client.rb in qismo-0.11.3 vs lib/qismo/client.rb in qismo-0.12.0
- old
+ new
@@ -19,11 +19,11 @@
secret_key: DEFAULT_SECRET_KEY,
url: DEFAULT_URL,
logger: nil,
instrumentation: nil,
timeout: nil,
- proxy: nil,
+ proxy: nil
}
attr_accessor(*DEFAULT_OPTIONS.keys)
# Initialize client
@@ -81,11 +81,11 @@
# @return [Qismo::SingleObject]
def request(method, path, headers: {}, params: {}, json: {})
res = connection.request(method, @url + path, {
headers: headers,
params: params,
- json: json,
+ json: json
})
if res.status.success?
return SingleObject.new(JSON.parse(res.to_s))
end
@@ -104,11 +104,11 @@
400 => BadRequestError,
401 => UnauthorizedError,
402 => PaymentRequiredError,
403 => ForbiddenError,
404 => NotFoundError,
- 429 => TooManyRequestError,
+ 429 => TooManyRequestError
}
error_klass = error_klass_map[res.code] || HTTPRequestError
raise error_klass.new(error, status_code: res.code, response_body: res.to_s)
end
@@ -141,11 +141,11 @@
end
http.headers({
"Qiscus-App-Id": @app_id,
"Qiscus-Secret-Key": @secret_key,
- "User-Agent": user_agent.to_json,
+ "User-Agent": user_agent.to_json
})
end
# Http user agent config
#
@@ -154,10 +154,10 @@
{
lib_version: Qismo::VERSION,
lang: "ruby",
lang_version: RUBY_VERSION,
platform: RUBY_PLATFORM,
- engine: defined?(RUBY_ENGINE) ? RUBY_ENGINE : "",
+ engine: defined?(RUBY_ENGINE) ? RUBY_ENGINE : ""
}
end
end
end