-
Notifications
You must be signed in to change notification settings - Fork 28
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
Key Changes for Video Info improvements #79
Conversation
Updated and streamlined models to match the current data structure and usage requirements. Enhanced readability and maintainability of the code by removing unused fields and methods. Additions Added @computed_field and @cached_property decorators for properties in the Video class to handle lazy loading and API interactions. Introduced new utility functions video_link and is_mobile_share_link for generating TikTok video links and checking mobile share links. Added detailed comments and docstrings for clarity and documentation purposes. Fixes and Improvements SubtitleData Model: Changed language_id from a mandatory field to an optional field with a default alias (Field(alias='LanguageID')). VideoData Model: Added optional fields encoded_type, video_quality, encode_user_tag, codec_type, and definition. Ensured optional nature of some fields to handle cases where data might not be available. MusicData Model: Streamlined fields and ensured they align with the actual data received from the API. LightVideo and Video Models: Simplified these models by removing attributes and methods not present or necessary in the response structure. General Code Improvements: Refactored the structure of models for better alignment with the data provided by the TikTok API. Improved code organization and removed redundant or unused code segments. Enhanced error handling in deferred collectors and API interaction methods. Circular Dependency Resolution: Moved the re-imports of some models (Challenge, LightChallenge, Comment, LightUser, User, UserStats) to the end of the file to resolve circular dependencies. Removed Eliminated unnecessary methods and properties related to image data handling (image_data and image_url_list) in the Video model, as they were not aligned with the current response structure.
@Russell-Newton it was import issue it was my local src file path i just update try to merge now |
I'll try the merge later today or tomorrow when I get back home. |
please run again these were local versions while import for source files tiktokapipy is replaced now everywhere in video.py it should pass validations now |
I'm going to merge this in knowing that it doesn't pass validation checks. I'll try to fix them before bumping the version number. |
Updated and streamlined models to match the current data structure and usage requirements. Enhanced readability and maintainability of the code by removing unused fields and methods. Additions
Added @computed_field and @cached_property decorators for properties in the Video class to handle lazy loading and API interactions. Introduced new utility functions video_link and is_mobile_share_link for generating TikTok video links and checking mobile share links. Added detailed comments and docstrings for clarity and documentation purposes. Fixes and Improvements
SubtitleData Model:
Changed language_id from a mandatory field to an optional field with a default alias (Field(alias='LanguageID')). VideoData Model:
Added optional fields encoded_type, video_quality, encode_user_tag, codec_type, and definition. Ensured optional nature of some fields to handle cases where data might not be available. MusicData Model:
Streamlined fields and ensured they align with the actual data received from the API. LightVideo and Video Models:
Simplified these models by removing attributes and methods not present or necessary in the response structure. General Code Improvements:
Refactored the structure of models for better alignment with the data provided by the TikTok API. Improved code organization and removed redundant or unused code segments. Enhanced error handling in deferred collectors and API interaction methods. Circular Dependency Resolution:
Moved the re-imports of some models (Challenge, LightChallenge, Comment, LightUser, User, UserStats) to the end of the file to resolve circular dependencies. Removed
Eliminated unnecessary methods and properties related to image data handling (image_data and image_url_list) in the Video model, as they were not aligned with the current response structure.