-
Notifications
You must be signed in to change notification settings - Fork 4
5. Models
In the models section of the PyTweetToolkit documentation, you'll find comprehensive details on the structure and usage of various data models representing Twitter entities like tweets, users, and media. These models are crucial for interacting with Twitter's API, encapsulating data in a structured manner.
The List model in PyTweetToolkit represents a Twitter List, providing a structured encapsulation of the list's details and metrics as returned by the Twitter API. This model is crucial for applications that interact with Twitter Lists, enabling easy access to their properties and associated metadata.
-
created_at(str): The creation timestamp of the list. -
custom_banner_media_url(str): URL for the custom banner image of the list, if available. -
default_banner_media_url(str): URL for the default banner image. -
description(str): Description of the list. -
facepile_urls(list): Profile image URLs for users featured in the list. -
is_following(bool): Indicates if the authenticated user follows this list. -
id(int): Unique identifier of the list on Twitter. -
rest_id(str): String representation of the list's ID. -
is_member(bool): Indicates if the authenticated user is a member of this list. -
member_count(int): Number of members in the list. -
mode(str): Visibility mode of the list (e.g., "public" or "private"). -
muting(bool): Indicates if the list is muted. -
name(str): Name of the list. -
pinning(bool): Indicates if the list is pinned. -
subscriber_count(int): Number of subscribers to the list. -
owner(user_model.User): The owner of the list.
Provides a human-readable string representation of the list, including key details such as ID, name, description, owner, and counts of members and subscribers.
Converts the list model to a dictionary, facilitating serialization and API response generation. This method ensures that all list attributes are represented in a format suitable for data exchange or storage.