### Home Classes Methods

### In Files

- lib/github_api/orgs/members.rb

### Parent

API

### Methods

- #all
- #conceal
- #conceal_membership
- #delete
- #list
- #make_public
- #member?
- #publicize
- #publicize_membership
- #remove

### Class/Module Index

Quicksearch

- Github
- Github::API
- Github::Activity
- Github::Activity::Events
- Github::Activity::Notifications
- Github::Activity::Starring
- Github::Activity::Watching
- Github::ApiFactory
- Github::Arguments
- Github::Authorization
- Github::Authorizations
- Github::AutoloadHelper
- Github::Client
- Github::Configuration
- Github::Connection
- Github::Constants
- Github::CoreExt
- Github::CoreExt::OrderedHash
- Github::Descendants
- Github::Emojis
- Github::Error
- Github::Error::BadRequest
- Github::Error::ClientError
- Github::Error::Forbidden
- Github::Error::GithubError
- Github::Error::InternalServerError
- Github::Error::InvalidOptions
- Github::Error::NotAcceptable
- Github::Error::NotFound
- Github::Error::RequiredParams
- Github::Error::ServiceError
- Github::Error::ServiceUnavailable
- Github::Error::Unauthorized
- Github::Error::UnknownValue
- Github::Error::UnprocessableEntity
- Github::Error::Validations
- Github::Gists
- Github::Gists::Comments
- Github::GitData
- Github::GitData::Blobs
- Github::GitData::Commits
- Github::GitData::References
- Github::GitData::Tags
- Github::GitData::Trees
- Github::Gitignore
- Github::Issues
- Github::Issues::Assignees
- Github::Issues::Comments
- Github::Issues::Events
- Github::Issues::Labels
- Github::Issues::Milestones
- Github::Jsonable
- Github::Markdown
- Github::Meta
- Github::MimeType
- Github::Normalizer
- Github::Orgs
- Github::Orgs::Members
- Github::Orgs::Teams
- Github::PageIterator
- Github::PageLinks
- Github::PagedRequest
- Github::Pagination
- Github::ParameterFilter
- Github::ParamsHash
- Github::PullRequests
- Github::PullRequests::Comments
- Github::RateLimit
- Github::Repos
- Github::Repos::Collaborators
- Github::Repos::Comments
- Github::Repos::Commits
- Github::Repos::Contents
- Github::Repos::Downloads
- Github::Repos::Forks
- Github::Repos::Hooks
- Github::Repos::Keys
- Github::Repos::Merging
- Github::Repos::PubSubHubbub
- Github::Repos::Statistics
- Github::Repos::Statuses
- Github::Request
- Github::Request::BasicAuth
- Github::Request::Jsonize
- Github::Request::OAuth2
- Github::Resource
- Github::Response
- Github::Response::Header
- Github::Response::Jsonize
- Github::Response::Mashify
- Github::Response::RaiseError
- Github::Response::Xmlize
- Github::ResponseWrapper
- Github::S3Uploader
- Github::Say
- Github::Scopes
- Github::Search
- Github::Users
- Github::Users::Emails
- Github::Users::Followers
- Github::Users::Keys
- Github::Utils
- Github::Utils::Url
- Github::VERSION
- Github::Validations
- Github::Validations::Format
- Github::Validations::Presence
- Github::Validations::Required
- Github::Validations::Token
- Hash

No matching classes.

# Github::Orgs::Members

### Public Instance Methods

all(*args) click to toggle source
Alias for: list
conceal(*args) click to toggle source

Conceal a user’s membership

# Examples

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

    # File lib/github_api/orgs/members.rb, line 99
    def conceal(*args)
      arguments(args, :required => [:org_name, :user])

      delete_request("/orgs/#{org_name}/public_members/#{user}", arguments.params)
    end

Also aliased as: conceal_membership
conceal_membership(*args) click to toggle source
Alias for: conceal
delete(*args) click to toggle source

Remove a member Removing a user from this list will remove them from all teams and they will no longer have any access to the organization’s repositories.

# Examples

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

    # File lib/github_api/orgs/members.rb, line 72
    def delete(*args)
      arguments(args, :required => [:org_name, :user])

      delete_request("/orgs/#{org_name}/members/#{user}", arguments.params)
    end

Also aliased as: remove
list(*args) click to toggle source

List members

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

# Examples

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

List public members

Members of an organization can choose to have their membership publicized or not.

# Examples

    github = Github.new
    github.orgs.members.list 'org-name', public: true
    github.orgs.members.list 'org-name', public: true { |memb| ... }

    # File lib/github_api/orgs/members.rb, line 26
    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

Also aliased as: all
make_public(*args) click to toggle source
Alias for: publicize
member?(*args) click to toggle source

Check if user is, publicly or privately, a member of an organization

# Examples

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

Check if a user is a public member of an organization

# Examples

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

    # File lib/github_api/orgs/members.rb, line 51
    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

publicize(*args) click to toggle source

Publicize a user’s membership

# Examples

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

    # File lib/github_api/orgs/members.rb, line 85
    def publicize(*args)
      arguments(args, :required => [:org_name, :user])

      put_request("/orgs/#{org_name}/public_members/#{user}", arguments.params)
    end

Also aliased as: make_public, publicize_membership
publicize_membership(*args) click to toggle source
Alias for: publicize
remove(*args) click to toggle source
Alias for: delete

[Validate]

Generated with the Darkfish Rdoc Generator 2.