Module media_analyzer.twitter_analyzer.models
Expand source code
# from django.db import models
# Create your models here.
class Tweet:
"""A tweet. Made up of a tweet object (directly constructed from api) as well as
text and id fields for quick access."""
def __init__(self, tweet):
# The tweet object itself. https://github.com/joshuam1008/media-analyzer/wiki/Twitter-Jason
self.tweet = tweet
# Text from the tweet.
self.text = tweet.text
self.id = tweet.id
def get_content(self):
return self.tweet.text
def get_id(self):
return self.tweet.id
Classes
class Tweet (tweet)
-
A tweet. Made up of a tweet object (directly constructed from api) as well as text and id fields for quick access.
Expand source code
class Tweet: """A tweet. Made up of a tweet object (directly constructed from api) as well as text and id fields for quick access.""" def __init__(self, tweet): # The tweet object itself. https://github.com/joshuam1008/media-analyzer/wiki/Twitter-Jason self.tweet = tweet # Text from the tweet. self.text = tweet.text self.id = tweet.id def get_content(self): return self.tweet.text def get_id(self): return self.tweet.id
Methods
def get_content(self)
-
Expand source code
def get_content(self): return self.tweet.text
def get_id(self)
-
Expand source code
def get_id(self): return self.tweet.id