Module: NutlinkEndpoints

Extended by:
Params, Request
Included in:
Blockfrostruby::CardanoMainNet
Defined in:
lib/blockfrostruby/endpoints/cardano/nutlink_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_address_metadata_list(address) ⇒ Hash

Calls get request on (@url)/nutlink/(address).

Parameters:

  • address (String) —

    will be added to the url for get request.

Returns:

  • (Hash) —

    formatted result with status and body keys.



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

def (address)
  Request.get_response("#{@url}/nutlink/#{address}", @project_id)
end

#get_address_metadata_tickers_list(address, params = {}) ⇒ Hash

Calls get request on (@url)/nutlink/(address)/tickers.

Parameters:

  • address (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.



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

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

#get_ticker_records(ticker, params = {}) ⇒ Hash

Calls get request on (@url)/nutlink/tickers/(ticker).

Parameters:

  • ticker (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.



46
47
48
49
# File 'lib/blockfrostruby/endpoints/cardano/nutlink_endpoints.rb', line 46

def get_ticker_records(ticker, params = {})
  params = Params.define_params(params, @config)
  Request.get_response("#{@url}/nutlink/tickers/#{ticker}", @project_id, params)
end

#get_ticker_records_by_address(address, ticker, params = {}) ⇒ Hash

Calls get request on (@url)/nutlink/(address)/tickers/(ticker).

Parameters:

  • address (String) —

    will be added to the url for get request.

  • ticker (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.



36
37
38
39
# File 'lib/blockfrostruby/endpoints/cardano/nutlink_endpoints.rb', line 36

def get_ticker_records_by_address(address, ticker, params = {})
  params = Params.define_params(params, @config)
  Request.get_response("#{@url}/nutlink/#{address}/tickers/#{ticker}", @project_id, params)
end