Module: Ghee::API::Orgs

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

Overview

The Orgs module handles all of the Github Organization API endpoints

Defined Under Namespace

Modules: Teams Classes: Proxy

Instance Method Summary collapse

Instance Method Details

#orgs(name = nil, params = {}) ⇒ Object

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

org - String name of the organization (optional)

Returns json



95
96
97
98
99
# File 'lib/ghee/api/orgs.rb', line 95

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

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

Team by id

Returns json



83
84
85
86
# File 'lib/ghee/api/orgs.rb', line 83

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