diff --git a/collect/twitter.py b/collect/twitter.py index 39f39a0..b400778 100644 --- a/collect/twitter.py +++ b/collect/twitter.py @@ -5,6 +5,55 @@ from typing import Union import tweepy from collect.utils import Config + + +@dataclass +class User: + id: int + id_str: str + name: str + screen_name: str + location: str + description: str + url: str + entities: dict + protected: bool + followers_count: int + friends_count: int + listed_count: int + created_at: datetime + favourites_count: int + verified: bool + statuses_count: int + + +@dataclass +class Tweet: + created_at: datetime + id: int + id_str: str + full_text: str + truncated: bool + display_text_range: list[int] + entities: dict[str: list] + source: str + + in_reply_to_status_id: int + in_reply_to_status_id_str: str + in_reply_to_user_id: int + in_reply_to_user_id_str: str + in_reply_to_screen_name: str + + geo: str + coordinates: str + + is_quote_status: bool + + retweet_status: Union[dict, None] + retweet_count: int + favorite_count: int + + def tweepy_login(conf: Config) -> tweepy.API: """ Login to tweepy