def read_friends (self): tparser = TweetParser (app.config['TWITTER_CONSUMER_KEY'], app.config['TWITTER_CONSUMER_SECRET'], current_user.twitter_access_key, current_user.twitter_secret_key) friends = tparser.following () max_display_in_row = 10 grouped = [] temp = [] for f in friends: if len (temp) == max_display_in_row: grouped.append (temp) temp = [] temp.append (f) grouped.append (temp) return grouped
def read_images (self, handle): tparser = TweetParser (app.config['TWITTER_CONSUMER_KEY'], app.config['TWITTER_CONSUMER_SECRET'], current_user.twitter_access_key, current_user.twitter_secret_key) images = tparser.parse (handle) return images