class Github::Gists::Comments
def create(gist_id, params={})
github.gists.comments.create 'gist-id'
github = Github.new
= Examples
Create a comment
def create(gist_id, params={}) normalize! params # _merge_mime_type(:gist_comment, params) filter! ALLOWED_GIST_COMMENT_INPUTS, params assert_required_keys(REQUIRED_GIST_COMMENT_INPUTS, params) post_request("/gists/#{gist_id}/comments", params) end
def delete(comment_id, params={})
github.gists.comments.delete 'comment-id'
github = Github.new
= Examples
Delete a comment
def delete(comment_id, params={}) normalize! params assert_presence_of comment_id # _merge_mime_type(:gist_comment, params) delete_request("/gists/comments/#{comment_id}", params) end
def edit(comment_id, params={})
github.gists.comments.edit 'comment-id'
github = Github.new
= Examples
Edit a comment
def edit(comment_id, params={}) normalize! params assert_presence_of comment_id # _merge_mime_type(:gist_comment, params) filter! ALLOWED_GIST_COMMENT_INPUTS, params assert_required_keys(REQUIRED_GIST_COMMENT_INPUTS, params) patch_request("/gists/comments/#{comment_id}", params) end
def get(comment_id, params={})
github.gists.comments.get 'comment-id'
github = Github.new
= Examples
Get a single comment
def get(comment_id, params={}) normalize! params assert_presence_of comment_id # _merge_mime_type(:gist_comment, params) get_request("/gists/comments/#{comment_id}", params) end
def list(gist_id, params={})
github.gists.comments.list 'gist-id'
github = Github.new
= Examples
List comments on a gist
def list(gist_id, params={}) normalize! params assert_presence_of gist_id # _merge_mime_type(:gist_comment, params) response = get_request("/gists/#{gist_id}/comments", params) return response unless block_given? response.each { |el| yield el } end