Sha256: 9cab49e266e41fb646f1b5e9978c9637e3da1fbf2c06f1d0551ce1fc22abd8c3

Contents?: true

Size: 1.4 KB

Versions: 4

Compression:

Stored size: 1.4 KB

Contents

# This file was auto-generated by lib/tasks/web.rake

desc 'Oauth methods.'
command 'oauth' do |g|
  g.desc 'Exchanges a temporary OAuth code for an API token.'
  g.long_desc %( Exchanges a temporary OAuth code for an API token. )
  g.command 'access' do |c|
    c.flag 'client_id', desc: 'Issued when you created your application.'
    c.flag 'client_secret', desc: 'Issued when you created your application.'
    c.flag 'code', desc: 'The code param returned via the OAuth callback.'
    c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.oauth_access(options))
    end
  end

  g.desc 'Exchanges a temporary OAuth verifier code for a workspace token.'
  g.long_desc %( Exchanges a temporary OAuth verifier code for a workspace token. )
  g.command 'token' do |c|
    c.flag 'client_id', desc: 'Issued when you created your application.'
    c.flag 'client_secret', desc: 'Issued when you created your application.'
    c.flag 'code', desc: 'The code param returned via the OAuth callback.'
    c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
    c.flag 'single_channel', desc: 'Request the user to add your app only to a single channel.'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.oauth_token(options))
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
slack-ruby-client-0.11.1 bin/commands/oauth.rb
slack-ruby-client-0.11.0 bin/commands/oauth.rb
slack-ruby-client-0.10.0 bin/commands/oauth.rb
slack-ruby-client-0.9.1 bin/commands/oauth.rb