module Tinybucket::Api::Helper::CommentsHelper
Private Instance Methods
base_path()
click to toggle source
# File lib/tinybucket/api/helper/comments_helper.rb, line 20 def base_path case commented_to when Tinybucket::Model::Commit base_path_of_commit when Tinybucket::Model::PullRequest base_path_of_pullrequest else raise ArgumentError, 'commented_to must be a pull_request or commit' end end
base_path_of_commit()
click to toggle source
# File lib/tinybucket/api/helper/comments_helper.rb, line 31 def base_path_of_commit build_path('/repositories', [repo_owner, 'repo_owner'], [repo_slug, 'repo_slug'], 'commit', [commented_to.hash, 'revision'], 'comments') end
base_path_of_pullrequest()
click to toggle source
# File lib/tinybucket/api/helper/comments_helper.rb, line 40 def base_path_of_pullrequest build_path('/repositories', [repo_owner, 'repo_owner'], [repo_slug, 'repo_slug'], 'pullrequests', [commented_to.id, 'pull_request_id'], 'comments') end
path_to_find(comment_id)
click to toggle source
# File lib/tinybucket/api/helper/comments_helper.rb, line 15 def path_to_find(comment_id) build_path(base_path, [comment_id, 'comment_id']) end
path_to_list()
click to toggle source
# File lib/tinybucket/api/helper/comments_helper.rb, line 11 def path_to_list base_path end