Class: ArkEcosystem::Client::API::One::Peers
- Defined in:
- lib/arkecosystem/client/api/one/peers.rb
Overview
Methods for the Peers API
Instance Method Summary collapse
-
#all(parameters = {}) ⇒ Faraday::Response
Get all peers.
-
#show(ip_addr, port) ⇒ Faraday::Response
Get the peer by the given ip and port.
-
#version ⇒ Faraday::Response
Get the node version of the peer.
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 peers.
17 18 19 |
# File 'lib/arkecosystem/client/api/one/peers.rb', line 17 def all(parameters = {}) @client.get('peers', parameters) end |
#show(ip_addr, port) ⇒ Faraday::Response
Get the peer by the given ip and port.
27 28 29 |
# File 'lib/arkecosystem/client/api/one/peers.rb', line 27 def show(ip_addr, port) @client.get('peers/get', ip: ip_addr, port: port) end |
#version ⇒ Faraday::Response
Get the node version of the peer.
34 35 36 |
# File 'lib/arkecosystem/client/api/one/peers.rb', line 34 def version @client.get('peers/version') end |