Module: CustomEndpoints

Extended by:
Params, Request
Included in:
Blockfrostruby::Net
Defined in:
lib/blockfrostruby/endpoints/custom_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_custom_url(custom_url, params = {}) ⇒ Hash

Add url from object and calls get request on specified url.

Parameters:

  • custom_url (string)

    url to request. Url from object will be added before this param.

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

Returns:

  • (Hash)

    formatted result with status and body keys.



15
16
17
18
# File 'lib/blockfrostruby/endpoints/custom_endpoints.rb', line 15

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

#get_help_infoString

Return a string with a link to documentation.

Returns:

  • (String)

    link to documentation.



23
24
25
# File 'lib/blockfrostruby/endpoints/custom_endpoints.rb', line 23

def get_help_info
  'See the documentation here - https://github.com/blockfrost/blockfrost-ruby'
end