Create a comment
@param [Hash] params @option params [String] :body
Required. The comment text.
@example
github = Github.new github.gists.comments.create 'gist-id'
@api public
# File lib/github_api/client/gists/comments.rb, line 58 def create(*args) arguments(args, required: [:gist_id]) do permit VALID_GIST_COMMENT_OPTIONS assert_required REQUIRED_GIST_COMMENT_OPTIONS end post_request("/gists/#{arguments.gist_id}/comments", arguments.params) end
Delete a comment
@xample
github = Github.new github.gists.comments.delete 'gist-id', 'comment-id'
# File lib/github_api/client/gists/comments.rb, line 93 def delete(*args) arguments(args, required: [:gist_id, :id]) delete_request("/gists/#{arguments.gist_id}/comments/#{arguments.id}", arguments.params) end
Edit a comment
@param [Hash] params @option params [String] :body
Required. The comment text.
@example
github = Github.new github.gists.comments.edit 'gist-id', 'comment-id'
@api public
# File lib/github_api/client/gists/comments.rb, line 78 def edit(*args) arguments(args, required: [:gist_id, :id]) do permit VALID_GIST_COMMENT_OPTIONS assert_required REQUIRED_GIST_COMMENT_OPTIONS end patch_request("/gists/#{arguments.gist_id}/comments/#{arguments.id}", arguments.params) end
Get a single comment
@example
github = Github.new github.gists.comments.get 'gist-id', 'comment-id'
@api public
# File lib/github_api/client/gists/comments.rb, line 40 def get(*args) arguments(args, required: [:gist_id, :id]) get_request("/gists/#{arguments.gist_id}/comments/#{arguments.id}", arguments.params) end
List comments on a gist
@example
github = Github.new github.gists.comments.list 'gist-id'
@return [Hash]
@api public
# File lib/github_api/client/gists/comments.rb, line 24 def list(*args) arguments(args, required: [:gist_id]) response = get_request("/gists/#{arguments.gist_id}/comments", arguments.params) return response unless block_given? response.each { |el| yield el } end
Generated with the Darkfish Rdoc Generator 2.