Module: Octokit::Client::Reactions
- Included in:
- Octokit::Client
- Defined in:
- lib/octokit/client/reactions.rb
Overview
Methods for the Reacions API
Instance Method Summary collapse
-
#commit_comment_reactions(repo, id, options = {}) ⇒ Array<Sawyer::Resource>
List reactions for a commit comment.
-
#create_commit_comment_reaction(repo, id, reaction, options = {}) ⇒ <Sawyer::Resource>
Create a reaction for a commit comment.
-
#create_issue_comment_reaction(repo, id, reaction, options = {}) ⇒ <Sawyer::Resource>
Create reaction for an issue comment.
-
#create_issue_reaction(repo, number, reaction, options = {}) ⇒ <Sawyer::Resource>
Create reaction for an issue.
-
#create_pull_request_review_comment_reaction(repo, id, reaction, options = {}) ⇒ <Sawyer::Resource>
Create reaction for a pull request review comment.
-
#delete_reaction(id, options = {}) ⇒ Boolean
Delete a reaction.
-
#issue_comment_reactions(repo, id, options = {}) ⇒ Array<Sawyer::Resource>
List reactions for an issue comment.
-
#issue_reactions(repo, number, options = {}) ⇒ Array<Sawyer::Resource>
List reactions for an issue.
-
#pull_request_review_comment_reactions(repo, id, options = {}) ⇒ Array<Sawyer::Resource>
List reactions for a pull request review comment.
Instance Method Details
#commit_comment_reactions(repo, id, options = {}) ⇒ Array<Sawyer::Resource>
List reactions for a commit comment
19 20 21 22 |
# File 'lib/octokit/client/reactions.rb', line 19 def commit_comment_reactions(repo, id, = {}) = ensure_api_media_type(:reactions, ) get "#{Repository.path repo}/comments/#{id}/reactions", end |
#create_commit_comment_reaction(repo, id, reaction, options = {}) ⇒ <Sawyer::Resource>
Create a reaction for a commit comment
36 37 38 39 |
# File 'lib/octokit/client/reactions.rb', line 36 def create_commit_comment_reaction(repo, id, reaction, = {}) = ensure_api_media_type(:reactions, .merge(:content => reaction)) post "#{Repository.path repo}/comments/#{id}/reactions", end |
#create_issue_comment_reaction(repo, id, reaction, options = {}) ⇒ <Sawyer::Resource>
Create reaction for an issue comment
103 104 105 106 |
# File 'lib/octokit/client/reactions.rb', line 103 def create_issue_comment_reaction(repo, id, reaction, = {}) = ensure_api_media_type(:reactions, .merge(:content => reaction)) post "#{Repository.path repo}/issues/comments/#{id}/reactions", end |
#create_issue_reaction(repo, number, reaction, options = {}) ⇒ <Sawyer::Resource>
Create reaction for an issue
69 70 71 72 |
# File 'lib/octokit/client/reactions.rb', line 69 def create_issue_reaction(repo, number, reaction, = {}) = ensure_api_media_type(:reactions, .merge(:content => reaction)) post "#{Repository.path repo}/issues/#{number}/reactions", end |
#create_pull_request_review_comment_reaction(repo, id, reaction, options = {}) ⇒ <Sawyer::Resource>
Create reaction for a pull request review comment
137 138 139 140 |
# File 'lib/octokit/client/reactions.rb', line 137 def create_pull_request_review_comment_reaction(repo, id, reaction, = {}) = ensure_api_media_type(:reactions, .merge(:content => reaction)) post "#{Repository.path repo}/pulls/comments/#{id}/reactions", end |
#delete_reaction(id, options = {}) ⇒ Boolean
Delete a reaction
152 153 154 155 |
# File 'lib/octokit/client/reactions.rb', line 152 def delete_reaction(id, = {}) = ensure_api_media_type(:reactions, ) boolean_from_response :delete, "reactions/#{id}", end |
#issue_comment_reactions(repo, id, options = {}) ⇒ Array<Sawyer::Resource>
List reactions for an issue comment
85 86 87 88 |
# File 'lib/octokit/client/reactions.rb', line 85 def issue_comment_reactions(repo, id, = {}) = ensure_api_media_type(:reactions, ) get "#{Repository.path repo}/issues/comments/#{id}/reactions", end |
#issue_reactions(repo, number, options = {}) ⇒ Array<Sawyer::Resource>
List reactions for an issue
51 52 53 54 |
# File 'lib/octokit/client/reactions.rb', line 51 def issue_reactions(repo, number, = {}) = ensure_api_media_type(:reactions, ) get "#{Repository.path repo}/issues/#{number}/reactions", end |
#pull_request_review_comment_reactions(repo, id, options = {}) ⇒ Array<Sawyer::Resource>
List reactions for a pull request review comment
119 120 121 122 |
# File 'lib/octokit/client/reactions.rb', line 119 def pull_request_review_comment_reactions(repo, id, = {}) = ensure_api_media_type(:reactions, ) get "#{Repository.path repo}/pulls/comments/#{id}/reactions", end |