Class: YandexTracker::Client
- Inherits:
-
Object
- Object
- YandexTracker::Client
- 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
-
#conn ⇒ Object
readonly
Returns the value of attribute conn.
-
#multipart_conn ⇒ Object
readonly
Returns the value of attribute multipart_conn.
Instance Method Summary collapse
- #attachments(issue: nil) ⇒ Object
- #categories ⇒ Object
- #comments(issue: nil) ⇒ Object
- #fields ⇒ Object
-
#initialize ⇒ Client
constructor
A new instance of Client.
- #issues(queue: nil) ⇒ Object
- #queues ⇒ Object
- #resolutions ⇒ Object
- #setup_connections ⇒ Object
- #users ⇒ Object
- #workflows ⇒ Object
Constructor Details
#initialize ⇒ Client
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
#conn ⇒ Object (readonly)
Returns the value of attribute conn.
14 15 16 |
# File 'lib/yandex_tracker/client.rb', line 14 def conn @conn end |
#multipart_conn ⇒ Object (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 (issue: nil) Collections::Attachments.new(self, issue) end |
#categories ⇒ Object
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 |
#fields ⇒ Object
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 |
#queues ⇒ Object
30 31 32 |
# File 'lib/yandex_tracker/client.rb', line 30 def queues Collections::Queues.new(self) end |
#resolutions ⇒ Object
50 51 52 |
# File 'lib/yandex_tracker/client.rb', line 50 def resolutions Collections::Resolutions.new(self) end |
#setup_connections ⇒ Object
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 |
#users ⇒ Object
26 27 28 |
# File 'lib/yandex_tracker/client.rb', line 26 def users Collections::Users.new(self) end |
#workflows ⇒ Object
46 47 48 |
# File 'lib/yandex_tracker/client.rb', line 46 def workflows Collections::Workflows.new(self) end |