Module: Ghee::API::Orgs

Included in:
Ghee
Defined in:
lib/ghee/api/orgs.rb,
lib/ghee/api/members.rb

Overview

The Orgs module handles all of the Github Organization API endpoints

Defined Under Namespace

Modules: Members, Memberships, PublicMembers, Teams Classes: Proxy

Instance Method Summary collapse

Instance Method Details

#orgs(name = nil, &block) ⇒ Object

Returns list of the authenticated users organizations or an organization by name

org - String name of the organization (optional)

Returns json



113
114
115
116
# File 'lib/ghee/api/orgs.rb', line 113

def orgs(name=nil, &block)
  prefix = (!name.is_a?(Hash) and name) ? "./orgs/#{name}" : "user/orgs"
  Proxy.new(connection, prefix, name, &block)
end

#team(number, params = {}) ⇒ Object

Team by id

Returns json



101
102
103
104
# File 'lib/ghee/api/orgs.rb', line 101

def team(number, params={})
  prefix = "./teams/#{number}" 
  Ghee::API::Orgs::Teams::Proxy.new(connection, prefix, params)
end