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.
-
#create_release_reaction(repo, release_id, reaction, options = {}) ⇒ <Sawyer::Resource>
Create reaction for a release.
-
#delete_issue_reaction(repo, issue_id, reaction_id, options = {}) ⇒ Boolean
Delete a reaction.
-
#delete_release_reaction(repo, release_id, reaction_id, options = {}) ⇒ Boolean
Delete a reaction for a release.
-
#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.
-
#release_reactions(repo, release_id, options = {}) ⇒ Array<Sawyer::Resource>
List reactions for a release.
Instance Method Details
#commit_comment_reactions(repo, id, options = {}) ⇒ Array<Sawyer::Resource>
List reactions for a commit comment
19 20 21 |
# File 'lib/octokit/client/reactions.rb', line 19 def commit_comment_reactions(repo, id, = {}) 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
35 36 37 38 |
# File 'lib/octokit/client/reactions.rb', line 35 def create_commit_comment_reaction(repo, id, reaction, = {}) = .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
100 101 102 103 |
# File 'lib/octokit/client/reactions.rb', line 100 def create_issue_comment_reaction(repo, id, reaction, = {}) = .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
67 68 69 70 |
# File 'lib/octokit/client/reactions.rb', line 67 def create_issue_reaction(repo, number, reaction, = {}) = .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
133 134 135 136 |
# File 'lib/octokit/client/reactions.rb', line 133 def create_pull_request_review_comment_reaction(repo, id, reaction, = {}) = .merge(content: reaction) post "#{Repository.path repo}/pulls/comments/#{id}/reactions", end |
#create_release_reaction(repo, release_id, reaction, options = {}) ⇒ <Sawyer::Resource>
Create reaction for a release
182 183 184 185 |
# File 'lib/octokit/client/reactions.rb', line 182 def create_release_reaction(repo, release_id, reaction, = {}) = .merge(content: reaction) post "#{Repository.path repo}/releases/#{release_id}/reactions", end |
#delete_issue_reaction(repo, issue_id, reaction_id, options = {}) ⇒ Boolean
Delete a reaction
150 151 152 |
# File 'lib/octokit/client/reactions.rb', line 150 def delete_issue_reaction(repo, issue_id, reaction_id, = {}) boolean_from_response :delete, "#{Repository.path repo}/issues/#{issue_id}/reactions/#{reaction_id}", end |
#delete_release_reaction(repo, release_id, reaction_id, options = {}) ⇒ Boolean
Delete a reaction for a release
199 200 201 |
# File 'lib/octokit/client/reactions.rb', line 199 def delete_release_reaction(repo, release_id, reaction_id, = {}) boolean_from_response :delete, "#{Repository.path repo}/releases/#{release_id}/reactions/#{reaction_id}", end |
#issue_comment_reactions(repo, id, options = {}) ⇒ Array<Sawyer::Resource>
List reactions for an issue comment
83 84 85 |
# File 'lib/octokit/client/reactions.rb', line 83 def issue_comment_reactions(repo, id, = {}) get "#{Repository.path repo}/issues/comments/#{id}/reactions", end |
#issue_reactions(repo, number, options = {}) ⇒ Array<Sawyer::Resource>
List reactions for an issue
50 51 52 |
# File 'lib/octokit/client/reactions.rb', line 50 def issue_reactions(repo, number, = {}) 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
116 117 118 |
# File 'lib/octokit/client/reactions.rb', line 116 def pull_request_review_comment_reactions(repo, id, = {}) get "#{Repository.path repo}/pulls/comments/#{id}/reactions", end |
#release_reactions(repo, release_id, options = {}) ⇒ Array<Sawyer::Resource>
List reactions for a release
165 166 167 |
# File 'lib/octokit/client/reactions.rb', line 165 def release_reactions(repo, release_id, = {}) get "#{Repository.path repo}/releases/#{release_id}/reactions", end |