class Github::Orgs::Members

def conceal(*args)


github.orgs.members.conceal 'org-name', 'member-name'
github = Github.new :oauth_token => '...'
= Examples

Conceal a user’s membership
def conceal(*args)
  arguments(args, :required => [:org_name, :user])
  delete_request("/orgs/#{org_name}/public_members/#{user}", arguments.params)
end

def delete(*args)


github.orgs.members.remove 'org-name', 'member-name'
github = Github.new
= Examples

they will no longer have any access to the organization’s repositories.
Removing a user from this list will remove them from all teams and
Remove a member
def delete(*args)
  arguments(args, :required => [:org_name, :user])
  delete_request("/orgs/#{org_name}/members/#{user}", arguments.params)
end

def list(*args)


github.orgs.members.list 'org-name', :public => true { |memb| ... }
github.orgs.members.list 'org-name', :public => true
github = Github.new
= Examples
Members of an organization can choose to have their membership publicized or not.

List public members

github.orgs.members.list 'org-name' { |memb| ... }
github.orgs.members.list 'org-name'
github = Github.new
= Examples

Otherwise only public members are returned.
both concealed and public members will be returned.
If the authenticated user is also a member of this organization then
that belongs to at least 1 team in the organization.
List all users who are members of an organization. A member is a user

List members
def list(*args)
  params = arguments(args, :required => [:org_name]).params
  response = if params.delete('public')
    get_request("/orgs/#{org_name}/public_members", params)
  else
    get_request("/orgs/#{org_name}/members", params)
  end
  return response unless block_given?
  response.each { |el| yield el }
end

def member?(*args)


github.orgs.members.member? 'org-name', 'member-name', :public => true
github = Github.new
= Examples

Check if a user is a public member of an organization

github.orgs.members.member? 'org-name', 'member-name'
github = Github.new
= Examples

Check if user is, publicly or privately, a member of an organization
def member?(*args)
  params = arguments(args, :required => [:org_name, :user]).params
  response = if params.delete('public')
    get_request("/orgs/#{org_name}/public_members/#{user}", params)
  else
    get_request("/orgs/#{org_name}/members/#{user}", params)
  end
  response.status == 204
rescue Github::Error::NotFound
  false
end

def publicize(*args)


github.orgs.members.publicize 'org-name', 'member-name'
github = Github.new :oauth_token => '...'
= Examples

Publicize a user’s membership
def publicize(*args)
  arguments(args, :required => [:org_name, :user])
  put_request("/orgs/#{org_name}/public_members/#{user}", arguments.params)
end