slack-ruby/slack-ruby-client

View on GitHub
bin/commands/apps_auth_external.rb

Summary

Maintainability
A
0 mins
Test Coverage
# 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