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 filter! VALID_GIST_COMMENT_OPTIONS, params assert_required_keys(REQUIRED_GIST_COMMENT_OPTIONS, params) post_request("/gists/#{gist_id}/comments", params) end
def delete(gist_id, comment_id, params={})
github.gists.comments.delete 'gist-id', 'comment-id'
github = Github.new
= Examples
Delete a comment
def delete(gist_id, comment_id, params={}) normalize! params assert_presence_of comment_id delete_request("/gists/#{gist_id}/comments/#{comment_id}", params) end
def edit(gist_id, comment_id, params={})
github.gists.comments.edit 'gist-id', 'comment-id'
github = Github.new
= Examples
Edit a comment
def edit(gist_id, comment_id, params={}) normalize! params assert_presence_of comment_id filter! VALID_GIST_COMMENT_OPTIONS, params assert_required_keys(REQUIRED_GIST_COMMENT_OPTIONS, params) patch_request("/gists/#{gist_id}/comments/#{comment_id}", params) end
def get(gist_id, comment_id, params={})
github.gists.comments.get 'gist-id', 'comment-id'
github = Github.new
= Examples
Get a single comment
def get(gist_id, comment_id, params={}) normalize! params assert_presence_of comment_id get_request("/gists/#{gist_id}/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 response = get_request("/gists/#{gist_id}/comments", params) return response unless block_given? response.each { |el| yield el } end