lib/slack/web/api/endpoints/admin_apps.rb in slack-ruby-client-0.17.0 vs lib/slack/web/api/endpoints/admin_apps.rb in slack-ruby-client-1.0.0
- old
+ new
@@ -7,15 +7,15 @@
module Endpoints
module AdminApps
#
# Approve an app for installation on a workspace.
#
- # @option options [Object] :app_id
+ # @option options [string] :app_id
# The id of the app to approve.
# @option options [Object] :enterprise_id
# The ID of the enterprise to approve the app on.
- # @option options [Object] :request_id
+ # @option options [string] :request_id
# The id of the request to approve.
# @option options [Object] :team_id
# The ID of the workspace to approve the app on.
# @see https://api.slack.com/methods/admin.apps.approve
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps/admin.apps.approve.json
@@ -24,11 +24,11 @@
end
#
# Clear an app resolution
#
- # @option options [Object] :app_id
+ # @option options [string] :app_id
# The id of the app whose resolution you want to clear/undo.
# @option options [Object] :enterprise_id
# The enterprise to clear the app resolution from.
# @option options [Object] :team_id
# The workspace to clear the app resolution from.
@@ -40,21 +40,37 @@
end
#
# Restrict an app for installation on a workspace.
#
- # @option options [Object] :app_id
+ # @option options [string] :app_id
# The id of the app to restrict.
# @option options [Object] :enterprise_id
# The ID of the enterprise to approve the app on.
- # @option options [Object] :request_id
+ # @option options [string] :request_id
# The id of the request to restrict.
# @option options [Object] :team_id
# The ID of the workspace to approve the app on.
# @see https://api.slack.com/methods/admin.apps.restrict
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps/admin.apps.restrict.json
def admin_apps_restrict(options = {})
post('admin.apps.restrict', options)
+ end
+
+ #
+ # Uninstall an app from one or many workspaces, or an entire enterprise organization.
+ #
+ # @option options [string] :app_id
+ # The ID of the app to uninstall.
+ # @option options [string] :enterprise_id
+ # The enterprise to completely uninstall the application from (across all workspaces). With an org-level token, this or team_ids is required.
+ # @option options [string] :team_ids
+ # IDs of the teams to uninstall from (max 100). With an org-level token, this or enterprise_id is required.
+ # @see https://api.slack.com/methods/admin.apps.uninstall
+ # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.apps/admin.apps.uninstall.json
+ def admin_apps_uninstall(options = {})
+ throw ArgumentError.new('Required arguments :app_id missing') if options[:app_id].nil?
+ post('admin.apps.uninstall', options)
end
end
end
end
end