HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/env/lib64/python3.10/site-packages/tweepy/__pycache__/media.cpython-310.pyc
o

+we8�@s(ddlmZgd�ZGdd�de�ZdS)�)�DataMapping)
�alt_text�duration_ms�height�	media_key�non_public_metrics�organic_metrics�preview_image_url�promoted_metrics�public_metrics�type�url�variants�widthc@s4eZdZdZdZdd�Zdd�Zdd�Zd	d
�ZdS)�Mediaay	Media refers to any image, GIF, or video attached to a Tweet. The media
    object is not a primary object on any endpoint, but can be found and
    expanded in the Tweet object. 

    The object is available for expansion with
    ``?expansions=attachments.media_keys`` to get the condensed object with
    only default fields. Use the expansion with the field parameter:
    ``media.fields`` when requesting additional fields to complete the object..

    .. versionadded:: 4.0

    .. versionchanged:: 4.5
        Added ``url`` field

    .. versionchanged:: 4.12
        Added ``variants`` field

    Attributes
    ----------
    data : dict
        The JSON data representing the media.
    media_key : str
        Unique identifier of the expanded media content.
    type : str
        Type of content (animated_gif, photo, video).
    url : str | None
        A direct URL to the media file on Twitter.
    duration_ms : int | None
        Available when type is video. Duration in milliseconds of the video.
    height : int | None
        Height of this content in pixels.
    non_public_metrics : dict | None
        Non-public engagement metrics for the media content at the time of the
        request. 

        Requires user context authentication.
    organic_metrics: dict | None
        Engagement metrics for the media content, tracked in an organic
        context, at the time of the request. 

        Requires user context authentication.
    preview_image_url : str | None
        URL to the static placeholder preview of this content.
    promoted_metrics : dict | None
        Engagement metrics for the media content, tracked in a promoted
        context, at the time of the request. 

        Requires user context authentication.
    public_metrics : dict | None
        Public engagement metrics for the media content at the time of the
        request.
    width : int | None
        Width of this content in pixels.
    alt_text : str | None
        A description of an image to enable and support accessibility. Can be
        up to 1000 characters long. Alt text can only be added to images at the
        moment.
    variants: list[dict] | None
        Each media object may have multiple display or playback variants,
        with different resolutions or formats

    References
    ----------
    https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/media
    )�datarr
rrrrrr	r
rrrrcCs�||_|d|_|d|_|�d�|_|�d�|_|�d�|_|�d�|_|�d�|_|�d�|_	|�d	�|_
|�d
�|_|�d�|_|�d�|_
|�d
�|_dS)Nrrr
rrrrr	r
rrrr)rrr�getr
rrrrr	r
rrrr)�selfr�r�E/home/arjun/projects/env/lib/python3.10/site-packages/tweepy/media.py�__init__ds

zMedia.__init__cCst||j�r|j|jkStS�N)�
isinstance�	__class__r�NotImplemented)r�otherrrr�__eq__uszMedia.__eq__cCs
t|j�Sr)�hashr�rrrr�__hash__{s
zMedia.__hash__cCsd|j�d|j�d�S)Nz<Media media_key=z type=�>)rrrrrr�__repr__~szMedia.__repr__N)	�__name__�
__module__�__qualname__�__doc__�	__slots__rrrr!rrrrrsBrN)�
tweepy.mixinsr�MEDIA_FIELDSrrrrr�<module>s