Class: Githubris

Inherits:
Object
  • Object
show all
Defined in:
lib/githubris.rb,
lib/githubris/version.rb

Defined Under Namespace

Modules: CustomAttributes, Publicity Classes: API, Base, Error, Gist, OAuth, User

Constant Summary collapse

VERSION =
"0.0.7"

Instance Method Summary collapse

Constructor Details

#initializeGithubris

Returns a new instance of Githubris.



12
13
14
# File 'lib/githubris.rb', line 12

def initialize
  @api = Githubris::API.new
end

Instance Method Details

#authenticated?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/githubris.rb', line 28

def authenticated?
  @api.authenticated?
end

#authenticated_userObject



24
25
26
# File 'lib/githubris.rb', line 24

def authenticated_user
  @api.get_authenticated_user
end

#basic_auth(login, password) ⇒ Object



16
17
18
# File 'lib/githubris.rb', line 16

def basic_auth(, password)
  @api.basic_auth , password
end

#find_gist(id) ⇒ Object



36
37
38
# File 'lib/githubris.rb', line 36

def find_gist(id)
  @api.get_gist(id)
end

#find_user(login) ⇒ Object



32
33
34
# File 'lib/githubris.rb', line 32

def find_user()
  @api.get_user()
end

#oauth(client_id, client_secret) ⇒ Object



20
21
22
# File 'lib/githubris.rb', line 20

def oauth(client_id, client_secret)
  @api.oauth client_id, client_secret
end

#public_gists(options = {}) ⇒ Object



40
41
42
# File 'lib/githubris.rb', line 40

def public_gists(options={})
  @api.get_public_gists options
end