module BacklogKit::Client::Issue
Methods for the Issue
API
Public Instance Methods
Add a comment to an issue
@param issue_id_or_key [Integer, String] Issue
id or Issue
key @param content [String] Content of the comment @param params [Hash] Request parameters @return [BacklogKit::Response] The comment information
# 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 notifications to an comment
@param issue_id_or_key [Integer, String] Issue
id or Issue
key @param comment_id [Integer, String] Comment id @param notified_user_ids [Array] List of notified user ids @return [BacklogKit::Response] The notification information
# 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 a new issue
@param summary [String] Summary of the issue @param params [Hash] Request parameters @return [BacklogKit::Response] The issue information
# File lib/backlog_kit/client/issue.rb, line 34 def create_issue(summary, params = {}) params[:summary] = summary post('issues', params) end
Delete a comment in issue
@param issue_id_or_key [Integer, String] Issue
id or Issue
key @param comment_id [Integer, String] Comment id @return [BacklogKit::Response] The comment information
# 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
Download an attachment file on issue
@param issue_id_or_key [Integer, String] Issue
id or Issue
key @param attachment_id [Integer, String] Attachment file id @return [BacklogKit::Response] Binary data
# File lib/backlog_kit/client/issue.rb, line 144 def download_issue_attachment(issue_id_or_key, attachment_id) get("issues/#{issue_id_or_key}/attachments/#{attachment_id}") end
Get a comment in issue
@param issue_id_or_key [Integer, String] Issue
id or Issue
key @param comment_id [Integer, String] Comment id @return [BacklogKit::Response] The comment information
# 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 list of comment notifications
@param issue_id_or_key [Integer, String] Issue
id or Issue
key @param comment_id [Integer, String] Comment id @return [BacklogKit::Response] List of notifications
# 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 list of comments in issue
@param issue_id_or_key [Integer, String] Issue
id or Issue
key @param params [Hash] Request parameters @return [BacklogKit::Response] List of comments
# 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 number of issues
@param params [Hash] Request parameters @return [BacklogKit::Response] Number of issues
# File lib/backlog_kit/client/issue.rb, line 17 def get_issue_count(params = {}) get('issues/count', params) end
Get list of issues
@param params [Hash] Request parameters @return [BacklogKit::Response] List of issues
# File lib/backlog_kit/client/issue.rb, line 9 def get_issues(params = {}) get('issues', params) end
Remove an attachment file from issue
@param issue_id_or_key [Integer, String] Issue
id or Issue
key @param attachment_id [Integer, String] Attachment file id @return [BacklogKit::Response] The issue information
# File lib/backlog_kit/client/issue.rb, line 153 def remove_issue_attachment(issue_id_or_key, attachment_id) delete("issues/#{issue_id_or_key}/attachments/#{attachment_id}") end
Update a comment in issue
@param issue_id_or_key [Integer, String] Issue
id or Issue
key @param comment_id [Integer, String] Comment id @param content [String] Content of the comment @return [BacklogKit::Response] The comment information
# 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 an issue
@param issue_id_or_key [Integer, String] Issue
id or Issue
key @param params [Hash] Request parameters @return [BacklogKit::Response] The issue information
# 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