Module: Slack::Web::Api::Endpoints::AdminTeams
- Included in:
- Slack::Web::Api::Endpoints
- Defined in:
- lib/slack/web/api/endpoints/admin_teams.rb
Instance Method Summary collapse
-
#admin_teams_create(options = {}) ⇒ Object
Create an Enterprise team.
-
#admin_teams_list(options = {}) ⇒ Object
List all teams on an Enterprise organization.
Instance Method Details
#admin_teams_create(options = {}) ⇒ Object
Create an Enterprise team.
22 23 24 25 26 |
# File 'lib/slack/web/api/endpoints/admin_teams.rb', line 22 def admin_teams_create( = {}) throw ArgumentError.new('Required arguments :team_domain missing') if [:team_domain].nil? throw ArgumentError.new('Required arguments :team_name missing') if [:team_name].nil? post('admin.teams.create', ) end |
#admin_teams_list(options = {}) ⇒ Object
List all teams on an Enterprise organization
37 38 39 40 41 42 43 44 45 |
# File 'lib/slack/web/api/endpoints/admin_teams.rb', line 37 def admin_teams_list( = {}) if block_given? Pagination::Cursor.new(self, :admin_teams_list, ).each do |page| yield page end else post('admin.teams.list', ) end end |