Method: Octokit::Client::Gists#create_gist

Defined in:
lib/octokit/client/gists.rb

#create_gist(options = {}) ⇒ Sawyer::Resource

Create a gist

Parameters:

  • options (Hash) (defaults to: {})

    Gist information.

Options Hash (options):

  • :description (String)
  • :public (Boolean)

    Sets gist visibility

  • :files (Array<Hash>)

    Files that make up this gist. Keys should be the filename, the value a Hash with a :content key with text content of the Gist.

Returns:

  • (Sawyer::Resource)

    Newly created gist info

See Also:



71
72
73
# File 'lib/octokit/client/gists.rb', line 71

def create_gist(options = {})
  post 'gists', options
end