Class: Tomba::Logs

Inherits:
Service show all
Defined in:
lib/tomba/services/logs.rb

Overview

Logs service for retrieving API request logs.

Provides methods to get the history of API requests.

Instance Method Summary collapse

Methods inherited from Service

#initialize

Constructor Details

This class inherits a constructor from Tomba::Service

Instance Method Details

#get_logs(page: nil, limit: nil) ⇒ Hash

Get Logs

Returns the log history of API requests.

Parameters:

  • page (Integer, nil) (defaults to: nil)

    the page number for pagination

  • limit (Integer, nil) (defaults to: nil)

    the number of results per page

Returns:

  • (Hash)

    API response containing log entries

Raises:

See Also:



19
20
21
22
23
24
25
26
27
28
29
# File 'lib/tomba/services/logs.rb', line 19

def get_logs(page: nil, limit: nil)
  path = '/logs'

  params = {}
  params[:page] = page unless page.nil?
  params[:limit] = limit unless limit.nil?

  @client.call('get', path, {
                 'content-type' => 'application/json'
               }, params)
end