Class: ArkEcosystem::Client::API::One::Blocks

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

Overview

Methods for the Blocks 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 blocks.

Parameters:

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

Returns:

  • (Faraday::Response)


17
18
19
# File 'lib/arkecosystem/client/api/one/blocks.rb', line 17

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

#epochFaraday::Response

Get the blockchain epoch.

Returns:

  • (Faraday::Response)


33
34
35
# File 'lib/arkecosystem/client/api/one/blocks.rb', line 33

def epoch
  @client.get('blocks/getEpoch')
end

#feeFaraday::Response

Get the blockchain fee.

Returns:

  • (Faraday::Response)


54
55
56
# File 'lib/arkecosystem/client/api/one/blocks.rb', line 54

def fee
  @client.get('blocks/getFee')
end

#feesFaraday::Response

Get the blockchain fees.

Returns:

  • (Faraday::Response)


61
62
63
# File 'lib/arkecosystem/client/api/one/blocks.rb', line 61

def fees
  @client.get('blocks/getFees')
end

#heightFaraday::Response

Get the blockchain height.

Returns:

  • (Faraday::Response)


40
41
42
# File 'lib/arkecosystem/client/api/one/blocks.rb', line 40

def height
  @client.get('blocks/getHeight')
end

#milestoneFaraday::Response

Get the blockchain milestone.

Returns:

  • (Faraday::Response)


68
69
70
# File 'lib/arkecosystem/client/api/one/blocks.rb', line 68

def milestone
  @client.get('blocks/getMilestone')
end

#nethashFaraday::Response

Get the blockchain nethash.

Returns:

  • (Faraday::Response)


47
48
49
# File 'lib/arkecosystem/client/api/one/blocks.rb', line 47

def nethash
  @client.get('blocks/getNethash')
end

#rewardFaraday::Response

Get the blockchain reward.

Returns:

  • (Faraday::Response)


75
76
77
# File 'lib/arkecosystem/client/api/one/blocks.rb', line 75

def reward
  @client.get('blocks/getReward')
end

#show(id) ⇒ Faraday::Response

Get the delegate by the given id.

Parameters:

  • id (String)

Returns:

  • (Faraday::Response)


26
27
28
# File 'lib/arkecosystem/client/api/one/blocks.rb', line 26

def show(id)
  @client.get('blocks/get', id: id)
end

#statusFaraday::Response

Get the blockchain status.

Returns:

  • (Faraday::Response)


89
90
91
# File 'lib/arkecosystem/client/api/one/blocks.rb', line 89

def status
  @client.get('blocks/getStatus')
end

#supplyFaraday::Response

Get the blockchain supply.

Returns:

  • (Faraday::Response)


82
83
84
# File 'lib/arkecosystem/client/api/one/blocks.rb', line 82

def supply
  @client.get('blocks/getSupply')
end