Sha256: b930196fd47282e45816f834a96517dcd079d424833d33a65f660c163e4b549d

Contents?: true

Size: 927 Bytes

Versions: 1

Compression:

Stored size: 927 Bytes

Contents

module TweetWatch
  module Client
    
    def client(options)      
      account = TweetWatch.config.get_account(options[:screen_name])
            
      @client ||= Twitter::REST::Client.new do |config|
        config.consumer_key        = account.consumer_key
        config.consumer_secret     = account.consumer_secret
        config.access_token        = account.access_token
        config.access_token_secret = account.access_token_secret
      end
    end
    
    def streaming_client(options)
      account = TweetWatch.config.get_account(options[:screen_name])
         
      @client ||= Twitter::Streaming::Client.new do |config|
        config.consumer_key        = account.consumer_key
        config.consumer_secret     = account.consumer_secret
        config.access_token        = account.access_token
        config.access_token_secret = account.access_token_secret
      end
    end
        
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tweet_watch-0.2.1.pre lib/tweet_watch/client.rb