Class: YandexTracker::Client

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

Overview

API client

Constant Summary collapse

BASE_URL =
"https://api.tracker.yandex.net/v2"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeClient

Returns a new instance of Client.



16
17
18
19
# File 'lib/yandex_tracker/client.rb', line 16

def initialize
  YandexTracker.configuration.validate!
  setup_connections
end

Instance Attribute Details

#connObject (readonly)

Returns the value of attribute conn.



14
15
16
# File 'lib/yandex_tracker/client.rb', line 14

def conn
  @conn
end

#multipart_connObject (readonly)

Returns the value of attribute multipart_conn.



14
15
16
# File 'lib/yandex_tracker/client.rb', line 14

def multipart_conn
  @multipart_conn
end

Instance Method Details

#attachments(issue: nil) ⇒ Object



42
43
44
# File 'lib/yandex_tracker/client.rb', line 42

def attachments(issue: nil)
  Collections::Attachments.new(self, issue)
end

#categoriesObject



58
59
60
# File 'lib/yandex_tracker/client.rb', line 58

def categories
  Collections::Categories.new(self)
end

#comments(issue: nil) ⇒ Object



38
39
40
# File 'lib/yandex_tracker/client.rb', line 38

def comments(issue: nil)
  Collections::Comments.new(self, issue)
end

#fieldsObject



54
55
56
# File 'lib/yandex_tracker/client.rb', line 54

def fields
  Collections::Fields.new(self)
end

#issues(queue: nil) ⇒ Object



34
35
36
# File 'lib/yandex_tracker/client.rb', line 34

def issues(queue: nil)
  Collections::Issues.new(self, queue)
end

#queuesObject



30
31
32
# File 'lib/yandex_tracker/client.rb', line 30

def queues
  Collections::Queues.new(self)
end

#resolutionsObject



50
51
52
# File 'lib/yandex_tracker/client.rb', line 50

def resolutions
  Collections::Resolutions.new(self)
end

#setup_connectionsObject



21
22
23
24
# File 'lib/yandex_tracker/client.rb', line 21

def setup_connections
  @conn = make_client(:json)
  @multipart_conn = make_client(:multipart)
end

#usersObject



26
27
28
# File 'lib/yandex_tracker/client.rb', line 26

def users
  Collections::Users.new(self)
end

#workflowsObject



46
47
48
# File 'lib/yandex_tracker/client.rb', line 46

def workflows
  Collections::Workflows.new(self)
end