backlog_kit 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/backlog_kit/client.rb +2 -0
- data/lib/backlog_kit/client/issue.rb +83 -0
- data/lib/backlog_kit/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fe68e40d0c7190cf4042c4189ee6c8fcd32b3d6
|
4
|
+
data.tar.gz: 8eb95aa604c18e7c27edaabe7d4c5c5909418c3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 737e2582032664ec3bac0c1a4ed2f7a4b5ba2b6c33c9c7ba95fada48a2714999145910ed1ce5f60a3e5377b02759baf42cd99b7e0df89b8a560fec1a761cf4fa
|
7
|
+
data.tar.gz: 651352ded4b419f6f2987a96d1d6558db44e2eb0f4be26a6d557a41a885e7fe4f39863716e8a61b8e2a21d00ba79cc127213440aba40907ab9d2c333a10371f6
|
data/lib/backlog_kit/client.rb
CHANGED
@@ -3,6 +3,7 @@ require 'backlog_kit/response'
|
|
3
3
|
require 'backlog_kit/version'
|
4
4
|
require 'backlog_kit/client/git'
|
5
5
|
require 'backlog_kit/client/group'
|
6
|
+
require 'backlog_kit/client/issue'
|
6
7
|
require 'backlog_kit/client/notification'
|
7
8
|
require 'backlog_kit/client/priority'
|
8
9
|
require 'backlog_kit/client/resolution'
|
@@ -18,6 +19,7 @@ module BacklogKit
|
|
18
19
|
class Client
|
19
20
|
include BacklogKit::Client::Git
|
20
21
|
include BacklogKit::Client::Group
|
22
|
+
include BacklogKit::Client::Issue
|
21
23
|
include BacklogKit::Client::Notification
|
22
24
|
include BacklogKit::Client::Priority
|
23
25
|
include BacklogKit::Client::Resolution
|
@@ -0,0 +1,83 @@
|
|
1
|
+
module BacklogKit
|
2
|
+
class Client
|
3
|
+
module Issue
|
4
|
+
def get_issues(params = {})
|
5
|
+
get('issues', params)
|
6
|
+
end
|
7
|
+
|
8
|
+
def get_issue_count(params = {})
|
9
|
+
get('issues/count', params)
|
10
|
+
end
|
11
|
+
|
12
|
+
def get_issue(issue_id_or_key)
|
13
|
+
get("issues/#{issue_id_or_key}")
|
14
|
+
end
|
15
|
+
|
16
|
+
def create_issue(summary, params = {})
|
17
|
+
params.merge!(summary: summary)
|
18
|
+
post('issues', params)
|
19
|
+
end
|
20
|
+
|
21
|
+
def update_issue(issue_id_or_key, params = {})
|
22
|
+
patch("issues/#{issue_id_or_key}", params)
|
23
|
+
end
|
24
|
+
|
25
|
+
def delete_issue(issue_id_or_key)
|
26
|
+
delete("issues/#{issue_id_or_key}")
|
27
|
+
end
|
28
|
+
|
29
|
+
def get_comments(issue_id_or_key, params = {})
|
30
|
+
get("issues/#{issue_id_or_key}/comments", params)
|
31
|
+
end
|
32
|
+
|
33
|
+
def get_comment_count(issue_id_or_key)
|
34
|
+
get("issues/#{issue_id_or_key}/comments/count")
|
35
|
+
end
|
36
|
+
|
37
|
+
def get_comment(issue_id_or_key, comment_id)
|
38
|
+
get("issues/#{issue_id_or_key}/comments/#{comment_id}")
|
39
|
+
end
|
40
|
+
|
41
|
+
def add_comment(issue_id_or_key, content, params = {})
|
42
|
+
params.merge!(content: content)
|
43
|
+
post("issues/#{issue_id_or_key}/comments", params)
|
44
|
+
end
|
45
|
+
|
46
|
+
def update_comment(issue_id_or_key, comment_id, content)
|
47
|
+
patch("issues/#{issue_id_or_key}/comments/#{comment_id}", content: content)
|
48
|
+
end
|
49
|
+
|
50
|
+
def get_comment_notifications(issue_id_or_key, comment_id)
|
51
|
+
get("issues/#{issue_id_or_key}/comments/#{comment_id}/notifications")
|
52
|
+
end
|
53
|
+
|
54
|
+
def add_comment_notification(issue_id_or_key, comment_id, notified_user_ids = [])
|
55
|
+
post("issues/#{issue_id_or_key}/comments/#{comment_id}/notifications", notified_user_id: notified_user_ids)
|
56
|
+
end
|
57
|
+
|
58
|
+
def get_issue_attachments(issue_id_or_key)
|
59
|
+
get("issues/#{issue_id_or_key}/attachments")
|
60
|
+
end
|
61
|
+
|
62
|
+
def download_issue_attachment(issue_id_or_key, attachment_id)
|
63
|
+
get("issues/#{issue_id_or_key}/attachments/#{attachment_id}")
|
64
|
+
end
|
65
|
+
|
66
|
+
def remove_issue_attachment(issue_id_or_key, attachment_id)
|
67
|
+
delete("issues/#{issue_id_or_key}/attachments/#{attachment_id}")
|
68
|
+
end
|
69
|
+
|
70
|
+
def get_issue_shared_files(issue_id_or_key)
|
71
|
+
get("issues/#{issue_id_or_key}/sharedFiles")
|
72
|
+
end
|
73
|
+
|
74
|
+
def link_issue_shared_files(issue_id_or_key, file_ids = [])
|
75
|
+
post("issues/#{issue_id_or_key}/sharedFiles", file_id: file_ids)
|
76
|
+
end
|
77
|
+
|
78
|
+
def unlink_issue_shared_file(issue_id_or_key, file_id)
|
79
|
+
delete("issues/#{issue_id_or_key}/sharedFiles/#{file_id}")
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
data/lib/backlog_kit/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backlog_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- emsk
|
@@ -186,6 +186,7 @@ files:
|
|
186
186
|
- lib/backlog_kit/client.rb
|
187
187
|
- lib/backlog_kit/client/git.rb
|
188
188
|
- lib/backlog_kit/client/group.rb
|
189
|
+
- lib/backlog_kit/client/issue.rb
|
189
190
|
- lib/backlog_kit/client/notification.rb
|
190
191
|
- lib/backlog_kit/client/priority.rb
|
191
192
|
- lib/backlog_kit/client/resolution.rb
|