Module: Octoplex::Client::Root

Included in:
Octoplex::Client
Defined in:
lib/octoplex/client/root.rb

Instance Method Summary collapse

Instance Method Details

#orgs(login) ⇒ Object Also known as: organisations, organizations

GET /orgs/:org/repos



18
19
20
# File 'lib/octoplex/client/root.rb', line 18

def orgs()
  Octoplex::API::Organisation.find()
end

#repos(user, repo) ⇒ Object

GET /repos/:user/:repo GET /repos/:user/:repo/contributors GET /repos/:user/:repo/languages GET /repos/:user/:repo/teams GET /repos/:user/:repo/branches



31
32
33
# File 'lib/octoplex/client/root.rb', line 31

def repos(user, repo)
  (@repos ||= {})[user] ||= Octoplex::API::Repository.new(user, self, get("/repos/#{user}"))
end

#userObject

GET /user GET /user/repos



13
14
15
# File 'lib/octoplex/client/root.rb', line 13

def user
  @user ||= Octoplex::API::User.current
end

#users(login) ⇒ Object

GET /users/:user GET /users/:user/repos



7
8
9
# File 'lib/octoplex/client/root.rb', line 7

def users()
  (@users ||= {})[] ||= Octoplex::API::User.new(self, get("/users/#{}"))
end