Ejemplo n.º 1
0
def get_save_home(account, auth=None):
    tweets = get_home(account, auth)

    for tweet in tweets:
        if not len(db.get_tweets(tweet_id=tweet.id, account=account)):
            db.add_tweet(account, tweet)
    return tweets
Ejemplo n.º 2
0
    def db_load_timeline(self, limit=20):
        tweets = db.get_tweets(account=self.account)
        tweets.sort(key=lambda x: x.created_at, reverse=True)

        if limit and len(tweets) > limit:
            tweets = tweets[:(limit - 1)]
        self.update(tweets)
Ejemplo n.º 3
0
def get_save_home( account, auth = None ):
    tweets = get_home( account, auth )

    for tweet in tweets:
        if not len( db.get_tweets( tweet_id = tweet.id,
                                   account = account ) ):
            db.add_tweet( account, tweet )
    return tweets
Ejemplo n.º 4
0
 def db_load_timeline( self, limit = 20 ):
     tweets = db.get_tweets( account = self.account )
     tweets.sort( key = lambda x: x.created_at,
                  reverse = True )
     
     if limit and len( tweets ) > limit:
         tweets = tweets[:( limit - 1 )]
     self.update( tweets )