twitter-openapi-python-generated 0.0.32__py3-none-any.whl → 0.0.34__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- twitter_openapi_python_generated/__init__.py +742 -330
- twitter_openapi_python_generated/api/default_api.py +1 -2
- twitter_openapi_python_generated/api/other_api.py +1 -2
- twitter_openapi_python_generated/api/post_api.py +1 -2
- twitter_openapi_python_generated/api/tweet_api.py +1 -2
- twitter_openapi_python_generated/api/user_api.py +1 -2
- twitter_openapi_python_generated/api/user_list_api.py +318 -2
- twitter_openapi_python_generated/api/users_api.py +1 -2
- twitter_openapi_python_generated/api/v11_get_api.py +1 -2
- twitter_openapi_python_generated/api/v11_post_api.py +1 -2
- twitter_openapi_python_generated/api/v20_get_api.py +1 -2
- twitter_openapi_python_generated/api_client.py +35 -28
- twitter_openapi_python_generated/configuration.py +47 -23
- twitter_openapi_python_generated/exceptions.py +7 -5
- twitter_openapi_python_generated/models/__init__.py +41 -2
- twitter_openapi_python_generated/models/about_community_result.py +4 -3
- twitter_openapi_python_generated/models/about_community_results.py +4 -3
- twitter_openapi_python_generated/models/about_community_tweet_data.py +4 -3
- twitter_openapi_python_generated/models/additional_media_info.py +4 -3
- twitter_openapi_python_generated/models/additional_media_info_call_to_actions.py +4 -3
- twitter_openapi_python_generated/models/additional_media_info_call_to_actions_url.py +4 -3
- twitter_openapi_python_generated/models/allow_download_status.py +4 -3
- twitter_openapi_python_generated/models/analysis_results.py +4 -3
- twitter_openapi_python_generated/models/article.py +4 -3
- twitter_openapi_python_generated/models/article_cover_media.py +7 -3
- twitter_openapi_python_generated/models/article_cover_media_color_info.py +4 -3
- twitter_openapi_python_generated/models/article_cover_media_color_info_palette.py +4 -3
- twitter_openapi_python_generated/models/article_cover_media_color_info_palette_rgb.py +4 -3
- twitter_openapi_python_generated/models/article_cover_media_info.py +4 -3
- twitter_openapi_python_generated/models/article_lifecycle_state.py +4 -3
- twitter_openapi_python_generated/models/article_metadata.py +4 -3
- twitter_openapi_python_generated/models/article_preview.py +99 -0
- twitter_openapi_python_generated/models/article_result.py +23 -6
- twitter_openapi_python_generated/models/article_results.py +4 -3
- twitter_openapi_python_generated/models/author_community_relationship.py +9 -8
- twitter_openapi_python_generated/models/birdwatch_entity.py +4 -3
- twitter_openapi_python_generated/models/birdwatch_entity_ref.py +4 -3
- twitter_openapi_python_generated/models/birdwatch_pivot.py +19 -6
- twitter_openapi_python_generated/models/birdwatch_pivot_call_to_action.py +4 -3
- twitter_openapi_python_generated/models/birdwatch_pivot_footer.py +4 -3
- twitter_openapi_python_generated/models/birdwatch_pivot_note.py +20 -6
- twitter_openapi_python_generated/models/birdwatch_pivot_subtitle.py +4 -3
- twitter_openapi_python_generated/models/bookmarks_response.py +4 -3
- twitter_openapi_python_generated/models/bookmarks_response_data.py +4 -3
- twitter_openapi_python_generated/models/bookmarks_timeline.py +4 -3
- twitter_openapi_python_generated/models/callback.py +4 -3
- twitter_openapi_python_generated/models/client_event_info.py +4 -3
- twitter_openapi_python_generated/models/communities_actions.py +4 -3
- twitter_openapi_python_generated/models/community.py +146 -12
- twitter_openapi_python_generated/models/community_about_timeline_response.py +4 -3
- twitter_openapi_python_generated/models/community_actions.py +4 -3
- twitter_openapi_python_generated/models/community_delete_action_result.py +4 -3
- twitter_openapi_python_generated/models/community_invites_result.py +4 -3
- twitter_openapi_python_generated/models/community_join_action.py +4 -3
- twitter_openapi_python_generated/models/community_join_action_unavailable.py +4 -3
- twitter_openapi_python_generated/models/community_join_requests_result.py +4 -3
- twitter_openapi_python_generated/models/community_leave_action_result.py +4 -3
- twitter_openapi_python_generated/models/community_media_timeline_response.py +4 -3
- twitter_openapi_python_generated/models/community_pin_action_result.py +4 -3
- twitter_openapi_python_generated/models/community_relationship.py +7 -3
- twitter_openapi_python_generated/models/community_result.py +93 -0
- twitter_openapi_python_generated/models/community_rule.py +7 -3
- twitter_openapi_python_generated/models/community_tweets_timeline_response.py +4 -3
- twitter_openapi_python_generated/models/community_unavailable.py +90 -0
- twitter_openapi_python_generated/models/community_union.py +156 -0
- twitter_openapi_python_generated/models/community_unpin_action_result.py +4 -3
- twitter_openapi_python_generated/models/community_urls.py +4 -3
- twitter_openapi_python_generated/models/community_urls_permalink.py +4 -3
- twitter_openapi_python_generated/models/content_disclosure.py +99 -0
- twitter_openapi_python_generated/models/content_disclosure_advertising_disclosure.py +89 -0
- twitter_openapi_python_generated/models/content_disclosure_ai_generated_disclosure.py +103 -0
- twitter_openapi_python_generated/models/conversation_control.py +4 -3
- twitter_openapi_python_generated/models/cover_cta.py +4 -3
- twitter_openapi_python_generated/models/create_bookmark_response.py +4 -3
- twitter_openapi_python_generated/models/create_bookmark_response_data.py +4 -3
- twitter_openapi_python_generated/models/create_retweet.py +4 -3
- twitter_openapi_python_generated/models/create_retweet_response.py +4 -3
- twitter_openapi_python_generated/models/create_retweet_response_data.py +4 -3
- twitter_openapi_python_generated/models/create_retweet_response_result.py +4 -3
- twitter_openapi_python_generated/models/create_tweet.py +4 -3
- twitter_openapi_python_generated/models/create_tweet_response.py +4 -3
- twitter_openapi_python_generated/models/create_tweet_response_data.py +4 -3
- twitter_openapi_python_generated/models/create_tweet_response_result.py +4 -3
- twitter_openapi_python_generated/models/cta_client_event_info.py +4 -3
- twitter_openapi_python_generated/models/delete_bookmark_response.py +4 -3
- twitter_openapi_python_generated/models/delete_bookmark_response_data.py +4 -3
- twitter_openapi_python_generated/models/delete_retweet.py +4 -3
- twitter_openapi_python_generated/models/delete_retweet_response.py +4 -3
- twitter_openapi_python_generated/models/delete_retweet_response_data.py +4 -3
- twitter_openapi_python_generated/models/delete_retweet_response_result.py +4 -3
- twitter_openapi_python_generated/models/delete_tweet_response.py +4 -3
- twitter_openapi_python_generated/models/delete_tweet_response_data.py +4 -3
- twitter_openapi_python_generated/models/delete_tweet_response_result.py +4 -3
- twitter_openapi_python_generated/models/display_treatment.py +4 -3
- twitter_openapi_python_generated/models/entities.py +19 -8
- twitter_openapi_python_generated/models/error_extensions.py +4 -3
- twitter_openapi_python_generated/models/error_response.py +14 -5
- twitter_openapi_python_generated/models/error_response_path_inner.py +144 -0
- twitter_openapi_python_generated/models/ext_media_availability.py +4 -3
- twitter_openapi_python_generated/models/extended_entities.py +4 -3
- twitter_openapi_python_generated/models/favorite_tweet.py +4 -3
- twitter_openapi_python_generated/models/favorite_tweet_response.py +4 -3
- twitter_openapi_python_generated/models/feedback_info.py +4 -3
- twitter_openapi_python_generated/models/follow_response.py +4 -3
- twitter_openapi_python_generated/models/follow_response_data.py +4 -3
- twitter_openapi_python_generated/models/follow_response_result.py +4 -3
- twitter_openapi_python_generated/models/follow_response_user.py +4 -3
- twitter_openapi_python_generated/models/follow_timeline.py +4 -3
- twitter_openapi_python_generated/models/grok_annotation.py +89 -0
- twitter_openapi_python_generated/models/grok_entity.py +97 -0
- twitter_openapi_python_generated/models/grok_entity_ref.py +116 -0
- twitter_openapi_python_generated/models/grok_image_annotation.py +4 -3
- twitter_openapi_python_generated/models/grok_share_attachment.py +4 -3
- twitter_openapi_python_generated/models/grok_share_attachment_item.py +7 -4
- twitter_openapi_python_generated/models/grok_translated_community_note.py +105 -0
- twitter_openapi_python_generated/models/grok_translated_community_note_with_availability.py +95 -0
- twitter_openapi_python_generated/models/grok_translated_post.py +103 -0
- twitter_openapi_python_generated/models/grok_translated_post_with_availability.py +95 -0
- twitter_openapi_python_generated/models/highlight.py +4 -3
- twitter_openapi_python_generated/models/home_timeline_home.py +4 -3
- twitter_openapi_python_generated/models/home_timeline_response_data.py +4 -3
- twitter_openapi_python_generated/models/item_result.py +4 -3
- twitter_openapi_python_generated/models/limited_action_results_data.py +4 -3
- twitter_openapi_python_generated/models/list_latest_tweets_timeline_response.py +4 -3
- twitter_openapi_python_generated/models/list_tweets_timeline_data.py +4 -3
- twitter_openapi_python_generated/models/list_tweets_timeline_list.py +4 -3
- twitter_openapi_python_generated/models/location.py +4 -3
- twitter_openapi_python_generated/models/media.py +17 -4
- twitter_openapi_python_generated/models/media_community_result.py +4 -3
- twitter_openapi_python_generated/models/media_community_results.py +4 -3
- twitter_openapi_python_generated/models/media_community_tweet_data.py +4 -3
- twitter_openapi_python_generated/models/media_extended.py +17 -4
- twitter_openapi_python_generated/models/media_original_info.py +4 -3
- twitter_openapi_python_generated/models/media_original_info_focus_rect.py +4 -3
- twitter_openapi_python_generated/models/media_result.py +4 -3
- twitter_openapi_python_generated/models/media_results.py +4 -3
- twitter_openapi_python_generated/models/media_size.py +4 -3
- twitter_openapi_python_generated/models/media_sizes.py +4 -3
- twitter_openapi_python_generated/models/media_stats.py +4 -3
- twitter_openapi_python_generated/models/media_video_info.py +4 -3
- twitter_openapi_python_generated/models/media_video_info_variant.py +4 -3
- twitter_openapi_python_generated/models/media_visibility_results.py +4 -3
- twitter_openapi_python_generated/models/media_visibility_results_blurred_image_interstitial.py +4 -3
- twitter_openapi_python_generated/models/module_entry.py +4 -3
- twitter_openapi_python_generated/models/module_item.py +7 -3
- twitter_openapi_python_generated/models/note_tweet.py +6 -5
- twitter_openapi_python_generated/models/note_tweet_result.py +4 -3
- twitter_openapi_python_generated/models/note_tweet_result_data.py +7 -3
- twitter_openapi_python_generated/models/note_tweet_result_media.py +4 -3
- twitter_openapi_python_generated/models/note_tweet_result_media_inline_media.py +7 -3
- twitter_openapi_python_generated/models/note_tweet_result_rich_text.py +4 -3
- twitter_openapi_python_generated/models/note_tweet_result_rich_text_tag.py +4 -3
- twitter_openapi_python_generated/models/notification_template.py +4 -3
- twitter_openapi_python_generated/models/notifications_result.py +7 -3
- twitter_openapi_python_generated/models/notifications_timeline_data.py +4 -3
- twitter_openapi_python_generated/models/notifications_timeline_response.py +4 -3
- twitter_openapi_python_generated/models/notifications_user_results.py +4 -3
- twitter_openapi_python_generated/models/notifications_viewer_v2.py +4 -3
- twitter_openapi_python_generated/models/one_factor_login_eligibility.py +4 -3
- twitter_openapi_python_generated/models/other_object_all.py +4 -3
- twitter_openapi_python_generated/models/post_create_bookmark_request.py +5 -8
- twitter_openapi_python_generated/models/post_create_bookmark_request_variables.py +4 -3
- twitter_openapi_python_generated/models/post_create_retweet_request.py +6 -9
- twitter_openapi_python_generated/models/post_create_retweet_request_variables.py +4 -3
- twitter_openapi_python_generated/models/post_create_tweet_request.py +6 -9
- twitter_openapi_python_generated/models/post_create_tweet_request_features.py +30 -15
- twitter_openapi_python_generated/models/post_create_tweet_request_variables.py +4 -3
- twitter_openapi_python_generated/models/post_create_tweet_request_variables_conversation_control.py +4 -3
- twitter_openapi_python_generated/models/post_create_tweet_request_variables_media.py +4 -3
- twitter_openapi_python_generated/models/post_create_tweet_request_variables_media_media_entities_inner.py +4 -3
- twitter_openapi_python_generated/models/post_create_tweet_request_variables_reply.py +4 -3
- twitter_openapi_python_generated/models/post_cta.py +101 -0
- twitter_openapi_python_generated/models/post_cta_title_text.py +99 -0
- twitter_openapi_python_generated/models/post_cta_title_text_entity.py +97 -0
- twitter_openapi_python_generated/models/post_cta_title_text_entity_ref.py +96 -0
- twitter_openapi_python_generated/models/post_cta_user_results.py +93 -0
- twitter_openapi_python_generated/models/post_cta_user_results_avatar.py +89 -0
- twitter_openapi_python_generated/models/post_cta_user_results_result.py +96 -0
- twitter_openapi_python_generated/models/post_delete_bookmark_request.py +5 -8
- twitter_openapi_python_generated/models/post_delete_retweet_request.py +6 -9
- twitter_openapi_python_generated/models/post_delete_retweet_request_variables.py +4 -3
- twitter_openapi_python_generated/models/post_delete_tweet_request.py +5 -8
- twitter_openapi_python_generated/models/post_favorite_tweet_request.py +5 -8
- twitter_openapi_python_generated/models/post_unfavorite_tweet_request.py +5 -8
- twitter_openapi_python_generated/models/primary_community_topic.py +7 -3
- twitter_openapi_python_generated/models/profile_bio.py +89 -0
- twitter_openapi_python_generated/models/profile_response.py +4 -3
- twitter_openapi_python_generated/models/profile_response_data.py +4 -3
- twitter_openapi_python_generated/models/quoted_ref_result.py +4 -3
- twitter_openapi_python_generated/models/quoted_status_permalink.py +4 -3
- twitter_openapi_python_generated/models/ranked_community_result.py +4 -3
- twitter_openapi_python_generated/models/ranked_community_results.py +4 -3
- twitter_openapi_python_generated/models/ranked_community_tweet_data.py +4 -3
- twitter_openapi_python_generated/models/retweet.py +7 -3
- twitter_openapi_python_generated/models/retweet_legacy.py +4 -3
- twitter_openapi_python_generated/models/rich_message.py +4 -3
- twitter_openapi_python_generated/models/search_by_raw_query.py +4 -3
- twitter_openapi_python_generated/models/search_timeline.py +4 -3
- twitter_openapi_python_generated/models/search_timeline_data.py +4 -3
- twitter_openapi_python_generated/models/search_timeline_response.py +4 -3
- twitter_openapi_python_generated/models/self_thread.py +7 -3
- twitter_openapi_python_generated/models/sensitive_media_warning.py +4 -3
- twitter_openapi_python_generated/models/session.py +16 -3
- twitter_openapi_python_generated/models/smarttag.py +97 -0
- twitter_openapi_python_generated/models/smarttag_tag.py +89 -0
- twitter_openapi_python_generated/models/social_context_landing_url.py +4 -3
- twitter_openapi_python_generated/models/super_follow_user_profile.py +89 -0
- twitter_openapi_python_generated/models/super_follows_reply_user_result.py +4 -3
- twitter_openapi_python_generated/models/super_follows_reply_user_result_core.py +89 -0
- twitter_openapi_python_generated/models/super_follows_reply_user_result_data.py +12 -11
- twitter_openapi_python_generated/models/super_follows_reply_user_result_legacy.py +4 -3
- twitter_openapi_python_generated/models/text.py +4 -3
- twitter_openapi_python_generated/models/text_entity.py +4 -3
- twitter_openapi_python_generated/models/text_entity_ref.py +4 -3
- twitter_openapi_python_generated/models/text_highlight.py +4 -3
- twitter_openapi_python_generated/models/thumbnail_image.py +4 -3
- twitter_openapi_python_generated/models/timeline.py +4 -3
- twitter_openapi_python_generated/models/timeline_add_entries.py +4 -3
- twitter_openapi_python_generated/models/timeline_add_entry.py +10 -3
- twitter_openapi_python_generated/models/timeline_add_to_module.py +4 -3
- twitter_openapi_python_generated/models/timeline_clear_cache.py +4 -3
- twitter_openapi_python_generated/models/timeline_clear_entries_unread_state.py +4 -3
- twitter_openapi_python_generated/models/timeline_community.py +4 -3
- twitter_openapi_python_generated/models/timeline_cover_behavior.py +4 -3
- twitter_openapi_python_generated/models/timeline_cover_behavior_url.py +4 -3
- twitter_openapi_python_generated/models/timeline_general_context.py +4 -3
- twitter_openapi_python_generated/models/timeline_half_cover.py +4 -3
- twitter_openapi_python_generated/models/timeline_mark_entries_unread_greater_than_sort_index.py +7 -3
- twitter_openapi_python_generated/models/timeline_message_prompt.py +4 -3
- twitter_openapi_python_generated/models/timeline_notification.py +4 -3
- twitter_openapi_python_generated/models/timeline_pin_entry.py +4 -3
- twitter_openapi_python_generated/models/timeline_prompt.py +4 -3
- twitter_openapi_python_generated/models/timeline_replace_entry.py +4 -3
- twitter_openapi_python_generated/models/timeline_response.py +4 -3
- twitter_openapi_python_generated/models/timeline_result.py +4 -3
- twitter_openapi_python_generated/models/timeline_show_alert.py +11 -4
- twitter_openapi_python_generated/models/timeline_show_alert_rich_text.py +4 -3
- twitter_openapi_python_generated/models/timeline_show_cover.py +4 -3
- twitter_openapi_python_generated/models/timeline_terminate_timeline.py +4 -3
- twitter_openapi_python_generated/models/timeline_timeline_cursor.py +4 -3
- twitter_openapi_python_generated/models/timeline_timeline_item.py +4 -3
- twitter_openapi_python_generated/models/timeline_timeline_module.py +4 -3
- twitter_openapi_python_generated/models/timeline_tombstone.py +4 -3
- twitter_openapi_python_generated/models/timeline_topic_context.py +4 -3
- twitter_openapi_python_generated/models/timeline_trend.py +4 -3
- twitter_openapi_python_generated/models/timeline_tweet.py +4 -3
- twitter_openapi_python_generated/models/timeline_user.py +4 -3
- twitter_openapi_python_generated/models/timestamp.py +4 -3
- twitter_openapi_python_generated/models/tombstone_entity.py +4 -3
- twitter_openapi_python_generated/models/tombstone_info.py +4 -3
- twitter_openapi_python_generated/models/tombstone_ref.py +4 -3
- twitter_openapi_python_generated/models/tombstone_rich_text.py +4 -3
- twitter_openapi_python_generated/models/topic_context.py +4 -3
- twitter_openapi_python_generated/models/tracing.py +7 -3
- twitter_openapi_python_generated/models/trend_image.py +4 -3
- twitter_openapi_python_generated/models/trend_metadata.py +4 -3
- twitter_openapi_python_generated/models/trend_results.py +7 -3
- twitter_openapi_python_generated/models/tweet.py +39 -7
- twitter_openapi_python_generated/models/tweet_card.py +4 -3
- twitter_openapi_python_generated/models/tweet_card_legacy.py +4 -3
- twitter_openapi_python_generated/models/tweet_card_legacy_binding_value.py +4 -3
- twitter_openapi_python_generated/models/tweet_card_legacy_binding_value_data.py +4 -3
- twitter_openapi_python_generated/models/tweet_card_legacy_binding_value_data_image.py +4 -3
- twitter_openapi_python_generated/models/tweet_card_platform.py +4 -3
- twitter_openapi_python_generated/models/tweet_card_platform_audience.py +4 -3
- twitter_openapi_python_generated/models/tweet_card_platform_data.py +4 -3
- twitter_openapi_python_generated/models/tweet_card_platform_device.py +7 -3
- twitter_openapi_python_generated/models/tweet_detail_response.py +4 -3
- twitter_openapi_python_generated/models/tweet_detail_response_data.py +4 -3
- twitter_openapi_python_generated/models/tweet_edit_control.py +13 -3
- twitter_openapi_python_generated/models/tweet_edit_control_initial.py +10 -3
- twitter_openapi_python_generated/models/tweet_edit_prespective.py +4 -3
- twitter_openapi_python_generated/models/tweet_favoriters_response.py +4 -3
- twitter_openapi_python_generated/models/tweet_favoriters_response_data.py +4 -3
- twitter_openapi_python_generated/models/tweet_interstitial.py +6 -5
- twitter_openapi_python_generated/models/tweet_interstitial_reveal_text.py +4 -3
- twitter_openapi_python_generated/models/tweet_interstitial_text.py +4 -3
- twitter_openapi_python_generated/models/tweet_interstitial_text_entity.py +4 -3
- twitter_openapi_python_generated/models/tweet_interstitial_text_entity_ref.py +4 -3
- twitter_openapi_python_generated/models/tweet_legacy.py +26 -4
- twitter_openapi_python_generated/models/tweet_legacy_scopes.py +4 -3
- twitter_openapi_python_generated/models/tweet_limited_action_results.py +4 -3
- twitter_openapi_python_generated/models/tweet_post_cta.py +105 -0
- twitter_openapi_python_generated/models/tweet_preview_display.py +4 -3
- twitter_openapi_python_generated/models/tweet_preview_display_cta.py +4 -3
- twitter_openapi_python_generated/models/tweet_preview_display_cta_url.py +4 -3
- twitter_openapi_python_generated/models/tweet_preview_display_tweet.py +18 -5
- twitter_openapi_python_generated/models/tweet_preview_display_tweet_view_count.py +7 -3
- twitter_openapi_python_generated/models/tweet_previous_counts.py +4 -3
- twitter_openapi_python_generated/models/tweet_result_by_rest_id_data.py +4 -3
- twitter_openapi_python_generated/models/tweet_result_by_rest_id_response.py +4 -3
- twitter_openapi_python_generated/models/tweet_retweeters_response.py +4 -3
- twitter_openapi_python_generated/models/tweet_retweeters_response_data.py +4 -3
- twitter_openapi_python_generated/models/tweet_tombstone.py +4 -3
- twitter_openapi_python_generated/models/tweet_unavailable.py +4 -3
- twitter_openapi_python_generated/models/tweet_view.py +7 -3
- twitter_openapi_python_generated/models/tweet_with_visibility_results.py +4 -3
- twitter_openapi_python_generated/models/type_name.py +2 -0
- twitter_openapi_python_generated/models/unfavorite_tweet.py +4 -3
- twitter_openapi_python_generated/models/unfavorite_tweet_response.py +4 -3
- twitter_openapi_python_generated/models/unified_card.py +4 -3
- twitter_openapi_python_generated/models/url.py +4 -3
- twitter_openapi_python_generated/models/urt_endpoint_options.py +4 -3
- twitter_openapi_python_generated/models/urt_endpoint_request_params.py +4 -3
- twitter_openapi_python_generated/models/user.py +83 -7
- twitter_openapi_python_generated/models/user_avatar.py +89 -0
- twitter_openapi_python_generated/models/user_core.py +104 -0
- twitter_openapi_python_generated/models/user_dm_permissions.py +89 -0
- twitter_openapi_python_generated/models/user_features.py +4 -3
- twitter_openapi_python_generated/models/user_highlights_info.py +4 -3
- twitter_openapi_python_generated/models/user_highlights_tweets_data.py +4 -3
- twitter_openapi_python_generated/models/user_highlights_tweets_response.py +4 -3
- twitter_openapi_python_generated/models/user_highlights_tweets_result.py +4 -3
- twitter_openapi_python_generated/models/user_highlights_tweets_timeline.py +4 -3
- twitter_openapi_python_generated/models/user_highlights_tweets_user.py +4 -3
- twitter_openapi_python_generated/models/user_legacy.py +27 -12
- twitter_openapi_python_generated/models/user_legacy_extended_profile.py +4 -3
- twitter_openapi_python_generated/models/user_legacy_extended_profile_birthdate.py +4 -3
- twitter_openapi_python_generated/models/user_location.py +89 -0
- twitter_openapi_python_generated/models/user_media_permissions.py +89 -0
- twitter_openapi_python_generated/models/user_privacy.py +89 -0
- twitter_openapi_python_generated/models/user_professional.py +9 -5
- twitter_openapi_python_generated/models/user_professional_category.py +4 -3
- twitter_openapi_python_generated/models/user_profile.py +93 -0
- twitter_openapi_python_generated/models/user_relationship_perspectives.py +95 -0
- twitter_openapi_python_generated/models/user_response.py +4 -3
- twitter_openapi_python_generated/models/user_response_data.py +4 -3
- twitter_openapi_python_generated/models/user_result_by_screen_name.py +7 -3
- twitter_openapi_python_generated/models/user_result_by_screen_name_core.py +91 -0
- twitter_openapi_python_generated/models/user_result_by_screen_name_legacy.py +4 -3
- twitter_openapi_python_generated/models/user_result_by_screen_name_result.py +31 -6
- twitter_openapi_python_generated/models/user_result_core.py +4 -3
- twitter_openapi_python_generated/models/user_result_privacy.py +89 -0
- twitter_openapi_python_generated/models/user_result_relationship_perspectives.py +95 -0
- twitter_openapi_python_generated/models/user_results.py +4 -3
- twitter_openapi_python_generated/models/user_tip_jar_settings.py +4 -3
- twitter_openapi_python_generated/models/user_tweets_data.py +4 -3
- twitter_openapi_python_generated/models/user_tweets_response.py +4 -3
- twitter_openapi_python_generated/models/user_tweets_result_v1.py +4 -3
- twitter_openapi_python_generated/models/user_tweets_result_v2.py +4 -3
- twitter_openapi_python_generated/models/user_tweets_user.py +4 -3
- twitter_openapi_python_generated/models/user_unavailable.py +4 -3
- twitter_openapi_python_generated/models/user_value.py +7 -3
- twitter_openapi_python_generated/models/user_verification.py +101 -0
- twitter_openapi_python_generated/models/user_verification_info.py +4 -3
- twitter_openapi_python_generated/models/user_verification_info_reason.py +7 -3
- twitter_openapi_python_generated/models/user_verification_info_reason_description.py +4 -3
- twitter_openapi_python_generated/models/user_verification_info_reason_description_entities.py +4 -3
- twitter_openapi_python_generated/models/user_verification_info_reason_description_entities_ref.py +4 -3
- twitter_openapi_python_generated/models/users_response.py +4 -3
- twitter_openapi_python_generated/models/users_response_data.py +4 -3
- twitter_openapi_python_generated/rest.py +7 -2
- twitter_openapi_python_generated-0.0.34.dist-info/METADATA +816 -0
- twitter_openapi_python_generated-0.0.34.dist-info/RECORD +374 -0
- {twitter_openapi_python_generated-0.0.32.dist-info → twitter_openapi_python_generated-0.0.34.dist-info}/WHEEL +1 -1
- twitter_openapi_python_generated/models/community_data.py +0 -219
- twitter_openapi_python_generated-0.0.32.dist-info/METADATA +0 -29
- twitter_openapi_python_generated-0.0.32.dist-info/RECORD +0 -335
- {twitter_openapi_python_generated-0.0.32.dist-info → twitter_openapi_python_generated-0.0.34.dist-info}/licenses/LICENSE +0 -0
- {twitter_openapi_python_generated-0.0.32.dist-info → twitter_openapi_python_generated-0.0.34.dist-info}/licenses/LICENSE.AGPL +0 -0
- {twitter_openapi_python_generated-0.0.32.dist-info → twitter_openapi_python_generated-0.0.34.dist-info}/top_level.txt +0 -0
|
@@ -24,6 +24,7 @@ from twitter_openapi_python_generated.models.error_response import ErrorResponse
|
|
|
24
24
|
from twitter_openapi_python_generated.models.favorite_tweet import FavoriteTweet
|
|
25
25
|
from typing import Optional, Set
|
|
26
26
|
from typing_extensions import Self
|
|
27
|
+
from pydantic_core import to_jsonable_python
|
|
27
28
|
|
|
28
29
|
class FavoriteTweetResponse(BaseModel):
|
|
29
30
|
"""
|
|
@@ -34,7 +35,8 @@ class FavoriteTweetResponse(BaseModel):
|
|
|
34
35
|
__properties: ClassVar[List[str]] = ["data", "errors"]
|
|
35
36
|
|
|
36
37
|
model_config = ConfigDict(
|
|
37
|
-
|
|
38
|
+
validate_by_name=True,
|
|
39
|
+
validate_by_alias=True,
|
|
38
40
|
validate_assignment=True,
|
|
39
41
|
protected_namespaces=(),
|
|
40
42
|
)
|
|
@@ -46,8 +48,7 @@ class FavoriteTweetResponse(BaseModel):
|
|
|
46
48
|
|
|
47
49
|
def to_json(self) -> str:
|
|
48
50
|
"""Returns the JSON representation of the model using alias"""
|
|
49
|
-
|
|
50
|
-
return json.dumps(self.to_dict())
|
|
51
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
51
52
|
|
|
52
53
|
@classmethod
|
|
53
54
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -23,6 +23,7 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
23
23
|
from twitter_openapi_python_generated.models.client_event_info import ClientEventInfo
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
|
+
from pydantic_core import to_jsonable_python
|
|
26
27
|
|
|
27
28
|
class FeedbackInfo(BaseModel):
|
|
28
29
|
"""
|
|
@@ -33,7 +34,8 @@ class FeedbackInfo(BaseModel):
|
|
|
33
34
|
__properties: ClassVar[List[str]] = ["clientEventInfo", "feedbackKeys"]
|
|
34
35
|
|
|
35
36
|
model_config = ConfigDict(
|
|
36
|
-
|
|
37
|
+
validate_by_name=True,
|
|
38
|
+
validate_by_alias=True,
|
|
37
39
|
validate_assignment=True,
|
|
38
40
|
protected_namespaces=(),
|
|
39
41
|
)
|
|
@@ -45,8 +47,7 @@ class FeedbackInfo(BaseModel):
|
|
|
45
47
|
|
|
46
48
|
def to_json(self) -> str:
|
|
47
49
|
"""Returns the JSON representation of the model using alias"""
|
|
48
|
-
|
|
49
|
-
return json.dumps(self.to_dict())
|
|
50
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
50
51
|
|
|
51
52
|
@classmethod
|
|
52
53
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -24,6 +24,7 @@ from twitter_openapi_python_generated.models.error_response import ErrorResponse
|
|
|
24
24
|
from twitter_openapi_python_generated.models.follow_response_data import FollowResponseData
|
|
25
25
|
from typing import Optional, Set
|
|
26
26
|
from typing_extensions import Self
|
|
27
|
+
from pydantic_core import to_jsonable_python
|
|
27
28
|
|
|
28
29
|
class FollowResponse(BaseModel):
|
|
29
30
|
"""
|
|
@@ -34,7 +35,8 @@ class FollowResponse(BaseModel):
|
|
|
34
35
|
__properties: ClassVar[List[str]] = ["data", "errors"]
|
|
35
36
|
|
|
36
37
|
model_config = ConfigDict(
|
|
37
|
-
|
|
38
|
+
validate_by_name=True,
|
|
39
|
+
validate_by_alias=True,
|
|
38
40
|
validate_assignment=True,
|
|
39
41
|
protected_namespaces=(),
|
|
40
42
|
)
|
|
@@ -46,8 +48,7 @@ class FollowResponse(BaseModel):
|
|
|
46
48
|
|
|
47
49
|
def to_json(self) -> str:
|
|
48
50
|
"""Returns the JSON representation of the model using alias"""
|
|
49
|
-
|
|
50
|
-
return json.dumps(self.to_dict())
|
|
51
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
51
52
|
|
|
52
53
|
@classmethod
|
|
53
54
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -23,6 +23,7 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
23
23
|
from twitter_openapi_python_generated.models.follow_response_user import FollowResponseUser
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
|
+
from pydantic_core import to_jsonable_python
|
|
26
27
|
|
|
27
28
|
class FollowResponseData(BaseModel):
|
|
28
29
|
"""
|
|
@@ -32,7 +33,8 @@ class FollowResponseData(BaseModel):
|
|
|
32
33
|
__properties: ClassVar[List[str]] = ["user"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
|
-
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
36
38
|
validate_assignment=True,
|
|
37
39
|
protected_namespaces=(),
|
|
38
40
|
)
|
|
@@ -44,8 +46,7 @@ class FollowResponseData(BaseModel):
|
|
|
44
46
|
|
|
45
47
|
def to_json(self) -> str:
|
|
46
48
|
"""Returns the JSON representation of the model using alias"""
|
|
47
|
-
|
|
48
|
-
return json.dumps(self.to_dict())
|
|
49
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
49
50
|
|
|
50
51
|
@classmethod
|
|
51
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -24,6 +24,7 @@ from twitter_openapi_python_generated.models.follow_timeline import FollowTimeli
|
|
|
24
24
|
from twitter_openapi_python_generated.models.type_name import TypeName
|
|
25
25
|
from typing import Optional, Set
|
|
26
26
|
from typing_extensions import Self
|
|
27
|
+
from pydantic_core import to_jsonable_python
|
|
27
28
|
|
|
28
29
|
class FollowResponseResult(BaseModel):
|
|
29
30
|
"""
|
|
@@ -34,7 +35,8 @@ class FollowResponseResult(BaseModel):
|
|
|
34
35
|
__properties: ClassVar[List[str]] = ["__typename", "timeline"]
|
|
35
36
|
|
|
36
37
|
model_config = ConfigDict(
|
|
37
|
-
|
|
38
|
+
validate_by_name=True,
|
|
39
|
+
validate_by_alias=True,
|
|
38
40
|
validate_assignment=True,
|
|
39
41
|
protected_namespaces=(),
|
|
40
42
|
)
|
|
@@ -46,8 +48,7 @@ class FollowResponseResult(BaseModel):
|
|
|
46
48
|
|
|
47
49
|
def to_json(self) -> str:
|
|
48
50
|
"""Returns the JSON representation of the model using alias"""
|
|
49
|
-
|
|
50
|
-
return json.dumps(self.to_dict())
|
|
51
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
51
52
|
|
|
52
53
|
@classmethod
|
|
53
54
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -23,6 +23,7 @@ from typing import Any, ClassVar, Dict, List
|
|
|
23
23
|
from twitter_openapi_python_generated.models.follow_response_result import FollowResponseResult
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
|
+
from pydantic_core import to_jsonable_python
|
|
26
27
|
|
|
27
28
|
class FollowResponseUser(BaseModel):
|
|
28
29
|
"""
|
|
@@ -32,7 +33,8 @@ class FollowResponseUser(BaseModel):
|
|
|
32
33
|
__properties: ClassVar[List[str]] = ["result"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
|
-
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
36
38
|
validate_assignment=True,
|
|
37
39
|
protected_namespaces=(),
|
|
38
40
|
)
|
|
@@ -44,8 +46,7 @@ class FollowResponseUser(BaseModel):
|
|
|
44
46
|
|
|
45
47
|
def to_json(self) -> str:
|
|
46
48
|
"""Returns the JSON representation of the model using alias"""
|
|
47
|
-
|
|
48
|
-
return json.dumps(self.to_dict())
|
|
49
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
49
50
|
|
|
50
51
|
@classmethod
|
|
51
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -23,6 +23,7 @@ from typing import Any, ClassVar, Dict, List
|
|
|
23
23
|
from twitter_openapi_python_generated.models.timeline import Timeline
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
|
+
from pydantic_core import to_jsonable_python
|
|
26
27
|
|
|
27
28
|
class FollowTimeline(BaseModel):
|
|
28
29
|
"""
|
|
@@ -32,7 +33,8 @@ class FollowTimeline(BaseModel):
|
|
|
32
33
|
__properties: ClassVar[List[str]] = ["timeline"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
|
-
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
36
38
|
validate_assignment=True,
|
|
37
39
|
protected_namespaces=(),
|
|
38
40
|
)
|
|
@@ -44,8 +46,7 @@ class FollowTimeline(BaseModel):
|
|
|
44
46
|
|
|
45
47
|
def to_json(self) -> str:
|
|
46
48
|
"""Returns the JSON representation of the model using alias"""
|
|
47
|
-
|
|
48
|
-
return json.dumps(self.to_dict())
|
|
49
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
49
50
|
|
|
50
51
|
@classmethod
|
|
51
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Twitter OpenAPI
|
|
5
|
+
|
|
6
|
+
Twitter OpenAPI(Swagger) specification
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.0.1
|
|
9
|
+
Contact: yuki@yuki0311.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictBool
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
26
|
+
|
|
27
|
+
class GrokAnnotation(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
GrokAnnotation
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
is_image_editable_by_grok: Optional[StrictBool] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["is_image_editable_by_grok"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
validate_by_name=True,
|
|
36
|
+
validate_by_alias=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of GrokAnnotation from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of GrokAnnotation from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"is_image_editable_by_grok": obj.get("is_image_editable_by_grok")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Twitter OpenAPI
|
|
5
|
+
|
|
6
|
+
Twitter OpenAPI(Swagger) specification
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.0.1
|
|
9
|
+
Contact: yuki@yuki0311.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from twitter_openapi_python_generated.models.grok_entity_ref import GrokEntityRef
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
from pydantic_core import to_jsonable_python
|
|
27
|
+
|
|
28
|
+
class GrokEntity(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
GrokEntity
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
from_index: StrictStr
|
|
33
|
+
ref: GrokEntityRef
|
|
34
|
+
to_index: StrictStr
|
|
35
|
+
__properties: ClassVar[List[str]] = ["from_index", "ref", "to_index"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
validate_by_name=True,
|
|
39
|
+
validate_by_alias=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of GrokEntity from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of ref
|
|
77
|
+
if self.ref:
|
|
78
|
+
_dict['ref'] = self.ref.to_dict()
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of GrokEntity from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"from_index": obj.get("from_index"),
|
|
92
|
+
"ref": GrokEntityRef.from_dict(obj["ref"]) if obj.get("ref") is not None else None,
|
|
93
|
+
"to_index": obj.get("to_index")
|
|
94
|
+
})
|
|
95
|
+
return _obj
|
|
96
|
+
|
|
97
|
+
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Twitter OpenAPI
|
|
5
|
+
|
|
6
|
+
Twitter OpenAPI(Swagger) specification
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.0.1
|
|
9
|
+
Contact: yuki@yuki0311.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
26
|
+
|
|
27
|
+
class GrokEntityRef(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
GrokEntityRef
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
display_url: Optional[StrictStr] = None
|
|
32
|
+
expanded_url: Optional[StrictStr] = None
|
|
33
|
+
text: Optional[StrictStr] = None
|
|
34
|
+
type: StrictStr
|
|
35
|
+
url: Optional[StrictStr] = None
|
|
36
|
+
url_type: Optional[StrictStr] = None
|
|
37
|
+
__properties: ClassVar[List[str]] = ["display_url", "expanded_url", "text", "type", "url", "url_type"]
|
|
38
|
+
|
|
39
|
+
@field_validator('type')
|
|
40
|
+
def type_validate_enum(cls, value):
|
|
41
|
+
"""Validates the enum"""
|
|
42
|
+
if value not in set(['TimelineUrl', 'TimelineRichTextHashtag']):
|
|
43
|
+
raise ValueError("must be one of enum values ('TimelineUrl', 'TimelineRichTextHashtag')")
|
|
44
|
+
return value
|
|
45
|
+
|
|
46
|
+
@field_validator('url_type')
|
|
47
|
+
def url_type_validate_enum(cls, value):
|
|
48
|
+
"""Validates the enum"""
|
|
49
|
+
if value is None:
|
|
50
|
+
return value
|
|
51
|
+
|
|
52
|
+
if value not in set(['ExternalUrl']):
|
|
53
|
+
raise ValueError("must be one of enum values ('ExternalUrl')")
|
|
54
|
+
return value
|
|
55
|
+
|
|
56
|
+
model_config = ConfigDict(
|
|
57
|
+
validate_by_name=True,
|
|
58
|
+
validate_by_alias=True,
|
|
59
|
+
validate_assignment=True,
|
|
60
|
+
protected_namespaces=(),
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def to_str(self) -> str:
|
|
65
|
+
"""Returns the string representation of the model using alias"""
|
|
66
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
67
|
+
|
|
68
|
+
def to_json(self) -> str:
|
|
69
|
+
"""Returns the JSON representation of the model using alias"""
|
|
70
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
71
|
+
|
|
72
|
+
@classmethod
|
|
73
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
74
|
+
"""Create an instance of GrokEntityRef from a JSON string"""
|
|
75
|
+
return cls.from_dict(json.loads(json_str))
|
|
76
|
+
|
|
77
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
78
|
+
"""Return the dictionary representation of the model using alias.
|
|
79
|
+
|
|
80
|
+
This has the following differences from calling pydantic's
|
|
81
|
+
`self.model_dump(by_alias=True)`:
|
|
82
|
+
|
|
83
|
+
* `None` is only added to the output dict for nullable fields that
|
|
84
|
+
were set at model initialization. Other fields with value `None`
|
|
85
|
+
are ignored.
|
|
86
|
+
"""
|
|
87
|
+
excluded_fields: Set[str] = set([
|
|
88
|
+
])
|
|
89
|
+
|
|
90
|
+
_dict = self.model_dump(
|
|
91
|
+
by_alias=True,
|
|
92
|
+
exclude=excluded_fields,
|
|
93
|
+
exclude_none=True,
|
|
94
|
+
)
|
|
95
|
+
return _dict
|
|
96
|
+
|
|
97
|
+
@classmethod
|
|
98
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
99
|
+
"""Create an instance of GrokEntityRef from a dict"""
|
|
100
|
+
if obj is None:
|
|
101
|
+
return None
|
|
102
|
+
|
|
103
|
+
if not isinstance(obj, dict):
|
|
104
|
+
return cls.model_validate(obj)
|
|
105
|
+
|
|
106
|
+
_obj = cls.model_validate({
|
|
107
|
+
"display_url": obj.get("display_url"),
|
|
108
|
+
"expanded_url": obj.get("expanded_url"),
|
|
109
|
+
"text": obj.get("text"),
|
|
110
|
+
"type": obj.get("type"),
|
|
111
|
+
"url": obj.get("url"),
|
|
112
|
+
"url_type": obj.get("url_type")
|
|
113
|
+
})
|
|
114
|
+
return _obj
|
|
115
|
+
|
|
116
|
+
|
|
@@ -22,6 +22,7 @@ from pydantic import BaseModel, ConfigDict, StrictStr
|
|
|
22
22
|
from typing import Any, ClassVar, Dict, List
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
25
26
|
|
|
26
27
|
class GrokImageAnnotation(BaseModel):
|
|
27
28
|
"""
|
|
@@ -32,7 +33,8 @@ class GrokImageAnnotation(BaseModel):
|
|
|
32
33
|
__properties: ClassVar[List[str]] = ["prompt", "upsampled_prompt"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
|
-
|
|
36
|
+
validate_by_name=True,
|
|
37
|
+
validate_by_alias=True,
|
|
36
38
|
validate_assignment=True,
|
|
37
39
|
protected_namespaces=(),
|
|
38
40
|
)
|
|
@@ -44,8 +46,7 @@ class GrokImageAnnotation(BaseModel):
|
|
|
44
46
|
|
|
45
47
|
def to_json(self) -> str:
|
|
46
48
|
"""Returns the JSON representation of the model using alias"""
|
|
47
|
-
|
|
48
|
-
return json.dumps(self.to_dict())
|
|
49
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
49
50
|
|
|
50
51
|
@classmethod
|
|
51
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -22,6 +22,7 @@ from pydantic import BaseModel, ConfigDict
|
|
|
22
22
|
from typing import Any, ClassVar, Dict, List
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
25
26
|
|
|
26
27
|
class GrokShareAttachment(BaseModel):
|
|
27
28
|
"""
|
|
@@ -31,7 +32,8 @@ class GrokShareAttachment(BaseModel):
|
|
|
31
32
|
__properties: ClassVar[List[str]] = ["items"]
|
|
32
33
|
|
|
33
34
|
model_config = ConfigDict(
|
|
34
|
-
|
|
35
|
+
validate_by_name=True,
|
|
36
|
+
validate_by_alias=True,
|
|
35
37
|
validate_assignment=True,
|
|
36
38
|
protected_namespaces=(),
|
|
37
39
|
)
|
|
@@ -43,8 +45,7 @@ class GrokShareAttachment(BaseModel):
|
|
|
43
45
|
|
|
44
46
|
def to_json(self) -> str:
|
|
45
47
|
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
48
49
|
|
|
49
50
|
@classmethod
|
|
50
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -22,18 +22,21 @@ from pydantic import BaseModel, ConfigDict, StrictStr
|
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
|
+
from pydantic_core import to_jsonable_python
|
|
25
26
|
|
|
26
27
|
class GrokShareAttachmentItem(BaseModel):
|
|
27
28
|
"""
|
|
28
29
|
GrokShareAttachmentItem
|
|
29
30
|
""" # noqa: E501
|
|
30
31
|
analysis_post_id_results: Optional[AnalysisResults] = None
|
|
32
|
+
deepsearch_headers: Optional[List[Dict[str, Any]]] = None
|
|
31
33
|
media_urls: List[StrictStr]
|
|
32
34
|
message: StrictStr
|
|
33
|
-
__properties: ClassVar[List[str]] = ["analysis_post_id_results", "media_urls", "message"]
|
|
35
|
+
__properties: ClassVar[List[str]] = ["analysis_post_id_results", "deepsearch_headers", "media_urls", "message"]
|
|
34
36
|
|
|
35
37
|
model_config = ConfigDict(
|
|
36
|
-
|
|
38
|
+
validate_by_name=True,
|
|
39
|
+
validate_by_alias=True,
|
|
37
40
|
validate_assignment=True,
|
|
38
41
|
protected_namespaces=(),
|
|
39
42
|
)
|
|
@@ -45,8 +48,7 @@ class GrokShareAttachmentItem(BaseModel):
|
|
|
45
48
|
|
|
46
49
|
def to_json(self) -> str:
|
|
47
50
|
"""Returns the JSON representation of the model using alias"""
|
|
48
|
-
|
|
49
|
-
return json.dumps(self.to_dict())
|
|
51
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
50
52
|
|
|
51
53
|
@classmethod
|
|
52
54
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
@@ -87,6 +89,7 @@ class GrokShareAttachmentItem(BaseModel):
|
|
|
87
89
|
|
|
88
90
|
_obj = cls.model_validate({
|
|
89
91
|
"analysis_post_id_results": AnalysisResults.from_dict(obj["analysis_post_id_results"]) if obj.get("analysis_post_id_results") is not None else None,
|
|
92
|
+
"deepsearch_headers": obj.get("deepsearch_headers"),
|
|
90
93
|
"media_urls": obj.get("media_urls"),
|
|
91
94
|
"message": obj.get("message")
|
|
92
95
|
})
|