Sha256: 67a590456040b0b30d67f6d282b347dd3a4a238ca2ad12ff8b3b57b1a65a26bf
Contents?: true
Size: 741 Bytes
Versions: 15
Compression:
Stored size: 741 Bytes
Contents
require 'twitter' module T module Requestable DEFAULT_HOST = 'api.twitter.com' DEFAULT_PROTOCOL = 'https' private def base_url "#{protocol}://#{host}" end def client return @client if @client @rcfile.path = options['profile'] if options['profile'] @client = Twitter::Client.new( :endpoint => base_url, :consumer_key => @rcfile.active_consumer_key, :consumer_secret => @rcfile.active_consumer_secret, :oauth_token => @rcfile.active_token, :oauth_token_secret => @rcfile.active_secret ) end def host options['host'] || DEFAULT_HOST end def protocol options['no-ssl'] ? 'http' : DEFAULT_PROTOCOL end end end
Version data entries
15 entries across 15 versions & 1 rubygems