Method: Github::Client::Gists#get

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

#get(*args) ⇒ Hash Also known as: find

Get a single gist

Get a specific revision of gist

Examples:

github = Github.new
github.gists.get 'gist-id'
github = Github.new
github.gists.get 'gist-id', sha: '

Returns:

See Also:



90
91
92
93
94
95
96
97
98
# File 'lib/github_api/client/gists.rb', line 90

def get(*args)
  arguments(args, required: [:id])

  if (sha = arguments.params.delete('sha'))
    get_request("/gists/#{arguments.id}/#{sha}")
  else
    get_request("/gists/#{arguments.id}", arguments.params)
  end
end