class Github::Orgs
def edit(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 '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_name, params={}) assert_presence_of org_name normalize! params filter! VALID_ORG_PARAM_NAMES, params patch_request("/orgs/#{org_name}", params) end
def get(org_name, params={})
github.orgs.get 'github'
github = Github.new
= Examples
Get properties for a single organization
def get(org_name, params={}) assert_presence_of org_name normalize! params get_request("/orgs/#{org_name}", params) end
def initialize(options = {})
def initialize(options = {}) super(options) 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 = args.extract_options! normalize! 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
def members @members ||= ApiFactory.new 'Orgs::Members' end
def teams
def teams @teams ||= ApiFactory.new 'Orgs::Teams' end