Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for video_info field in MediaObj struct #171

Open
doziestar opened this issue Feb 27, 2023 · 0 comments
Open

Add support for video_info field in MediaObj struct #171

doziestar opened this issue Feb 27, 2023 · 0 comments

Comments

@doziestar
Copy link

The current implementation of MediaObj in the media_obj package does not support the video_info field in the media object returned by Twitter's API. This field contains additional information about a video, such as its variants and duration, and is crucial for processing video media.

To address this, I propose adding a new struct called MediaWithVariant to represent media objects that contain a video_info field. This struct includes fields for the variants, duration_ms, and preview_image_url of the video, as well as a MediaPublicMetrics struct to represent public engagement metrics for the media content.

Additionally, I suggest modifying the existing MediaObj struct to only include fields that are common to all types of media, such as media_key, type, url, height, width, and MediaMetricsObj. This will ensure that the MediaObj struct remains lightweight and flexible, while still providing all the necessary information for non-video media.

I will submit a pull request shortly with these changes. Please let me know if you have any feedback or concerns.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant