Sha256: ff796f8f763ae39cb0ef7ed952d4f62a0153c29c76fdd8d3bd30261a83ff827e

Contents?: true

Size: 653 Bytes

Versions: 16

Compression:

Stored size: 653 Bytes

Contents

require 'oauth'

module TwitterAuth
  module Dispatcher
    class Oauth < OAuth::AccessToken
      include TwitterAuth::Dispatcher::Shared

      attr_accessor :user

      def initialize(user)
        raise TwitterAuth::Error, 'Dispatcher must be initialized with a User.' unless user.is_a?(TwitterAuth::OauthUser) 
        self.user = user
        super(TwitterAuth.consumer, user.access_token, user.access_secret)
      end

      def request(http_method, path, *arguments)
        path = TwitterAuth.path_prefix + path
        path = append_extension_to(path)

        response = super

        handle_response(response)
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 4 rubygems

Version Path
mbleigh-twitter-auth-0.1.14 lib/twitter_auth/dispatcher/oauth.rb
mbleigh-twitter-auth-0.1.15 lib/twitter_auth/dispatcher/oauth.rb
mbleigh-twitter-auth-0.1.16 lib/twitter_auth/dispatcher/oauth.rb
mbleigh-twitter-auth-0.1.18 lib/twitter_auth/dispatcher/oauth.rb
mbleigh-twitter-auth-0.1.20 lib/twitter_auth/dispatcher/oauth.rb
mbleigh-twitter-auth-0.1.21 lib/twitter_auth/dispatcher/oauth.rb
mbleigh-twitter-auth-0.1.22 lib/twitter_auth/dispatcher/oauth.rb
millsb-twitter-auth-0.1.16 lib/twitter_auth/dispatcher/oauth.rb
xaviershay-twitter-auth-0.1.19 lib/twitter_auth/dispatcher/oauth.rb
twitter-auth-0.1.22 lib/twitter_auth/dispatcher/oauth.rb
twitter-auth-0.1.16 lib/twitter_auth/dispatcher/oauth.rb
twitter-auth-0.1.15 lib/twitter_auth/dispatcher/oauth.rb
twitter-auth-0.1.14 lib/twitter_auth/dispatcher/oauth.rb
twitter-auth-0.1.17 lib/twitter_auth/dispatcher/oauth.rb
twitter-auth-0.1.20 lib/twitter_auth/dispatcher/oauth.rb
twitter-auth-0.1.21 lib/twitter_auth/dispatcher/oauth.rb