Class: TweetTop::User

Inherits:
Object
  • Object
show all
Includes:
GetFollow, GetTweets, GetUser, GetUserTimeline, PostDeleteTweets
Defined in:
lib/user.rb

Instance Method Summary collapse

Methods included from PostDeleteTweets

#delete_tweet, #post_tweet

Methods included from GetFollow

#get_followers, #get_following

Methods included from GetUser

#get_user, #get_user!, #get_user_by_id

Methods included from GetTweets

#get_conversation, #get_tweets

Methods included from GetUserTimeline

#get_user_timeline

Constructor Details

#initialize(api_key, api_key_secret, access_token, access_token_secret, bearer_token) ⇒ User

Returns a new instance of User.



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/user.rb', line 18

def initialize(api_key, api_key_secret, access_token, access_token_secret, bearer_token)
    @api_key = api_key
    @api_key_secret = api_key_secret
    @access_token = access_token
    @access_token_secret = access_token_secret
    @bearer_token = bearer_token
    @client = OAuth::Consumer.new(@api_key, @api_key_secret, :site => 'https://api.twitter.com',
                                                             :authorize_path => '/oauth/authenticate',
                                                             :debug_output => false)
    @credentials = OAuth::AccessToken.new(@client, @access_token, @access_token_secret)
end