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 |
# 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 |
#delete_reaction(id, options = {}) ⇒ Boolean
Delete a reaction
148 149 150 |
# File 'lib/octokit/client/reactions.rb', line 148 def delete_reaction(id, = {}) boolean_from_response :delete, "reactions/#{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 |