Module: Ghee::API::Gists

Included in:
Ghee
Defined in:
lib/ghee/api/gists.rb

Overview

The Gists module handles all of the Github Gist API endpoints

Defined Under Namespace

Modules: Comments Classes: Proxy

Instance Method Summary collapse

Instance Method Details

#gists(id = nil, params = {}) ⇒ Object

Get gists

id - String of gist id

Returns json



77
78
79
80
81
# File 'lib/ghee/api/gists.rb', line 77

def gists(id=nil, params={})
  params = id if id.is_a?Hash
  path_prefix = (!id.is_a?(Hash) and id) ? "./gists/#{id}" : './gists'
  Proxy.new(connection, path_prefix,params)
end