Class: Minato::Utils::Client

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/minato/utils/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(base_uri:, default_options: {}) ⇒ Client

Returns a new instance of Client.



12
13
14
15
# File 'lib/minato/utils/client.rb', line 12

def initialize(base_uri:, default_options: {})
  @base_uri = base_uri
  @default_options = default_options
end

Instance Method Details

#delete(path, options = {}) ⇒ Object



33
34
35
# File 'lib/minato/utils/client.rb', line 33

def delete(path, options = {})
  request(:delete, path, options)
end

#get(path, options = {}) ⇒ Object



17
18
19
# File 'lib/minato/utils/client.rb', line 17

def get(path, options = {})
  request(:get, path, options)
end

#patch(path, options = {}) ⇒ Object



29
30
31
# File 'lib/minato/utils/client.rb', line 29

def patch(path, options = {})
  request(:patch, path, options)
end

#post(path, options = {}) ⇒ Object



21
22
23
# File 'lib/minato/utils/client.rb', line 21

def post(path, options = {})
  request(:post, path, options)
end

#put(path, options = {}) ⇒ Object



25
26
27
# File 'lib/minato/utils/client.rb', line 25

def put(path, options = {})
  request(:put, path, options)
end