module Slack::Web::Api::Endpoints::AdminTeams

Public Instance Methods

admin_teams_create(options = {}) click to toggle source

Create an Enterprise team.

@option options [Object] :team_domain

Team domain (for example, slacksoftballteam). Domains are limited to 21 characters.

@option options [Object] :team_name

Team name (for example, Slack Softball Team).

@option options [Object] :team_description

Description for the team.

@option options [Object] :team_discoverability

Who can join the team. A team's discoverability can be open, closed, invite_only, or unlisted.

@see api.slack.com/methods/admin.teams.create @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams/admin.teams.create.json

# File lib/slack/web/api/endpoints/admin_teams.rb, line 22
def admin_teams_create(options = {})
  throw ArgumentError.new('Required arguments :team_domain missing') if options[:team_domain].nil?
  throw ArgumentError.new('Required arguments :team_name missing') if options[:team_name].nil?
  post('admin.teams.create', options)
end
admin_teams_list(options = {}) { |page| ... } click to toggle source

List all teams on an Enterprise organization

@option options [Object] :cursor

Set cursor to next_cursor returned by the previous call to list items in the next page.

@option options [Object] :limit

The maximum number of items to return. Must be between 1 - 100 both inclusive.

@see api.slack.com/methods/admin.teams.list @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams/admin.teams.list.json

# File lib/slack/web/api/endpoints/admin_teams.rb, line 37
def admin_teams_list(options = {})
  if block_given?
    Pagination::Cursor.new(self, :admin_teams_list, options).each do |page|
      yield page
    end
  else
    post('admin.teams.list', options)
  end
end