# frozen_string_literal: true # This file was auto-generated by lib/tasks/web.rake module Slack module Web module Api module Endpoints module AdminTeams # # Create an Enterprise team. # # @option options [Object] :team_domain # Team domain (for example, slacksoftballteam). # @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 https://api.slack.com/methods/admin.teams.create # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams/admin.teams.create.json 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 # # 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 https://api.slack.com/methods/admin.teams.list # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams/admin.teams.list.json 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 end end end end end