-
-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added admin_users_session_reset to Web API.
- Loading branch information
Showing
20 changed files
with
112 additions
and
14 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,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 |
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
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,27 @@ | ||
# This file was auto-generated by lib/tasks/web.rake | ||
|
||
module Slack | ||
module Web | ||
module Api | ||
module Endpoints | ||
module AdminUsersSession | ||
# | ||
# This method wipes a user session, leaving the user unauthenticated. The user’s Slack client will reset its local cache. | ||
# | ||
# @option options [Object] :user_id | ||
# The ID of the user to wipe sessions for. | ||
# @option options [Object] :mobile_only | ||
# Only expire mobile sessions (default: false). | ||
# @option options [Object] :web_only | ||
# Only expire web sessions (default: false). | ||
# @see https://api.slack.com/methods/admin.users.session.reset | ||
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users.session/admin.users.session.reset.json | ||
def admin_users_session_reset(options = {}) | ||
throw ArgumentError.new('Required arguments :user_id missing') if options[:user_id].nil? | ||
post('admin.users.session.reset', 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
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
8 changes: 5 additions & 3 deletions
8
lib/slack/web/api/patches/chat.5.postEphemeral-text-or-attachments.patch
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
Submodule slack-api-ref
updated
104 files
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,12 @@ | ||
# This file was auto-generated by lib/tasks/web.rake | ||
|
||
require 'spec_helper' | ||
|
||
RSpec.describe Slack::Web::Api::Endpoints::AdminUsersSession do | ||
let(:client) { Slack::Web::Client.new } | ||
context 'admin.users.session_reset' do | ||
it 'requires user_id' do | ||
expect { client.admin_users_session_reset }.to raise_error ArgumentError, /Required arguments :user_id missing/ | ||
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