Skip to content

Commit 532c020

Browse files
authored
Merge pull request #281 from dblock/api-update
Added admin_users_session_reset to Web API.
2 parents 30450bc + 824539f commit 532c020

26 files changed

+175
-69
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
### 0.14.3 (Next)
22

33
* [#279](https://github.com/slack-ruby/slack-ruby-client/pull/279): Prevent ping worker from dying on unexpected errors - [@dblock](https://github.com/dblock).
4+
* [#281](https://github.com/slack-ruby/slack-ruby-client/pull/281): Added `admin_users_session_reset` to Web API - [@dblock](https://github.com/dblock).
45
* Your contribution here.
56

67
### 0.14.2 (2019/4/12)

bin/commands.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# This file was auto-generated by lib/tasks/web.rake
22

3+
require 'commands/admin_users_session'
34
require 'commands/api'
45
require 'commands/apps'
56
require 'commands/apps_permissions'
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This file was auto-generated by lib/tasks/web.rake
2+
3+
desc 'AdminUsersSession methods.'
4+
command 'admin_users_session' do |g|
5+
g.desc "This method wipes a user session, leaving the user unauthenticated. The user's Slack client will reset its local cache."
6+
g.long_desc %( This method wipes a user session, leaving the user unauthenticated. The user's Slack client will reset its local cache. )
7+
g.command 'reset' do |c|
8+
c.flag 'user_id', desc: 'The ID of the user to wipe sessions for.'
9+
c.flag 'mobile_only', desc: 'Only expire mobile sessions (default: false).'
10+
c.flag 'web_only', desc: 'Only expire web sessions (default: false).'
11+
c.action do |_global_options, options, _args|
12+
puts JSON.dump($client.admin_users_session_reset(options))
13+
end
14+
end
15+
end

bin/commands/apps.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
desc 'Apps methods.'
44
command 'apps' do |g|
5-
g.desc 'This method uninstalls a workspace app. Unlike auth.revoke, which revokes a single token, this method revokes all tokens associated with a single installation of a workspace app.'
6-
g.long_desc %( This method uninstalls a workspace app. Unlike auth.revoke, which revokes a single token, this method revokes all tokens associated with a single installation of a workspace app. )
5+
g.desc 'This method uninstalls an app. Unlike auth.revoke, which revokes a single token, this method revokes all tokens associated with a single installation of an app.'
6+
g.long_desc %( This method uninstalls an app. Unlike auth.revoke, which revokes a single token, this method revokes all tokens associated with a single installation of an app. )
77
g.command 'uninstall' do |c|
88
c.flag 'client_id', desc: 'Issued when you created your application.'
99
c.flag 'client_secret', desc: 'Issued when you created your application.'

bin/commands/chat.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,18 @@
5858
g.desc 'This method posts an ephemeral message, which is visible only to the assigned user in a specific public channel, private channel, or private conversation.'
5959
g.long_desc %( This method posts an ephemeral message, which is visible only to the assigned user in a specific public channel, private channel, or private conversation. )
6060
g.command 'postEphemeral' do |c|
61+
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
6162
c.flag 'channel', desc: 'Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.'
6263
c.flag 'text', desc: "Text of the message to send. See below for an explanation of formatting. This field is usually required, unless you're providing only attachments instead."
6364
c.flag 'user', desc: 'id of the user who will receive the ephemeral message. The user should be in the channel specified by the channel argument.'
6465
c.flag 'as_user', desc: 'Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false.'
65-
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
6666
c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
67+
c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.'
68+
c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.'
6769
c.flag 'link_names', desc: 'Find and link channel names and usernames.'
6870
c.flag 'parse', desc: 'Change how messages are treated. Defaults to none. See below.'
6971
c.flag 'thread_ts', desc: "Provide another message's ts value to post this message in a thread. Avoid using a reply's ts value; use its parent's value instead. Ephemeral messages in threads are only shown if there is already an active thread."
72+
c.flag 'username', desc: "Set your bot's user name. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below."
7073
c.action do |_global_options, options, _args|
7174
puts JSON.dump($client.chat_postEphemeral(options))
7275
end

0 commit comments

Comments
 (0)