class Github::Orgs
def edit_org(org_name, params={})
"name" => "github"
"location" => "San Francisco",
"email" => "support@github.com",
"company" => "GitHub",
"blog" => "https://github.com/blog",
"billing_email" => "support@github.com",
@github.orgs.edit_org '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_org(org_name, params={}) _validate_presence_of org_name _normalize_params_keys(params) _filter_params_keys(VALID_ORG_PARAM_NAMES, params) patch("/orgs/#{org_name}", params) end
def initialize(options = {})
def initialize(options = {}) super(options) end
def org(org_name, params={})
@github.orgs.org 'github'
@github = Github.new
= Examples
Get properties for a single organization
def org(org_name, params={}) _validate_presence_of org_name get("/orgs/#{org_name}") end
def orgs(user_name=nil, params={})
@github.orgs.org 'github'
@github = Github.new :oauth_token => '..'
List public and private organizations for the authenticated user.
@github.orgs.orgs
@github = Github.new :user => 'user-name'
= Examples
List all public organizations for a user.
def orgs(user_name=nil, params={}) _update_user_repo_params(user_name) _normalize_params_keys(params) response = if user? get("/users/#{user}/orgs", params) else get("/user/orgs", params) end return response unless block_given? response.each { |el| yield el } end