class Github::Client::Orgs
def list(*args)
- Api: - public
Other tags:
- See: https://developer.github.com/v3/orgs/#list-user-organizations -
See: https://developer.github.com/v3/orgs/#list-all-organizations -
Options Hash:
(**params)
-
:since
(String
) --
Parameters:
-
params
(Hash
) --
def list(*args) params = arguments(args).params if (user_name = params.delete('user')) response = get_request("/users/#{user_name}/orgs", params) elsif args.map(&:to_s).include?('every') response = get_request('/organizations', params) else # For the authenticated user response = get_request('/user/orgs', params) end return response unless block_given? response.each { |el| yield el } end