class Eventum::API

Core API interface

Public Class Methods

new(config) click to toggle source

Creates a new instance of kind {Eventum::API}

@param config [Eventum::Configurable] a configuration object

@return [Eventum::API]

@api public

# File lib/eventum/api.rb, line 11
def initialize(config)
  @config = config
end

Private Instance Methods

connection() click to toggle source

Points to an {Eventum::Connection} object

@return [Eventum::Connection]

@api private

# File lib/eventum/api.rb, line 33
def connection
  @connection ||= Eventum::Connection.new
end
get(path) click to toggle source

Executes a GET request on the given path

@param path [String] the path of the endpoint to request

@return [Faraday::Response]

@api private

# File lib/eventum/api.rb, line 24
def get(path)
  connection.execute(method: :get, path: path, config: @config)
end