Esempio n. 1
0
def get_favourite(uid):
	"favourites of a user"
	d = op.get_reverse('FAVORITE_OF', uid)
#	print "favorrite of : ", uid, d
	values = d.values()
	tweets = op.multi_get('TWEETS',values)
#	print tweets
	return tweets, values	
Esempio n. 2
0
def get_trendTweets(topicid):
	"get tweets for a topic"
        d = op.get_reverse('HASH_TAGS', topicid)
#	print d
	values = d.values()
#	print "VALUES : ", values
	tweets = op.multi_get('TWEETS',values)
#	print tweets
	return tweets, values
Esempio n. 3
0
def get_userline(uid):
        "userline of the user"
        d = op.get_reverse('USERLINE', uid)
#	print d
	values = d.values()
#	print "VALUES : ", values
	tweets = op.multi_get('TWEETS',values)
#	print tweets
	return tweets, values
Esempio n. 4
0
def get_timeline(uid):
        "timeline of the user"
        d = op.get_reverse('TIMELINE', uid)
	if 'status' not in d.keys():
		values = []
		for val in d.values():
			if val!=0:
				values.append(val.split("!")[0])
	
		tweets = op.multi_get('TWEETS',values)
		return tweets, d.values()
	else:	
		return {},[]