-
-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update slack-api-ref reference * Add AdminConversationsWhitelist methods * Update AdminConversations docs * Add endpoints for AdminConversationsWhitelist * Update changelog * Add more new methods * Update changelog
- Loading branch information
1 parent
9b20556
commit c04a831
Showing
19 changed files
with
621 additions
and
7 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
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 'AdminConversationsWhitelist methods.' | ||
command 'admin_conversations_whitelist' do |g| | ||
g.desc 'Add a whitelist of IDP groups for accessing a channel' | ||
g.long_desc %( Add a whitelist of IDP groups for accessing a channel ) | ||
g.command 'add' do |c| | ||
c.flag 'channel_id', desc: 'The channel to whitelist a group for.' | ||
c.flag 'group_id', desc: 'The IDP Group ID to whitelist 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_whitelist_add(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 'listGroupsLinkedToChannel' 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_whitelist_listGroupsLinkedToChannel(options)) | ||
end | ||
end | ||
|
||
g.desc 'Remove a whitelisted IDP group linked to a private channel' | ||
g.long_desc %( Remove a whitelisted IDP group linked to a private channel ) | ||
g.command 'remove' do |c| | ||
c.flag 'channel_id', desc: 'The channel to remove a whitelisted group for.' | ||
c.flag 'group_id', desc: 'The IDP Group ID to remove from the private channel whitelist.' | ||
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_whitelist_remove(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# frozen_string_literal: true | ||
# This file was auto-generated by lib/tasks/web.rake | ||
|
||
desc 'AdminUsergroups methods.' | ||
command 'admin_usergroups' do |g| | ||
g.desc 'Add one or more default channels to an IDP group.' | ||
g.long_desc %( Add one or more default channels to an IDP group. ) | ||
g.command 'addChannels' do |c| | ||
c.flag 'channel_ids', desc: 'Comma separated string of channel IDs.' | ||
c.flag 'team_id', desc: 'The workspace to add default channels in.' | ||
c.flag 'usergroup_id', desc: 'ID of the IDP group to add default channels for.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump($client.admin_usergroups_addChannels(options)) | ||
end | ||
end | ||
|
||
g.desc 'Add one or more teams to the list of teams associated with an org-level usergroup.' | ||
g.long_desc %( Add one or more teams to the list of teams associated with an org-level usergroup. ) | ||
g.command 'addTeams' do |c| | ||
c.flag 'team_ids', desc: 'A comma separated list of encoded team IDs. Teams MUST belong to the organization.' | ||
c.flag 'usergroup_id', desc: 'A encoded usergroup ID.' | ||
c.flag 'auto_provision', desc: 'A boolean to control whether to automatically create new team users for the usergroup memebrs or not.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump($client.admin_usergroups_addTeams(options)) | ||
end | ||
end | ||
|
||
g.desc 'List the channels linked to an org-level IDP group (user group).' | ||
g.long_desc %( List the channels linked to an org-level IDP group (user group). ) | ||
g.command 'listChannels' do |c| | ||
c.flag 'usergroup_id', desc: 'ID of the IDP group to list default channels for.' | ||
c.flag 'include_num_members', desc: 'Flag to include or exclude the count of members per channel.' | ||
c.flag 'team_id', desc: 'ID of the the workspace.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump($client.admin_usergroups_listChannels(options)) | ||
end | ||
end | ||
|
||
g.desc 'Remove one or more default channels from an org-level IDP group (user group).' | ||
g.long_desc %( Remove one or more default channels from an org-level IDP group (user group). ) | ||
g.command 'removeChannels' do |c| | ||
c.flag 'channel_ids', desc: 'Comma-separated string of channel IDs.' | ||
c.flag 'usergroup_id', desc: 'ID of the IDP Group.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump($client.admin_usergroups_removeChannels(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# frozen_string_literal: true | ||
# This file was auto-generated by lib/tasks/web.rake | ||
|
||
desc 'Calls methods.' | ||
command 'calls' do |g| | ||
g.desc 'Registers a new Call.' | ||
g.long_desc %( Registers a new Call. ) | ||
g.command 'add' do |c| | ||
c.flag 'external_unique_id', desc: 'An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service.' | ||
c.flag 'join_url', desc: 'The URL required for a client to join the Call.' | ||
c.flag 'created_by', desc: 'The valid Slack user ID of the user who created this Call. When this method is called with a user token, the created_by field is optional and defaults to the authed user of the token. Otherwise, the field is required.' | ||
c.flag 'date_start', desc: 'Call start time in UTC UNIX timestamp format.' | ||
c.flag 'desktop_app_join_url', desc: 'When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.' | ||
c.flag 'external_display_id', desc: 'An optional, human-readable ID supplied by the 3rd-party Call provider. If supplied, this ID will be displayed in the Call object.' | ||
c.flag 'title', desc: 'The name of the Call.' | ||
c.flag 'users', desc: 'The list of users to register as participants in the Call. Read more on how to specify users here.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump($client.calls_add(options)) | ||
end | ||
end | ||
|
||
g.desc 'Ends a Call.' | ||
g.long_desc %( Ends a Call. ) | ||
g.command 'end' do |c| | ||
c.flag 'id', desc: 'id returned when registering the call using the calls.add method.' | ||
c.flag 'duration', desc: 'Call duration in seconds.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump($client.calls_end(options)) | ||
end | ||
end | ||
|
||
g.desc 'Returns information about a Call.' | ||
g.long_desc %( Returns information about a Call. ) | ||
g.command 'info' do |c| | ||
c.flag 'id', desc: 'id of the Call returned by the calls.add method.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump($client.calls_info(options)) | ||
end | ||
end | ||
|
||
g.desc 'Updates information about a Call.' | ||
g.long_desc %( Updates information about a Call. ) | ||
g.command 'update' do |c| | ||
c.flag 'id', desc: 'id returned by the calls.add method.' | ||
c.flag 'desktop_app_join_url', desc: 'When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.' | ||
c.flag 'join_url', desc: 'The URL required for a client to join the Call.' | ||
c.flag 'title', desc: 'The name of the Call.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump($client.calls_update(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
# This file was auto-generated by lib/tasks/web.rake | ||
|
||
desc 'CallsParticipants methods.' | ||
command 'calls_participants' do |g| | ||
g.desc 'Registers new participants added to a Call.' | ||
g.long_desc %( Registers new participants added to a Call. ) | ||
g.command 'add' do |c| | ||
c.flag 'id', desc: 'id returned by the calls.add method.' | ||
c.flag 'users', desc: 'The list of users to add as participants in the Call. Read more on how to specify users here.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump($client.calls_participants_add(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
61 changes: 61 additions & 0 deletions
61
lib/slack/web/api/endpoints/admin_conversations_whitelist.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 AdminConversationsWhitelist | ||
# | ||
# Add a whitelist of IDP groups for accessing a channel | ||
# | ||
# @option options [Object] :channel_id | ||
# The channel to whitelist a group for. | ||
# @option options [Object] :group_id | ||
# The IDP Group ID to whitelist 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.whitelist.add | ||
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations.whitelist/admin.conversations.whitelist.add.json | ||
def admin_conversations_whitelist_add(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.whitelist.add', 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.whitelist.listGroupsLinkedToChannel | ||
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations.whitelist/admin.conversations.whitelist.listGroupsLinkedToChannel.json | ||
def admin_conversations_whitelist_listGroupsLinkedToChannel(options = {}) | ||
throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil? | ||
post('admin.conversations.whitelist.listGroupsLinkedToChannel', options) | ||
end | ||
|
||
# | ||
# Remove a whitelisted IDP group linked to a private channel | ||
# | ||
# @option options [Object] :channel_id | ||
# The channel to remove a whitelisted group for. | ||
# @option options [Object] :group_id | ||
# The IDP Group ID to remove from the private channel whitelist. | ||
# @option options [Object] :team_id | ||
# The workspace where the IDP Group and channel exist. | ||
# @see https://api.slack.com/methods/admin.conversations.whitelist.remove | ||
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations.whitelist/admin.conversations.whitelist.remove.json | ||
def admin_conversations_whitelist_remove(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.whitelist.remove', options) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.