Sha256: a4eb8e318cd8b5c03990f1ff2d0a98bc6fc1b27965f955b7e3c784ee371fc9a6
Contents?: true
Size: 691 Bytes
Versions: 10
Compression:
Stored size: 691 Bytes
Contents
class TwitterToken < ConsumerToken TWITTER_SETTINGS={ :site => "https://api.twitter.com", :request_token_path => "/oauth/request_token", :authorize_path => "/oauth/authorize", :access_token_path => "/oauth/access_token", } def self.consumer(options={}) @consumer ||= OAuth::Consumer.new(credentials[:key], credentials[:secret], TWITTER_SETTINGS.merge(options)) end def client @client ||= begin if self.class.credentials[:client].to_sym == :oauth_gem super else require 'twitter' Twitter::Client.new(:consumer_key => self.class.consumer.key, :consumer_secret => self.class.consumer.secret) end end end end
Version data entries
10 entries across 10 versions & 4 rubygems