class Github::Client::Gists::Comments

def create(*args)

Other tags:
    Api: - public

Options Hash: (**params)
  • :body (String) --

Parameters:
  • params (Hash) --
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

def delete(*args)


github.gists.comments.delete 'gist-id', 'comment-id'
github = Github.new
@xample

Delete a comment
def delete(*args)
  arguments(args, required: [:gist_id, :id])
  delete_request("/gists/#{arguments.gist_id}/comments/#{arguments.id}", arguments.params)
end

def edit(*args)

Other tags:
    Api: - public

Options Hash: (**params)
  • :body (String) --

Parameters:
  • params (Hash) --
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

def get(*args)

Other tags:
    Api: - public
def get(*args)
  arguments(args, required: [:gist_id, :id])
  get_request("/gists/#{arguments.gist_id}/comments/#{arguments.id}", arguments.params)
end

def list(*args)

Other tags:
    Api: - public

Returns:
  • (Hash) -
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