Class: Kagi::API::Requester

Inherits:
Object
  • Object
show all
Defined in:
lib/kagi/api/requester.rb

Overview

The low-level object for making basic HTTP requests.

Instance Method Summary collapse

Constructor Details

#initialize {|settings| ... } ⇒ Requester

Returns a new instance of Requester.

Yields:

  • (settings)


10
11
12
13
# File 'lib/kagi/api/requester.rb', line 10

def initialize(**)
  super
  yield settings if block_given?
end

Instance Method Details

#get(path, **params) ⇒ Object



15
# File 'lib/kagi/api/requester.rb', line 15

def get(path, **params) = call(__method__, path, params:)

#post(path, **json) ⇒ Object



17
# File 'lib/kagi/api/requester.rb', line 17

def post(path, **json) = call(__method__, path, json:)