-
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
119 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# frozen_string_literal: true | ||
# This file was auto-generated by lib/tasks/web.rake | ||
|
||
module Slack | ||
module Cli | ||
class App | ||
desc 'AppsAuthExternal methods.' | ||
command 'apps_auth_external' do |g| | ||
g.desc 'Delete external auth tokens only on the Slack side' | ||
g.long_desc %( Delete external auth tokens only on the Slack side ) | ||
g.command 'delete' do |c| | ||
c.flag 'app_id', desc: 'The id of the app whose tokens you want to delete.' | ||
c.flag 'external_token_id', desc: 'The id of the token that you want to delete.' | ||
c.flag 'provider_key', desc: 'The provider key of the provider whose tokens you want to delete.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump(@client.apps_auth_external_delete(options)) | ||
end | ||
end | ||
|
||
g.desc 'Get the access token for the provided token ID' | ||
g.long_desc %( Get the access token for the provided token ID ) | ||
g.command 'get' do |c| | ||
c.flag 'external_token_id', desc: 'The id of the token you want to get the token for.' | ||
c.flag 'force_refresh', desc: 'Always refresh existing token before returning even when the token has not expired.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump(@client.apps_auth_external_get(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# frozen_string_literal: true | ||
# This file was auto-generated by lib/tasks/web.rake | ||
|
||
module Slack | ||
module Web | ||
module Api | ||
module Endpoints | ||
module AppsAuthExternal | ||
# | ||
# Delete external auth tokens only on the Slack side | ||
# | ||
# @option options [string] :app_id | ||
# The id of the app whose tokens you want to delete. | ||
# @option options [string] :external_token_id | ||
# The id of the token that you want to delete. | ||
# @option options [string] :provider_key | ||
# The provider key of the provider whose tokens you want to delete. | ||
# @see https://api.slack.com/methods/apps.auth.external.delete | ||
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.auth.external/apps.auth.external.delete.json | ||
def apps_auth_external_delete(options = {}) | ||
post('apps.auth.external.delete', options) | ||
end | ||
|
||
# | ||
# Get the access token for the provided token ID | ||
# | ||
# @option options [string] :external_token_id | ||
# The id of the token you want to get the token for. | ||
# @option options [boolean] :force_refresh | ||
# Always refresh existing token before returning even when the token has not expired. | ||
# @see https://api.slack.com/methods/apps.auth.external.get | ||
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.auth.external/apps.auth.external.get.json | ||
def apps_auth_external_get(options = {}) | ||
raise ArgumentError, 'Required arguments :external_token_id missing' if options[:external_token_id].nil? | ||
post('apps.auth.external.get', 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
Submodule slack-api-ref
updated
14 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,13 @@ | ||
# frozen_string_literal: true | ||
# This file was auto-generated by lib/tasks/web.rake | ||
|
||
require 'spec_helper' | ||
|
||
RSpec.describe Slack::Web::Api::Endpoints::AppsAuthExternal do | ||
let(:client) { Slack::Web::Client.new } | ||
context 'apps.auth.external_get' do | ||
it 'requires external_token_id' do | ||
expect { client.apps_auth_external_get }.to raise_error ArgumentError, /Required arguments :external_token_id missing/ | ||
end | ||
end | ||
end |