Class: ArkEcosystem::Client::API::Two::Wallets

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

Overview

Methods for the Wallets 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 wallets.

Parameters:

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

Returns:

  • (Faraday::Response)


17
18
19
# File 'lib/arkecosystem/client/api/two/wallets.rb', line 17

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

#received_transaction(id, parameters = {}) ⇒ Faraday::Response

Get the received transactions for the given wallet.

Parameters:

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

Returns:

  • (Faraday::Response)


65
66
67
# File 'lib/arkecosystem/client/api/two/wallets.rb', line 65

def received_transaction(id, parameters = {})
  @client.get("wallets/#{id}/transactions/received", parameters)
end

#search(parameters) ⇒ Faraday::Response

Search all wallets.

Parameters:

  • parameters (Hash)

Returns:

  • (Faraday::Response)


83
84
85
# File 'lib/arkecosystem/client/api/two/wallets.rb', line 83

def search(parameters)
  @client.post('wallets/search', parameters)
end

#sent_transactions(id, parameters = {}) ⇒ Faraday::Response

Get the sent transactions for the given wallet.

Parameters:

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

Returns:

  • (Faraday::Response)


55
56
57
# File 'lib/arkecosystem/client/api/two/wallets.rb', line 55

def sent_transactions(id, parameters = {})
  @client.get("wallets/#{id}/transactions/sent", parameters)
end

#show(id) ⇒ Faraday::Response

Get the wallet by the given id.

Parameters:

  • id (String)

Returns:

  • (Faraday::Response)


35
36
37
# File 'lib/arkecosystem/client/api/two/wallets.rb', line 35

def show(id)
  @client.get("wallets/#{id}")
end

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

Get all wallets sorted by balance.

Parameters:

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

Returns:

  • (Faraday::Response)


26
27
28
# File 'lib/arkecosystem/client/api/two/wallets.rb', line 26

def top(parameters = {})
  @client.get('wallets/top', parameters)
end

#transactions(id, parameters = {}) ⇒ Faraday::Response

Get the transactions for the given wallet.

Parameters:

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

Returns:

  • (Faraday::Response)


45
46
47
# File 'lib/arkecosystem/client/api/two/wallets.rb', line 45

def transactions(id, parameters = {})
  @client.get("wallets/#{id}/transactions", parameters)
end

#votes(id) ⇒ Faraday::Response

Get the votes for the given wallet.

Parameters:

  • if (String)

Returns:

  • (Faraday::Response)


74
75
76
# File 'lib/arkecosystem/client/api/two/wallets.rb', line 74

def votes(id)
  @client.get("wallets/#{id}/votes")
end