Module: Octokit::Client::Reactions
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/octokit/client/reactions.rb |
Overview
Methods for the Reacions API
Instance Method Summary
-
#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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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
# 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