コード例 #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