Class: ArkEcosystem::Client::API::Peers

Inherits:
Base
  • Object
show all
Defined in:
lib/arkecosystem/client/api/peers.rb

Overview

Methods for the Peers API

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from ArkEcosystem::Client::API::Base

Instance Method Details

#all(parameters = {}) ⇒ Faraday::Response

Get all peers.

Parameters:

  • parameters (Hash) (defaults to: {})

Returns:

  • (Faraday::Response)


13
14
15
# File 'lib/arkecosystem/client/api/peers.rb', line 13

def all(parameters = {})
  @client.get('peers', parameters)
end

#show(ip_addr) ⇒ Faraday::Response

Get the peer by the given ip.

Parameters:

  • ip_addr (String)

Returns:

  • (Faraday::Response)


22
23
24
# File 'lib/arkecosystem/client/api/peers.rb', line 22

def show(ip_addr)
  @client.get("peers/#{ip_addr}")
end