Example #1
0
 def get(self):
     tweet = Tweet()
     tweet.text = self.get_text()
     tweet.sentiment = self.get_sentiment()
     tweet.query = self.get_q()
     db.add_tweet(tweet)
     ret = {'status': 200, 'msg': 'Thanks!'}
     self.spit_json(ret)
Example #2
0
 def get(self):
   tweet = Tweet()
   tweet.text = self.get_text()
   tweet.sentiment = self.get_sentiment()
   tweet.query = self.get_q()
   db.add_tweet(tweet)
   ret = {'status': 200, 'msg': 'Thanks!'}
   self.spit_json(ret)
Example #3
0
def fetch_all_tweets():
  tweets = Tweet.all()
  return tweets