Class: YandexTracker::Resources::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/yandex_tracker/resources/base.rb

Overview

Resources::Base

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Base

Returns a new instance of Base.



13
14
15
# File 'lib/yandex_tracker/resources/base.rb', line 13

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



11
12
13
# File 'lib/yandex_tracker/resources/base.rb', line 11

def client
  @client
end

Instance Method Details

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



33
34
35
# File 'lib/yandex_tracker/resources/base.rb', line 33

def delete(path, params = {}, query_params = {})
  handle_response client.conn.delete(prepare_path(path, query_params), params)
end

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



17
18
19
# File 'lib/yandex_tracker/resources/base.rb', line 17

def get(path, params = {}, query_params = {})
  handle_response client.conn.get(prepare_path(path, query_params), params)
end

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



29
30
31
# File 'lib/yandex_tracker/resources/base.rb', line 29

def patch(path, body = {}, query_params = {})
  handle_response client.conn.patch(prepare_path(path, query_params), body)
end

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



21
22
23
# File 'lib/yandex_tracker/resources/base.rb', line 21

def post(path, body = {}, query_params = {})
  handle_response client.conn.post(prepare_path(path, query_params), body)
end

#put(path, body = {}, query_params = {}) ⇒ Object



25
26
27
# File 'lib/yandex_tracker/resources/base.rb', line 25

def put(path, body = {}, query_params = {})
  handle_response client.conn.put(prepare_path(path, query_params), body)
end