class EtherClient::Api::WorkerApi

Public Class Methods

new(miner_id, worker_id = nil) click to toggle source
# File lib/etherclient/api/worker_api.rb, line 3
def initialize(miner_id, worker_id = nil)
  @miner_id = miner_id
  @worker_id = worker_id
end

Public Instance Methods

all_statistics() click to toggle source
# File lib/etherclient/api/worker_api.rb, line 8
def all_statistics
  array = ethermine_request("miner/#{@miner_id}/workers")
  EtherClient::Model::WorkerStatistic.all(array)
end
historical_statistics() click to toggle source
# File lib/etherclient/api/worker_api.rb, line 13
def historical_statistics
  array = ethermine_request("miner/#{@miner_id}/worker/#{@worker_id}/history")
  EtherClient::Model::WorkerHistoricalStatistic.all(array)
end
monitor() click to toggle source
# File lib/etherclient/api/worker_api.rb, line 24
def monitor
  array = ethermine_request("miner/#{@miner_id}/workers/monitor")
  EtherClient::Model::WorkerMonitor.all(array)
end
statistics() click to toggle source
# File lib/etherclient/api/worker_api.rb, line 18
def statistics
  data = ethermine_request("miner/#{@miner_id}/worker/#{@worker_id}/currentStats")
  data['worker'] = @worker_id
  EtherClient::Model::WorkerStatistic.new(data)
end