Skip to content

Commit

Permalink
Added admin_users_session_reset to Web API.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Jul 20, 2019
1 parent 30450bc commit fba1a5b
Show file tree
Hide file tree
Showing 26 changed files with 175 additions and 69 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
### 0.14.3 (Next)

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

### 0.14.2 (2019/4/12)
Expand Down
1 change: 1 addition & 0 deletions bin/commands.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file was auto-generated by lib/tasks/web.rake

require 'commands/admin_users_session'
require 'commands/api'
require 'commands/apps'
require 'commands/apps_permissions'
Expand Down
15 changes: 15 additions & 0 deletions bin/commands/admin_users_session.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This file was auto-generated by lib/tasks/web.rake

desc 'AdminUsersSession methods.'
command 'admin_users_session' do |g|
g.desc 'This method wipes a user session, leaving the user unauthenticated. The user’s Slack client will reset its local cache.'
g.long_desc %( This method wipes a user session, leaving the user unauthenticated. The user’s Slack client will reset its local cache. )
g.command 'reset' do |c|
c.flag 'user_id', desc: 'The ID of the user to wipe sessions for.'
c.flag 'mobile_only', desc: 'Only expire mobile sessions (default: false).'
c.flag 'web_only', desc: 'Only expire web sessions (default: false).'
c.action do |_global_options, options, _args|
puts JSON.dump($client.admin_users_session_reset(options))
end
end
end
4 changes: 2 additions & 2 deletions bin/commands/apps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

desc 'Apps methods.'
command 'apps' do |g|
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.'
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. )
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.'
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. )
g.command 'uninstall' do |c|
c.flag 'client_id', desc: 'Issued when you created your application.'
c.flag 'client_secret', desc: 'Issued when you created your application.'
Expand Down
5 changes: 4 additions & 1 deletion bin/commands/chat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,18 @@
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.'
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. )
g.command 'postEphemeral' do |c|
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
c.flag 'channel', desc: 'Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.'
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."
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.'
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.'
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
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.'
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.'
c.flag 'link_names', desc: 'Find and link channel names and usernames.'
c.flag 'parse', desc: 'Change how messages are treated. Defaults to none. See below.'
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."
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."
c.action do |_global_options, options, _args|
puts JSON.dump($client.chat_postEphemeral(options))
end
Expand Down
Loading

0 comments on commit fba1a5b

Please sign in to comment.