Sha256: c3c993e68e5828bf76ffafd8d40ce916163e99d5930e142b0a7f81545ae651ad

Contents?: true

Size: 1.36 KB

Versions: 3

Compression:

Stored size: 1.36 KB

Contents

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

module Slack
  module Web
    module Api
      module Endpoints
        module Oauth
          #
          # Exchanges a temporary OAuth code for an API token.
          #
          # @option options [Object] :client_id
          #   Issued when you created your application.
          # @option options [Object] :client_secret
          #   Issued when you created your application.
          # @option options [Object] :code
          #   The `code` param returned via the OAuth callback.
          # @option options [Object] :redirect_uri
          #   This must match the originally submitted URI (if one was sent).
          # @see https://api.slack.com/methods/oauth.access
          # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/oauth.access.md
          # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/oauth.access.json
          def oauth_access(options = {})
            throw ArgumentError.new('Required arguments :client_id missing') if options[:client_id].nil?
            throw ArgumentError.new('Required arguments :client_secret missing') if options[:client_secret].nil?
            throw ArgumentError.new('Required arguments :code missing') if options[:code].nil?
            post('oauth.access', options)
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
slack-ruby-client-0.2.1 lib/slack/web/api/endpoints/oauth.rb
slack-ruby-client-0.2.0 lib/slack/web/api/endpoints/oauth.rb
slack-ruby-client-0.1.0 lib/slack/web/api/endpoints/oauth.rb