示例#1
0
文件: app.py 项目: padi/Twiseless
    def tweets(self, user_id):
        db = cherrypy.request.db
        tweets = []
        for mention in Mention.tweets(db, int(user_id)):
            tweets.append(mention.tweet)

        return tweets
示例#2
0
    def tweets(self, user_id):
        db = cherrypy.request.db
        tweets = {}
        for mention in Mention.tweets(db, int(user_id)):
            if mention.lang not in tweets:
                tweets[mention.lang] = []

            tweets[mention.lang].append({'text': mention.tweet})

        return tweets
示例#3
0
文件: app.py 项目: Lawouach/Twiseless
    def tweets(self, user_id):
        db = cherrypy.request.db
        tweets = {}
        for mention in Mention.tweets(db, int(user_id)):
            if mention.lang not in tweets:
                tweets[mention.lang] = []
                
            tweets[mention.lang].append({
                'text': mention.tweet
                }
            )

        return tweets