Class: ArkEcosystem::Client::API::One::Delegates
- Defined in:
- lib/arkecosystem/client/api/one/delegates.rb
Overview
Methods for the Delegates API
Instance Method Summary collapse
-
#all(parameters = {}) ⇒ Faraday::Response
Get all delegates.
-
#count ⇒ Faraday::Response
Count all delegates.
-
#fee ⇒ Faraday::Response
Get the delegate registration fee.
-
#forged_by_account(generator_public_key) ⇒ Faraday::Response
Get the total forged for the given delegate.
-
#forging_status(public_key, parameters = {}) ⇒ Faraday::Response
Get the forging status for the given delegate.
-
#next_forgers ⇒ Faraday::Response
Get a list of the next forgers.
-
#search(query, parameters = {}) ⇒ Faraday::Response
Search all delegates.
-
#show(parameters = {}) ⇒ Faraday::Response
Get the delegate by the given id.
-
#voters(public_key, parameters = {}) ⇒ Faraday::Response
Get the voters for the given delegate.
Methods inherited from Base
Constructor Details
This class inherits a constructor from ArkEcosystem::Client::API::Base
Instance Method Details
#all(parameters = {}) ⇒ Faraday::Response
Get all delegates.
17 18 19 |
# File 'lib/arkecosystem/client/api/one/delegates.rb', line 17 def all(parameters = {}) @client.get('delegates', parameters) end |
#count ⇒ Faraday::Response
Count all delegates.
33 34 35 |
# File 'lib/arkecosystem/client/api/one/delegates.rb', line 33 def count @client.get('delegates/count') end |
#fee ⇒ Faraday::Response
Get the delegate registration fee.
64 65 66 |
# File 'lib/arkecosystem/client/api/one/delegates.rb', line 64 def fee @client.get('delegates/fee') end |
#forged_by_account(generator_public_key) ⇒ Faraday::Response
Get the total forged for the given delegate.
73 74 75 76 |
# File 'lib/arkecosystem/client/api/one/delegates.rb', line 73 def forged_by_account(generator_public_key) parameters = { generatorPublicKey: generator_public_key } @client.get('delegates/forging/getForgedByAccount', parameters) end |
#forging_status(public_key, parameters = {}) ⇒ Faraday::Response
Get the forging status for the given delegate.
93 94 95 96 97 |
# File 'lib/arkecosystem/client/api/one/delegates.rb', line 93 def forging_status(public_key, parameters = {}) mandatory = { publicKey: public_key } @client.get('delegates/forging/status', mandatory.merge(parameters)) end |
#next_forgers ⇒ Faraday::Response
Get a list of the next forgers.
83 84 85 |
# File 'lib/arkecosystem/client/api/one/delegates.rb', line 83 def next_forgers @client.get('delegates/getNextForgers') end |
#search(query, parameters = {}) ⇒ Faraday::Response
Search all delegates.
43 44 45 |
# File 'lib/arkecosystem/client/api/one/delegates.rb', line 43 def search(query, parameters = {}) @client.get('delegates/search', { q: query }.merge(parameters)) end |
#show(parameters = {}) ⇒ Faraday::Response
Get the delegate by the given id.
26 27 28 |
# File 'lib/arkecosystem/client/api/one/delegates.rb', line 26 def show(parameters = {}) @client.get('delegates/get', parameters) end |
#voters(public_key, parameters = {}) ⇒ Faraday::Response
Get the voters for the given delegate.
53 54 55 56 57 |
# File 'lib/arkecosystem/client/api/one/delegates.rb', line 53 def voters(public_key, parameters = {}) mandatory = { publicKey: public_key } @client.get('delegates/voters', mandatory.merge(parameters)) end |