Module: Slack::Web::Api::Endpoints::AppsPermissionsUsers
- Included in:
- Slack::Web::Api::Endpoints
- Defined in:
- lib/slack/web/api/endpoints/apps_permissions_users.rb
Instance Method Summary collapse
-
#apps_permissions_users_list(options = {}) ⇒ Object
Returns list of user grants and corresponding scopes this app has on a team.
-
#apps_permissions_users_request(options = {}) ⇒ Object
Enables an app to trigger a permissions modal to grant an app access to a user access scope.
Instance Method Details
#apps_permissions_users_list(options = {}) ⇒ Object
Returns list of user grants and corresponding scopes this app has on a team.
18 19 20 21 22 23 24 25 26 |
# File 'lib/slack/web/api/endpoints/apps_permissions_users.rb', line 18 def ( = {}) if block_given? Pagination::Cursor.new(self, :apps_permissions_users_list, ).each do |page| yield page end else post('apps.permissions.users.list', ) end end |
#apps_permissions_users_request(options = {}) ⇒ Object
Enables an app to trigger a permissions modal to grant an app access to a user access scope.
39 40 41 42 43 44 45 |
# File 'lib/slack/web/api/endpoints/apps_permissions_users.rb', line 39 def ( = {}) throw ArgumentError.new('Required arguments :scopes missing') if [:scopes].nil? throw ArgumentError.new('Required arguments :trigger_id missing') if [:trigger_id].nil? throw ArgumentError.new('Required arguments :user missing') if [:user].nil? = .merge(user: users_id()['user']['id']) if [:user] post('apps.permissions.users.request', ) end |