class WavesRubyClient::Api

Access to waves api

Public Instance Methods

call(path, method = :get, args = {}) click to toggle source
# File lib/waves_ruby_client/api.rb, line 19
def call(path, method = :get, args = {})
  response = HTTParty.send(method, WavesRubyClient::API_URL + path, args)
  JSON.parse(response.body)
end
call_data_feed(path) click to toggle source
# File lib/waves_ruby_client/api.rb, line 14
def call_data_feed(path)
  response = HTTParty.get(WavesRubyClient::DATA_FEED_URL + path)
  JSON.parse(response.body)
end
call_matcher(path, method = :get, args = {}) click to toggle source
# File lib/waves_ruby_client/api.rb, line 8
def call_matcher(path, method = :get, args = {})
  WavesRubyClient.try_many_times do
    call('/matcher' + path, method, args)
  end
end