Method: Octokit::Client::Gists#gist

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

#gist(gist, options = {}) ⇒ Sawyer::Resource

Get a single gist

Parameters:

  • gist (String)

    ID of gist to fetch

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

    a customizable set of options

Options Hash (options):

  • :sha (String)

    Specific gist revision SHA

Returns:

  • (Sawyer::Resource)

    Gist information

See Also:



52
53
54
55
56
57
58
59
# File 'lib/octokit/client/gists.rb', line 52

def gist(gist, options = {})
  options = options.dup
  if sha = options.delete(:sha)
    get "gists/#{Gist.new(gist)}/#{sha}", options
  else
    get "gists/#{Gist.new(gist)}", options
  end
end