Module: PoolsEndpoints

Extended by:
Params, Request
Included in:
Blockfrostruby::CardanoMainNet
Defined in:
lib/blockfrostruby/endpoints/cardano/pools_endpoints.rb

Constant Summary

Constants included from Blockfrostruby

Blockfrostruby::VERSION

Instance Method Summary collapse

Methods included from Request

get_response, post_file, post_request_cbor, post_request_raw

Methods included from Params

define_params

Methods included from Validator

validate_init_params, validate_params

Methods included from Configuration

default_config, define_config

Instance Method Details

#get_list_of_retired_pools(params = {}) ⇒ Hash

Calls get request on (@url)/pools/retired.

Parameters:

  • params (Hash) (defaults to: {})
    • params passed by user.

Returns:

  • (Hash)

    formatted result with status and body keys.



25
26
27
28
# File 'lib/blockfrostruby/endpoints/cardano/pools_endpoints.rb', line 25

def get_list_of_retired_pools(params = {})
  params = Params.define_params(params, @config)
  Request.get_response("#{@url}/pools/retired", @project_id, params)
end

#get_list_of_retiring_pools(params = {}) ⇒ Hash

Calls get request on (@url)/pools/retiring.

Parameters:

  • params (Hash) (defaults to: {})
    • params passed by user.

Returns:

  • (Hash)

    formatted result with status and body keys.



34
35
36
37
# File 'lib/blockfrostruby/endpoints/cardano/pools_endpoints.rb', line 34

def get_list_of_retiring_pools(params = {})
  params = Params.define_params(params, @config)
  Request.get_response("#{@url}/pools/retiring", @project_id, params)
end

#get_pool(pool_id) ⇒ Hash

Calls get request on (@url)/pools/(pool_id).

Parameters:

  • pool_id (String)

    will be added to the url for get request.

Returns:

  • (Hash)

    formatted result with status and body keys.



43
44
45
# File 'lib/blockfrostruby/endpoints/cardano/pools_endpoints.rb', line 43

def get_pool(pool_id)
  Request.get_response("#{@url}/pools/#{pool_id}", @project_id)
end

#get_pool_blocks(pool_id, params = {}) ⇒ Hash

Calls get request on (@url)/pools/(pool_id)/blocks.

Parameters:

  • pool_id (String)

    will be added to the url for get request.

  • params (Hash) (defaults to: {})
    • params passed by user.

Returns:

  • (Hash)

    formatted result with status and body keys.



88
89
90
91
# File 'lib/blockfrostruby/endpoints/cardano/pools_endpoints.rb', line 88

def get_pool_blocks(pool_id, params = {})
  params = Params.define_params(params, @config)
  Request.get_response("#{@url}/pools/#{pool_id}/blocks", @project_id, params)
end

#get_pool_delegators(pool_id, params = {}) ⇒ Hash

Calls get request on (@url)/pools/(pool_id)/delegators.

Parameters:

  • pool_id (String)

    will be added to the url for get request.

  • params (Hash) (defaults to: {})
    • params passed by user.

Returns:

  • (Hash)

    formatted result with status and body keys.



78
79
80
81
# File 'lib/blockfrostruby/endpoints/cardano/pools_endpoints.rb', line 78

def get_pool_delegators(pool_id, params = {})
  params = Params.define_params(params, @config)
  Request.get_response("#{@url}/pools/#{pool_id}/delegators", @project_id, params)
end

#get_pool_history(pool_id, params = {}) ⇒ Hash

Calls get request on (@url)/pools/(pool_id)/history.

Parameters:

  • pool_id (String)

    will be added to the url for get request.

  • params (Hash) (defaults to: {})
    • params passed by user.

Returns:

  • (Hash)

    formatted result with status and body keys.



52
53
54
55
# File 'lib/blockfrostruby/endpoints/cardano/pools_endpoints.rb', line 52

def get_pool_history(pool_id, params = {})
  params = Params.define_params(params, @config)
  Request.get_response("#{@url}/pools/#{pool_id}/history", @project_id, params)
end

#get_pool_metadata(pool_id) ⇒ Hash

Calls get request on (@url)/pools/(pool_id)/metadata.

Parameters:

  • pool_id (String)

    will be added to the url for get request.

Returns:

  • (Hash)

    formatted result with status and body keys.



61
62
63
# File 'lib/blockfrostruby/endpoints/cardano/pools_endpoints.rb', line 61

def (pool_id)
  Request.get_response("#{@url}/pools/#{pool_id}/metadata", @project_id)
end

#get_pool_relays(pool_id) ⇒ Hash

Calls get request on (@url)/pools/(pool_id)/relays.

Parameters:

  • pool_id (String)

    will be added to the url for get request.

Returns:

  • (Hash)

    formatted result with status and body keys.



69
70
71
# File 'lib/blockfrostruby/endpoints/cardano/pools_endpoints.rb', line 69

def get_pool_relays(pool_id)
  Request.get_response("#{@url}/pools/#{pool_id}/relays", @project_id)
end

#get_pool_updates(pool_id, params = {}) ⇒ Hash

Calls get request on (@url)/pools/(pool_id)/updates.

Parameters:

  • pool_id (String)

    will be added to the url for get request.

  • params (Hash) (defaults to: {})
    • params passed by user.

Returns:

  • (Hash)

    formatted result with status and body keys.



98
99
100
101
# File 'lib/blockfrostruby/endpoints/cardano/pools_endpoints.rb', line 98

def get_pool_updates(pool_id, params = {})
  params = Params.define_params(params, @config)
  Request.get_response("#{@url}/pools/#{pool_id}/updates", @project_id, params)
end

#get_pools(params = {}) ⇒ Hash

Calls get request on (@url)/pools.

Parameters:

  • params (Hash) (defaults to: {})
    • params passed by user.

Returns:

  • (Hash)

    formatted result with status and body keys.



16
17
18
19
# File 'lib/blockfrostruby/endpoints/cardano/pools_endpoints.rb', line 16

def get_pools(params = {})
  params = Params.define_params(params, @config)
  Request.get_response("#{@url}/pools", @project_id, params)
end