Class: Kentaa::Api::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/kentaa/api/request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Request

Returns a new instance of Request.



12
13
14
# File 'lib/kentaa/api/request.rb', line 12

def initialize(config)
  @config = config
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



10
11
12
# File 'lib/kentaa/api/request.rb', line 10

def config
  @config
end

Instance Method Details

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



28
29
30
# File 'lib/kentaa/api/request.rb', line 28

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

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



16
17
18
# File 'lib/kentaa/api/request.rb', line 16

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

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



24
25
26
# File 'lib/kentaa/api/request.rb', line 24

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

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



20
21
22
# File 'lib/kentaa/api/request.rb', line 20

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