class Github::Orgs
def edit(*args)
"name": "github"
"location": "San Francisco",
"email": "support@github.com",
"company": "GitHub",
"blog": "https://github.com/blog",
"billing_email": "support@github.com",
github.orgs.edit 'github',
github = Github.new oauth_token: '...'
= Examples
:name - Optional string
:location - Optional string
:email - Optional string
:company - Optional string
:billing_email - Optional string - Billing email address. This address is not publicized.
= Parameters
Edit organization
def edit(*args) arguments(args, :required => [:org_name]) do sift VALID_ORG_PARAM_NAMES end patch_request("/orgs/#{org_name}", arguments.params) end
def get(*args)
github.orgs.get 'github'
github = Github.new
= Examples
Get properties for a single organization
def get(*args) arguments(args, :required => [:org_name]) get_request("/orgs/#{org_name}", arguments.params) end
def list(*args)
github.orgs.list
github = Github.new oauth_token: '..'
List public and private organizations for the authenticated user.
github.orgs.list user: 'user-name'
github = Github.new
= Examples
List all public organizations for a user.
def list(*args) params = arguments(args).params response = if (user_name = params.delete("user")) get_request("/users/#{user_name}/orgs", params) else # For the authenticated user get_request("/user/orgs", params) end return response unless block_given? response.each { |el| yield el } end
def members(options={}, &block)
def members(options={}, &block) @members ||= ApiFactory.new('Orgs::Members', current_options.merge(options), &block) end
def teams(options={}, &block)
def teams(options={}, &block) @teams ||= ApiFactory.new('Orgs::Teams', current_options.merge(options), &block) end