class Bitmart::API::System
Constants
- API_ENDPOINT
Public Instance Methods
get_system_service()
click to toggle source
get system service
# File lib/bitmart/api_system.rb, line 15 def get_system_service request( http_method: :get, endpoint: "service" ) end
get_system_time()
click to toggle source
get system time
# File lib/bitmart/api_system.rb, line 7 def get_system_time request( http_method: :get, endpoint: "time" ) end
Private Instance Methods
client()
click to toggle source
# File lib/bitmart/api_system.rb, line 24 def client @_client ||= Faraday.new(API_ENDPOINT) do |client| client.request :url_encoded client.adapter Faraday.default_adapter end end
request(http_method:, endpoint:, params: {})
click to toggle source
# File lib/bitmart/api_system.rb, line 31 def request(http_method:, endpoint:, params: {}) response = client.public_send(http_method, endpoint, params) Oj.load(response.body) end