Module: BacklogKit::Client::Issue
- Included in:
- BacklogKit::Client
- Defined in:
- lib/backlog_kit/client/issue.rb
Overview
Methods for the Issue API
Instance Method Summary collapse
-
#add_comment(issue_id_or_key, content, params = {}) ⇒ BacklogKit::Response
Add a comment to an issue.
-
#add_comment_notification(issue_id_or_key, comment_id, notified_user_ids = []) ⇒ BacklogKit::Response
Add notifications to an comment.
-
#create_issue(summary, params = {}) ⇒ BacklogKit::Response
Create a new issue.
-
#delete_comment(issue_id_or_key, comment_id) ⇒ BacklogKit::Response
Delete a comment in issue.
-
#delete_issue(issue_id_or_key) ⇒ BacklogKit::Response
Delete an issue.
-
#download_issue_attachment(issue_id_or_key, attachment_id) ⇒ BacklogKit::Response
Download an attachment file on issue.
-
#get_comment(issue_id_or_key, comment_id) ⇒ BacklogKit::Response
Get a comment in issue.
-
#get_comment_count(issue_id_or_key) ⇒ BacklogKit::Response
Get number of comments in issue.
-
#get_comment_notifications(issue_id_or_key, comment_id) ⇒ BacklogKit::Response
Get list of comment notifications.
-
#get_comments(issue_id_or_key, params = {}) ⇒ BacklogKit::Response
Get list of comments in issue.
-
#get_issue(issue_id_or_key) ⇒ BacklogKit::Response
Get an issue.
-
#get_issue_attachments(issue_id_or_key) ⇒ BacklogKit::Response
Get list of attachment files on issue.
-
#get_issue_count(params = {}) ⇒ BacklogKit::Response
Get number of issues.
-
#get_issue_shared_files(issue_id_or_key) ⇒ BacklogKit::Response
Get list of shared files on issue.
-
#get_issues(params = {}) ⇒ BacklogKit::Response
Get list of issues.
-
#link_issue_shared_files(issue_id_or_key, file_ids = []) ⇒ BacklogKit::Response
Link shared files to an issue.
-
#remove_issue_attachment(issue_id_or_key, attachment_id) ⇒ BacklogKit::Response
Remove an attachment file from issue.
-
#unlink_issue_shared_file(issue_id_or_key, file_id) ⇒ BacklogKit::Response
Unlink a shared file on issue.
-
#update_comment(issue_id_or_key, comment_id, content) ⇒ BacklogKit::Response
Update a comment in issue.
-
#update_issue(issue_id_or_key, params = {}) ⇒ BacklogKit::Response
Update an issue.
Instance Method Details
#add_comment(issue_id_or_key, content, params = {}) ⇒ BacklogKit::Response
Add a comment to an issue
88 89 90 91 |
# File 'lib/backlog_kit/client/issue.rb', line 88 def add_comment(issue_id_or_key, content, params = {}) params[:content] = content post("issues/#{issue_id_or_key}/comments", params) end |
#add_comment_notification(issue_id_or_key, comment_id, notified_user_ids = []) ⇒ BacklogKit::Response
Add notifications to an comment
127 128 129 |
# File 'lib/backlog_kit/client/issue.rb', line 127 def add_comment_notification(issue_id_or_key, comment_id, notified_user_ids = []) post("issues/#{issue_id_or_key}/comments/#{comment_id}/notifications", notified_user_id: notified_user_ids) end |
#create_issue(summary, params = {}) ⇒ BacklogKit::Response
Create a new issue
34 35 36 37 |
# File 'lib/backlog_kit/client/issue.rb', line 34 def create_issue(summary, params = {}) params[:summary] = summary post('issues', params) end |
#delete_comment(issue_id_or_key, comment_id) ⇒ BacklogKit::Response
Delete a comment in issue
108 109 110 |
# File 'lib/backlog_kit/client/issue.rb', line 108 def delete_comment(issue_id_or_key, comment_id) delete("issues/#{issue_id_or_key}/comments/#{comment_id}") end |
#delete_issue(issue_id_or_key) ⇒ BacklogKit::Response
Delete an issue
52 53 54 |
# File 'lib/backlog_kit/client/issue.rb', line 52 def delete_issue(issue_id_or_key) delete("issues/#{issue_id_or_key}") end |
#download_issue_attachment(issue_id_or_key, attachment_id) ⇒ BacklogKit::Response
Download an attachment file on issue
144 145 146 |
# File 'lib/backlog_kit/client/issue.rb', line 144 def (issue_id_or_key, ) get("issues/#{issue_id_or_key}/attachments/#{}") end |
#get_comment(issue_id_or_key, comment_id) ⇒ BacklogKit::Response
Get a comment in issue
78 79 80 |
# File 'lib/backlog_kit/client/issue.rb', line 78 def get_comment(issue_id_or_key, comment_id) get("issues/#{issue_id_or_key}/comments/#{comment_id}") end |
#get_comment_count(issue_id_or_key) ⇒ BacklogKit::Response
Get number of comments in issue
69 70 71 |
# File 'lib/backlog_kit/client/issue.rb', line 69 def get_comment_count(issue_id_or_key) get("issues/#{issue_id_or_key}/comments/count") end |
#get_comment_notifications(issue_id_or_key, comment_id) ⇒ BacklogKit::Response
Get list of comment notifications
117 118 119 |
# File 'lib/backlog_kit/client/issue.rb', line 117 def get_comment_notifications(issue_id_or_key, comment_id) get("issues/#{issue_id_or_key}/comments/#{comment_id}/notifications") end |
#get_comments(issue_id_or_key, params = {}) ⇒ BacklogKit::Response
Get list of comments in issue
61 62 63 |
# File 'lib/backlog_kit/client/issue.rb', line 61 def get_comments(issue_id_or_key, params = {}) get("issues/#{issue_id_or_key}/comments", params) end |
#get_issue(issue_id_or_key) ⇒ BacklogKit::Response
Get an issue
25 26 27 |
# File 'lib/backlog_kit/client/issue.rb', line 25 def get_issue(issue_id_or_key) get("issues/#{issue_id_or_key}") end |
#get_issue_attachments(issue_id_or_key) ⇒ BacklogKit::Response
Get list of attachment files on issue
135 136 137 |
# File 'lib/backlog_kit/client/issue.rb', line 135 def (issue_id_or_key) get("issues/#{issue_id_or_key}/attachments") end |
#get_issue_count(params = {}) ⇒ BacklogKit::Response
Get number of issues
17 18 19 |
# File 'lib/backlog_kit/client/issue.rb', line 17 def get_issue_count(params = {}) get('issues/count', params) end |
#get_issue_shared_files(issue_id_or_key) ⇒ BacklogKit::Response
Get list of shared files on issue
161 162 163 |
# File 'lib/backlog_kit/client/issue.rb', line 161 def get_issue_shared_files(issue_id_or_key) get("issues/#{issue_id_or_key}/sharedFiles") end |
#get_issues(params = {}) ⇒ BacklogKit::Response
Get list of issues
9 10 11 |
# File 'lib/backlog_kit/client/issue.rb', line 9 def get_issues(params = {}) get('issues', params) end |
#link_issue_shared_files(issue_id_or_key, file_ids = []) ⇒ BacklogKit::Response
Link shared files to an issue
170 171 172 |
# File 'lib/backlog_kit/client/issue.rb', line 170 def link_issue_shared_files(issue_id_or_key, file_ids = []) post("issues/#{issue_id_or_key}/sharedFiles", file_id: file_ids) end |
#remove_issue_attachment(issue_id_or_key, attachment_id) ⇒ BacklogKit::Response
Remove an attachment file from issue
153 154 155 |
# File 'lib/backlog_kit/client/issue.rb', line 153 def (issue_id_or_key, ) delete("issues/#{issue_id_or_key}/attachments/#{}") end |
#unlink_issue_shared_file(issue_id_or_key, file_id) ⇒ BacklogKit::Response
Unlink a shared file on issue
179 180 181 |
# File 'lib/backlog_kit/client/issue.rb', line 179 def unlink_issue_shared_file(issue_id_or_key, file_id) delete("issues/#{issue_id_or_key}/sharedFiles/#{file_id}") end |
#update_comment(issue_id_or_key, comment_id, content) ⇒ BacklogKit::Response
Update a comment in issue
99 100 101 |
# File 'lib/backlog_kit/client/issue.rb', line 99 def update_comment(issue_id_or_key, comment_id, content) patch("issues/#{issue_id_or_key}/comments/#{comment_id}", content: content) end |
#update_issue(issue_id_or_key, params = {}) ⇒ BacklogKit::Response
Update an issue
44 45 46 |
# File 'lib/backlog_kit/client/issue.rb', line 44 def update_issue(issue_id_or_key, params = {}) patch("issues/#{issue_id_or_key}", params) end |