-
-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use conversations_list instead of deprecated channels_list (#331)
- Loading branch information
1 parent
0d0514f
commit 498f34e
Showing
38 changed files
with
441 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# frozen_string_literal: true | ||
# This file was auto-generated by lib/tasks/web.rake | ||
|
||
desc 'AdminConversationsRestrictaccess methods.' | ||
command 'admin_conversations_restrictAccess' do |g| | ||
g.desc 'Add an allowlist of IDP groups for accessing a channel' | ||
g.long_desc %( Add an allowlist of IDP groups for accessing a channel ) | ||
g.command 'addGroup' do |c| | ||
c.flag 'channel_id', desc: 'The channel to link this group to.' | ||
c.flag 'group_id', desc: 'The IDP Group ID to be an allowlist for the private channel.' | ||
c.flag 'team_id', desc: 'The workspace where the IDP Group and channel exist.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump($client.admin_conversations_restrictAccess_addGroup(options)) | ||
end | ||
end | ||
|
||
g.desc 'List all IDP Groups linked to a channel' | ||
g.long_desc %( List all IDP Groups linked to a channel ) | ||
g.command 'listGroups' do |c| | ||
c.flag 'channel_id', desc: '.' | ||
c.flag 'team_id', desc: 'The workspace where the channele exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump($client.admin_conversations_restrictAccess_listGroups(options)) | ||
end | ||
end | ||
|
||
g.desc 'Remove a linked IDP group linked from a private channel' | ||
g.long_desc %( Remove a linked IDP group linked from a private channel ) | ||
g.command 'removeGroup' do |c| | ||
c.flag 'channel_id', desc: 'The channel to remove the linked group from.' | ||
c.flag 'group_id', desc: 'The IDP Group ID to remove from the private channel.' | ||
c.flag 'team_id', desc: 'The workspace where the IDP Group and channel exist.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump($client.admin_conversations_restrictAccess_removeGroup(options)) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# frozen_string_literal: true | ||
# This file was auto-generated by lib/tasks/web.rake | ||
|
||
module Slack | ||
module Web | ||
module Api | ||
module Endpoints | ||
module AdminConversationsRestrictaccess | ||
# | ||
# Add an allowlist of IDP groups for accessing a channel | ||
# | ||
# @option options [Object] :channel_id | ||
# The channel to link this group to. | ||
# @option options [Object] :group_id | ||
# The IDP Group ID to be an allowlist for the private channel. | ||
# @option options [Object] :team_id | ||
# The workspace where the IDP Group and channel exist. | ||
# @see https://api.slack.com/methods/admin.conversations.restrictAccess.addGroup | ||
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations.restrictAccess/admin.conversations.restrictAccess.addGroup.json | ||
def admin_conversations_restrictAccess_addGroup(options = {}) | ||
throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil? | ||
throw ArgumentError.new('Required arguments :group_id missing') if options[:group_id].nil? | ||
post('admin.conversations.restrictAccess.addGroup', options) | ||
end | ||
|
||
# | ||
# List all IDP Groups linked to a channel | ||
# | ||
# @option options [Object] :channel_id | ||
# . | ||
# @option options [Object] :team_id | ||
# The workspace where the channele exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization. | ||
# @see https://api.slack.com/methods/admin.conversations.restrictAccess.listGroups | ||
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations.restrictAccess/admin.conversations.restrictAccess.listGroups.json | ||
def admin_conversations_restrictAccess_listGroups(options = {}) | ||
throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil? | ||
post('admin.conversations.restrictAccess.listGroups', options) | ||
end | ||
|
||
# | ||
# Remove a linked IDP group linked from a private channel | ||
# | ||
# @option options [Object] :channel_id | ||
# The channel to remove the linked group from. | ||
# @option options [Object] :group_id | ||
# The IDP Group ID to remove from the private channel. | ||
# @option options [Object] :team_id | ||
# The workspace where the IDP Group and channel exist. | ||
# @see https://api.slack.com/methods/admin.conversations.restrictAccess.removeGroup | ||
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations.restrictAccess/admin.conversations.restrictAccess.removeGroup.json | ||
def admin_conversations_restrictAccess_removeGroup(options = {}) | ||
throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil? | ||
throw ArgumentError.new('Required arguments :group_id missing') if options[:group_id].nil? | ||
throw ArgumentError.new('Required arguments :team_id missing') if options[:team_id].nil? | ||
post('admin.conversations.restrictAccess.removeGroup', options) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.