twitter-openapi-python-generated 0.0.9__py3-none-any.whl → 0.0.11__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 +59 -2
- twitter_openapi_python_generated/api/default_api.py +5 -13
- twitter_openapi_python_generated/api/other_api.py +4 -11
- twitter_openapi_python_generated/api/post_api.py +10 -19
- twitter_openapi_python_generated/api/tweet_api.py +14 -22
- twitter_openapi_python_generated/api/user_api.py +5 -13
- twitter_openapi_python_generated/api/user_list_api.py +8 -16
- twitter_openapi_python_generated/api/users_api.py +4 -12
- twitter_openapi_python_generated/api/v11_get_api.py +5 -13
- twitter_openapi_python_generated/api/v11_post_api.py +5 -13
- twitter_openapi_python_generated/api/v20_get_api.py +4 -12
- twitter_openapi_python_generated/api_client.py +45 -18
- twitter_openapi_python_generated/api_response.py +3 -3
- twitter_openapi_python_generated/configuration.py +5 -3
- twitter_openapi_python_generated/exceptions.py +0 -1
- twitter_openapi_python_generated/models/__init__.py +58 -1
- twitter_openapi_python_generated/models/additional_media_info.py +30 -13
- twitter_openapi_python_generated/models/additional_media_info_call_to_actions.py +92 -0
- twitter_openapi_python_generated/models/additional_media_info_call_to_actions_visit_site.py +88 -0
- twitter_openapi_python_generated/models/author_community_relationship.py +110 -0
- twitter_openapi_python_generated/models/birdwatch_entity.py +10 -12
- twitter_openapi_python_generated/models/birdwatch_entity_ref.py +11 -13
- twitter_openapi_python_generated/models/birdwatch_pivot.py +21 -17
- twitter_openapi_python_generated/models/birdwatch_pivot_call_to_action.py +92 -0
- twitter_openapi_python_generated/models/birdwatch_pivot_footer.py +10 -11
- twitter_openapi_python_generated/models/birdwatch_pivot_note.py +9 -11
- twitter_openapi_python_generated/models/birdwatch_pivot_subtitle.py +10 -11
- twitter_openapi_python_generated/models/bookmarks_response.py +10 -11
- twitter_openapi_python_generated/models/bookmarks_response_data.py +10 -11
- twitter_openapi_python_generated/models/bookmarks_timeline.py +10 -11
- twitter_openapi_python_generated/models/callback.py +9 -10
- twitter_openapi_python_generated/models/client_event_info.py +9 -10
- twitter_openapi_python_generated/models/communities_actions.py +9 -10
- twitter_openapi_python_generated/models/community.py +92 -0
- twitter_openapi_python_generated/models/community_actions.py +110 -0
- twitter_openapi_python_generated/models/community_data.py +210 -0
- twitter_openapi_python_generated/models/community_delete_action_result.py +98 -0
- twitter_openapi_python_generated/models/community_invites_result.py +100 -0
- twitter_openapi_python_generated/models/community_join_action_result.py +89 -0
- twitter_openapi_python_generated/models/community_join_requests_result.py +89 -0
- twitter_openapi_python_generated/models/community_leave_action_result.py +100 -0
- twitter_openapi_python_generated/models/community_pin_action_result.py +89 -0
- twitter_openapi_python_generated/models/community_rule.py +100 -0
- twitter_openapi_python_generated/models/community_urls.py +92 -0
- twitter_openapi_python_generated/models/community_urls_permalink.py +88 -0
- twitter_openapi_python_generated/models/content_entry_type.py +1 -9
- twitter_openapi_python_generated/models/content_item_type.py +1 -9
- twitter_openapi_python_generated/models/content_union.py +8 -17
- twitter_openapi_python_generated/models/cover_cta.py +13 -15
- twitter_openapi_python_generated/models/create_retweet.py +10 -11
- twitter_openapi_python_generated/models/create_retweet_response.py +10 -11
- twitter_openapi_python_generated/models/create_retweet_response_data.py +10 -11
- twitter_openapi_python_generated/models/create_retweet_response_result.py +10 -11
- twitter_openapi_python_generated/models/create_tweet.py +10 -11
- twitter_openapi_python_generated/models/create_tweet_response.py +10 -11
- twitter_openapi_python_generated/models/create_tweet_response_data.py +10 -11
- twitter_openapi_python_generated/models/create_tweet_response_result.py +10 -11
- twitter_openapi_python_generated/models/cta_client_event_info.py +10 -11
- twitter_openapi_python_generated/models/cursor_type.py +1 -9
- twitter_openapi_python_generated/models/delete_retweet.py +10 -11
- twitter_openapi_python_generated/models/delete_retweet_response.py +10 -11
- twitter_openapi_python_generated/models/delete_retweet_response_data.py +10 -11
- twitter_openapi_python_generated/models/delete_retweet_response_result.py +10 -11
- twitter_openapi_python_generated/models/delete_tweet_response.py +10 -11
- twitter_openapi_python_generated/models/delete_tweet_response_data.py +10 -11
- twitter_openapi_python_generated/models/delete_tweet_response_result.py +9 -10
- twitter_openapi_python_generated/models/display_treatment.py +88 -0
- twitter_openapi_python_generated/models/display_type.py +40 -0
- twitter_openapi_python_generated/models/entities.py +11 -12
- twitter_openapi_python_generated/models/error.py +12 -13
- twitter_openapi_python_generated/models/error_extensions.py +10 -11
- twitter_openapi_python_generated/models/error_response.py +10 -11
- twitter_openapi_python_generated/models/errors.py +10 -11
- twitter_openapi_python_generated/models/ext_media_availability.py +10 -11
- twitter_openapi_python_generated/models/extended_entities.py +10 -11
- twitter_openapi_python_generated/models/extensions.py +10 -11
- twitter_openapi_python_generated/models/favorite_tweet.py +9 -10
- twitter_openapi_python_generated/models/favorite_tweet_response_data.py +10 -11
- twitter_openapi_python_generated/models/{social_context.py → feedback_info.py} +17 -23
- twitter_openapi_python_generated/models/follow_response.py +10 -11
- twitter_openapi_python_generated/models/follow_response_data.py +10 -11
- twitter_openapi_python_generated/models/follow_response_result.py +10 -12
- twitter_openapi_python_generated/models/follow_response_user.py +10 -11
- twitter_openapi_python_generated/models/follow_timeline.py +10 -11
- twitter_openapi_python_generated/models/get_bookmarks200_response.py +8 -17
- twitter_openapi_python_generated/models/get_favoriters200_response.py +8 -17
- twitter_openapi_python_generated/models/get_followers200_response.py +8 -17
- twitter_openapi_python_generated/models/get_home_latest_timeline200_response.py +8 -17
- twitter_openapi_python_generated/models/get_likes200_response.py +8 -17
- twitter_openapi_python_generated/models/get_list_latest_tweets_timeline200_response.py +8 -17
- twitter_openapi_python_generated/models/get_profile_spotlights_query200_response.py +8 -17
- twitter_openapi_python_generated/models/get_retweeters200_response.py +8 -17
- twitter_openapi_python_generated/models/get_search_timeline200_response.py +8 -17
- twitter_openapi_python_generated/models/get_tweet_detail200_response.py +8 -17
- twitter_openapi_python_generated/models/get_tweet_result_by_rest_id200_response.py +8 -17
- twitter_openapi_python_generated/models/get_user_by_rest_id200_response.py +8 -17
- twitter_openapi_python_generated/models/get_user_highlights_tweets200_response.py +8 -17
- twitter_openapi_python_generated/models/get_users_by_rest_ids200_response.py +8 -17
- twitter_openapi_python_generated/models/highlight.py +96 -0
- twitter_openapi_python_generated/models/home_timeline_home.py +10 -11
- twitter_openapi_python_generated/models/home_timeline_response_data.py +10 -11
- twitter_openapi_python_generated/models/instruction_type.py +1 -9
- twitter_openapi_python_generated/models/instruction_union.py +8 -17
- twitter_openapi_python_generated/models/item_content_union.py +8 -17
- twitter_openapi_python_generated/models/item_result.py +10 -12
- twitter_openapi_python_generated/models/list_latest_tweets_timeline_response.py +10 -11
- twitter_openapi_python_generated/models/list_tweets_timeline.py +10 -11
- twitter_openapi_python_generated/models/list_tweets_timeline_data.py +10 -11
- twitter_openapi_python_generated/models/list_tweets_timeline_list.py +10 -11
- twitter_openapi_python_generated/models/location.py +9 -10
- twitter_openapi_python_generated/models/media.py +52 -16
- twitter_openapi_python_generated/models/media_extended.py +43 -19
- twitter_openapi_python_generated/models/media_original_info.py +10 -11
- twitter_openapi_python_generated/models/media_original_info_focus_rect.py +9 -10
- twitter_openapi_python_generated/models/media_size.py +10 -11
- twitter_openapi_python_generated/models/media_sizes.py +13 -14
- twitter_openapi_python_generated/models/media_stats.py +9 -11
- twitter_openapi_python_generated/models/media_video_info.py +10 -11
- twitter_openapi_python_generated/models/media_video_info_variant.py +9 -10
- twitter_openapi_python_generated/models/module_entry.py +11 -13
- twitter_openapi_python_generated/models/module_item.py +10 -12
- twitter_openapi_python_generated/models/note_tweet.py +10 -11
- twitter_openapi_python_generated/models/note_tweet_result.py +10 -11
- twitter_openapi_python_generated/models/note_tweet_result_data.py +12 -14
- twitter_openapi_python_generated/models/note_tweet_result_media.py +10 -11
- twitter_openapi_python_generated/models/note_tweet_result_media_inline_media.py +9 -11
- twitter_openapi_python_generated/models/note_tweet_result_rich_text.py +10 -11
- twitter_openapi_python_generated/models/note_tweet_result_rich_text_tag.py +10 -11
- twitter_openapi_python_generated/models/one_factor_login_eligibility.py +9 -11
- twitter_openapi_python_generated/models/other200_response.py +8 -17
- twitter_openapi_python_generated/models/other_response.py +10 -12
- twitter_openapi_python_generated/models/post_create_retweet200_response.py +8 -17
- twitter_openapi_python_generated/models/post_create_retweet_request.py +10 -12
- twitter_openapi_python_generated/models/post_create_retweet_request_variables.py +9 -10
- twitter_openapi_python_generated/models/post_create_tweet200_response.py +8 -17
- twitter_openapi_python_generated/models/post_create_tweet_request.py +12 -14
- twitter_openapi_python_generated/models/post_create_tweet_request_features.py +15 -12
- twitter_openapi_python_generated/models/post_create_tweet_request_variables.py +11 -12
- twitter_openapi_python_generated/models/post_create_tweet_request_variables_media.py +10 -11
- twitter_openapi_python_generated/models/post_create_tweet_request_variables_media_media_entities_inner.py +9 -10
- twitter_openapi_python_generated/models/post_create_tweet_request_variables_reply.py +9 -10
- twitter_openapi_python_generated/models/post_delete_retweet200_response.py +8 -17
- twitter_openapi_python_generated/models/post_delete_retweet_request.py +10 -12
- twitter_openapi_python_generated/models/post_delete_retweet_request_variables.py +9 -10
- twitter_openapi_python_generated/models/post_delete_tweet200_response.py +8 -17
- twitter_openapi_python_generated/models/post_delete_tweet_request.py +10 -12
- twitter_openapi_python_generated/models/post_favorite_tweet200_response.py +8 -17
- twitter_openapi_python_generated/models/post_favorite_tweet_request.py +10 -12
- twitter_openapi_python_generated/models/post_unfavorite_tweet200_response.py +8 -17
- twitter_openapi_python_generated/models/post_unfavorite_tweet_request.py +10 -12
- twitter_openapi_python_generated/models/primary_community_topic.py +98 -0
- twitter_openapi_python_generated/models/profile_response.py +10 -11
- twitter_openapi_python_generated/models/profile_response_data.py +10 -11
- twitter_openapi_python_generated/models/quoted_ref_result.py +92 -0
- twitter_openapi_python_generated/models/quoted_ref_result_data.py +99 -0
- twitter_openapi_python_generated/models/quoted_status_permalink.py +92 -0
- twitter_openapi_python_generated/models/retweet.py +10 -12
- twitter_openapi_python_generated/models/retweet_legacy.py +9 -10
- twitter_openapi_python_generated/models/search_by_raw_query.py +10 -11
- twitter_openapi_python_generated/models/search_timeline.py +10 -11
- twitter_openapi_python_generated/models/search_timeline_data.py +10 -11
- twitter_openapi_python_generated/models/search_timeline_response.py +10 -11
- twitter_openapi_python_generated/models/self_thread.py +9 -11
- twitter_openapi_python_generated/models/session.py +13 -15
- twitter_openapi_python_generated/models/social_context_landing_url.py +106 -0
- twitter_openapi_python_generated/models/social_context_union.py +156 -0
- twitter_openapi_python_generated/models/social_context_union_type.py +38 -0
- twitter_openapi_python_generated/models/super_follows_reply_user_result.py +92 -0
- twitter_openapi_python_generated/models/super_follows_reply_user_result_data.py +95 -0
- twitter_openapi_python_generated/models/super_follows_reply_user_result_legacy.py +88 -0
- twitter_openapi_python_generated/models/text.py +10 -11
- twitter_openapi_python_generated/models/text_entity.py +10 -12
- twitter_openapi_python_generated/models/text_entity_ref.py +11 -13
- twitter_openapi_python_generated/models/text_highlight.py +90 -0
- twitter_openapi_python_generated/models/timeline.py +10 -12
- twitter_openapi_python_generated/models/timeline_add_entries.py +10 -11
- twitter_openapi_python_generated/models/timeline_add_entry.py +10 -12
- twitter_openapi_python_generated/models/timeline_add_to_module.py +10 -12
- twitter_openapi_python_generated/models/timeline_clear_cache.py +9 -10
- twitter_openapi_python_generated/models/timeline_community.py +10 -12
- twitter_openapi_python_generated/models/timeline_cover_behavior.py +10 -11
- twitter_openapi_python_generated/models/timeline_general_context.py +109 -0
- twitter_openapi_python_generated/models/timeline_half_cover.py +15 -17
- twitter_openapi_python_generated/models/timeline_message_prompt.py +10 -12
- twitter_openapi_python_generated/models/timeline_pin_entry.py +10 -11
- twitter_openapi_python_generated/models/timeline_prompt.py +10 -12
- twitter_openapi_python_generated/models/timeline_replace_entry.py +10 -11
- twitter_openapi_python_generated/models/timeline_response.py +10 -11
- twitter_openapi_python_generated/models/timeline_show_alert.py +13 -15
- twitter_openapi_python_generated/models/timeline_show_alert_rich_text.py +9 -10
- twitter_openapi_python_generated/models/timeline_show_cover.py +11 -13
- twitter_openapi_python_generated/models/timeline_terminate_timeline.py +10 -11
- twitter_openapi_python_generated/models/timeline_timeline_cursor.py +18 -12
- twitter_openapi_python_generated/models/timeline_timeline_item.py +11 -13
- twitter_openapi_python_generated/models/timeline_timeline_module.py +21 -21
- twitter_openapi_python_generated/models/timeline_topic_context.py +107 -0
- twitter_openapi_python_generated/models/timeline_tweet.py +21 -17
- twitter_openapi_python_generated/models/timeline_user.py +16 -18
- twitter_openapi_python_generated/models/timeline_v2.py +10 -11
- twitter_openapi_python_generated/models/topic_context.py +100 -0
- twitter_openapi_python_generated/models/tracing.py +9 -11
- twitter_openapi_python_generated/models/tweet.py +51 -21
- twitter_openapi_python_generated/models/tweet_card.py +10 -11
- twitter_openapi_python_generated/models/tweet_card_legacy.py +28 -13
- twitter_openapi_python_generated/models/tweet_card_legacy_binding_value.py +10 -11
- twitter_openapi_python_generated/models/tweet_card_legacy_binding_value_data.py +25 -12
- twitter_openapi_python_generated/models/tweet_card_legacy_binding_value_data_image.py +94 -0
- twitter_openapi_python_generated/models/tweet_card_platform.py +98 -0
- twitter_openapi_python_generated/models/tweet_card_platform_audience.py +95 -0
- twitter_openapi_python_generated/models/tweet_card_platform_data.py +92 -0
- twitter_openapi_python_generated/models/tweet_card_platform_device.py +98 -0
- twitter_openapi_python_generated/models/tweet_detail_response.py +10 -11
- twitter_openapi_python_generated/models/tweet_detail_response_data.py +10 -11
- twitter_openapi_python_generated/models/tweet_edit_control.py +10 -12
- twitter_openapi_python_generated/models/tweet_edit_control_initial.py +9 -11
- twitter_openapi_python_generated/models/tweet_edit_prespective.py +9 -10
- twitter_openapi_python_generated/models/tweet_favoriters_response.py +10 -11
- twitter_openapi_python_generated/models/tweet_favoriters_response_data.py +10 -11
- twitter_openapi_python_generated/models/tweet_interstitial.py +110 -0
- twitter_openapi_python_generated/models/tweet_interstitial_reveal_text.py +100 -0
- twitter_openapi_python_generated/models/tweet_interstitial_text.py +100 -0
- twitter_openapi_python_generated/models/tweet_interstitial_text_entity.py +96 -0
- twitter_openapi_python_generated/models/tweet_interstitial_text_entity_ref.py +106 -0
- twitter_openapi_python_generated/models/tweet_legacy.py +80 -16
- twitter_openapi_python_generated/models/tweet_legacy_scopes.py +88 -0
- twitter_openapi_python_generated/models/tweet_previous_counts.py +96 -0
- twitter_openapi_python_generated/models/tweet_result_by_rest_id_data.py +10 -12
- twitter_openapi_python_generated/models/tweet_result_by_rest_id_response.py +10 -11
- twitter_openapi_python_generated/models/tweet_retweeters_response.py +10 -11
- twitter_openapi_python_generated/models/tweet_retweeters_response_data.py +10 -11
- twitter_openapi_python_generated/models/tweet_tombstone.py +10 -12
- twitter_openapi_python_generated/models/tweet_union.py +8 -17
- twitter_openapi_python_generated/models/tweet_view.py +10 -12
- twitter_openapi_python_generated/models/tweet_with_visibility_results.py +20 -14
- twitter_openapi_python_generated/models/type_name.py +9 -9
- twitter_openapi_python_generated/models/unfavorite_tweet.py +9 -10
- twitter_openapi_python_generated/models/unfavorite_tweet_response_data.py +10 -11
- twitter_openapi_python_generated/models/unified_card.py +95 -0
- twitter_openapi_python_generated/models/url.py +9 -10
- twitter_openapi_python_generated/models/urt_endpoint_options.py +98 -0
- twitter_openapi_python_generated/models/urt_endpoint_request_params.py +90 -0
- twitter_openapi_python_generated/models/user.py +45 -14
- twitter_openapi_python_generated/models/user_features.py +9 -10
- twitter_openapi_python_generated/models/user_highlights_info.py +90 -0
- twitter_openapi_python_generated/models/user_highlights_tweets_data.py +10 -11
- twitter_openapi_python_generated/models/user_highlights_tweets_response.py +10 -11
- twitter_openapi_python_generated/models/user_highlights_tweets_result.py +10 -12
- twitter_openapi_python_generated/models/user_highlights_tweets_timeline.py +10 -11
- twitter_openapi_python_generated/models/user_highlights_tweets_user.py +10 -11
- twitter_openapi_python_generated/models/user_legacy.py +25 -13
- twitter_openapi_python_generated/models/user_professional.py +115 -0
- twitter_openapi_python_generated/models/user_professional_category.py +92 -0
- twitter_openapi_python_generated/models/user_response.py +10 -11
- twitter_openapi_python_generated/models/user_response_data.py +10 -11
- twitter_openapi_python_generated/models/user_result_by_screen_name.py +10 -12
- twitter_openapi_python_generated/models/user_result_by_screen_name_legacy.py +9 -10
- twitter_openapi_python_generated/models/user_result_by_screen_name_result.py +10 -12
- twitter_openapi_python_generated/models/user_result_core.py +10 -11
- twitter_openapi_python_generated/models/user_results.py +10 -11
- twitter_openapi_python_generated/models/user_tweets_data.py +10 -11
- twitter_openapi_python_generated/models/user_tweets_response.py +10 -11
- twitter_openapi_python_generated/models/user_tweets_result.py +10 -12
- twitter_openapi_python_generated/models/user_tweets_user.py +10 -11
- twitter_openapi_python_generated/models/user_unavailable.py +9 -11
- twitter_openapi_python_generated/models/user_union.py +8 -17
- twitter_openapi_python_generated/models/user_value.py +96 -0
- twitter_openapi_python_generated/models/user_verification_info.py +94 -0
- twitter_openapi_python_generated/models/user_verification_info_reason.py +104 -0
- twitter_openapi_python_generated/models/user_verification_info_reason_description.py +98 -0
- twitter_openapi_python_generated/models/user_verification_info_reason_description_entities.py +96 -0
- twitter_openapi_python_generated/models/user_verification_info_reason_description_entities_ref.py +97 -0
- twitter_openapi_python_generated/models/users_response.py +10 -11
- twitter_openapi_python_generated/models/users_response_data.py +10 -11
- twitter_openapi_python_generated/rest.py +23 -35
- {twitter_openapi_python_generated-0.0.9.dist-info → twitter_openapi_python_generated-0.0.11.dist-info}/METADATA +1 -1
- twitter_openapi_python_generated-0.0.11.dist-info/RECORD +282 -0
- twitter_openapi_python_generated-0.0.9.dist-info/RECORD +0 -225
- {twitter_openapi_python_generated-0.0.9.dist-info → twitter_openapi_python_generated-0.0.11.dist-info}/LICENSE +0 -0
- {twitter_openapi_python_generated-0.0.9.dist-info → twitter_openapi_python_generated-0.0.11.dist-info}/LICENSE.AGPL +0 -0
- {twitter_openapi_python_generated-0.0.9.dist-info → twitter_openapi_python_generated-0.0.11.dist-info}/WHEEL +0 -0
- {twitter_openapi_python_generated-0.0.9.dist-info → twitter_openapi_python_generated-0.0.11.dist-info}/top_level.txt +0 -0
|
@@ -14,22 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
from __future__ import annotations
|
|
17
|
-
from inspect import getfullargspec
|
|
18
17
|
import json
|
|
19
18
|
import pprint
|
|
20
|
-
import re # noqa: F401
|
|
21
|
-
|
|
22
|
-
from typing import Any, List, Optional
|
|
23
19
|
from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator
|
|
20
|
+
from typing import Any, List, Optional
|
|
24
21
|
from twitter_openapi_python_generated.models.errors import Errors
|
|
25
22
|
from twitter_openapi_python_generated.models.tweet_favoriters_response import TweetFavoritersResponse
|
|
26
|
-
from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict
|
|
27
|
-
from typing_extensions import Literal
|
|
28
23
|
from pydantic import StrictStr, Field
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
except ImportError:
|
|
32
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Union, List, Optional, Dict
|
|
25
|
+
from typing_extensions import Literal, Self
|
|
33
26
|
|
|
34
27
|
GETFAVORITERS200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "TweetFavoritersResponse"]
|
|
35
28
|
|
|
@@ -42,7 +35,7 @@ class GetFavoriters200Response(BaseModel):
|
|
|
42
35
|
# data type: Errors
|
|
43
36
|
oneof_schema_2_validator: Optional[Errors] = None
|
|
44
37
|
actual_instance: Optional[Union[Errors, TweetFavoritersResponse]] = None
|
|
45
|
-
one_of_schemas: List[str] = Literal["Errors", "TweetFavoritersResponse"]
|
|
38
|
+
one_of_schemas: List[str] = Field(default=Literal["Errors", "TweetFavoritersResponse"])
|
|
46
39
|
|
|
47
40
|
model_config = {
|
|
48
41
|
"validate_assignment": True,
|
|
@@ -85,7 +78,7 @@ class GetFavoriters200Response(BaseModel):
|
|
|
85
78
|
return v
|
|
86
79
|
|
|
87
80
|
@classmethod
|
|
88
|
-
def from_dict(cls, obj:
|
|
81
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
89
82
|
return cls.from_json(json.dumps(obj))
|
|
90
83
|
|
|
91
84
|
@classmethod
|
|
@@ -122,19 +115,17 @@ class GetFavoriters200Response(BaseModel):
|
|
|
122
115
|
if self.actual_instance is None:
|
|
123
116
|
return "null"
|
|
124
117
|
|
|
125
|
-
|
|
126
|
-
if callable(to_json):
|
|
118
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
127
119
|
return self.actual_instance.to_json()
|
|
128
120
|
else:
|
|
129
121
|
return json.dumps(self.actual_instance)
|
|
130
122
|
|
|
131
|
-
def to_dict(self) -> Dict:
|
|
123
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, TweetFavoritersResponse]]:
|
|
132
124
|
"""Returns the dict representation of the actual instance"""
|
|
133
125
|
if self.actual_instance is None:
|
|
134
126
|
return None
|
|
135
127
|
|
|
136
|
-
|
|
137
|
-
if callable(to_dict):
|
|
128
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
138
129
|
return self.actual_instance.to_dict()
|
|
139
130
|
else:
|
|
140
131
|
# primitive type
|
|
@@ -14,22 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
from __future__ import annotations
|
|
17
|
-
from inspect import getfullargspec
|
|
18
17
|
import json
|
|
19
18
|
import pprint
|
|
20
|
-
import re # noqa: F401
|
|
21
|
-
|
|
22
|
-
from typing import Any, List, Optional
|
|
23
19
|
from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator
|
|
20
|
+
from typing import Any, List, Optional
|
|
24
21
|
from twitter_openapi_python_generated.models.errors import Errors
|
|
25
22
|
from twitter_openapi_python_generated.models.follow_response import FollowResponse
|
|
26
|
-
from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict
|
|
27
|
-
from typing_extensions import Literal
|
|
28
23
|
from pydantic import StrictStr, Field
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
except ImportError:
|
|
32
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Union, List, Optional, Dict
|
|
25
|
+
from typing_extensions import Literal, Self
|
|
33
26
|
|
|
34
27
|
GETFOLLOWERS200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "FollowResponse"]
|
|
35
28
|
|
|
@@ -42,7 +35,7 @@ class GetFollowers200Response(BaseModel):
|
|
|
42
35
|
# data type: Errors
|
|
43
36
|
oneof_schema_2_validator: Optional[Errors] = None
|
|
44
37
|
actual_instance: Optional[Union[Errors, FollowResponse]] = None
|
|
45
|
-
one_of_schemas: List[str] = Literal["Errors", "FollowResponse"]
|
|
38
|
+
one_of_schemas: List[str] = Field(default=Literal["Errors", "FollowResponse"])
|
|
46
39
|
|
|
47
40
|
model_config = {
|
|
48
41
|
"validate_assignment": True,
|
|
@@ -85,7 +78,7 @@ class GetFollowers200Response(BaseModel):
|
|
|
85
78
|
return v
|
|
86
79
|
|
|
87
80
|
@classmethod
|
|
88
|
-
def from_dict(cls, obj:
|
|
81
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
89
82
|
return cls.from_json(json.dumps(obj))
|
|
90
83
|
|
|
91
84
|
@classmethod
|
|
@@ -122,19 +115,17 @@ class GetFollowers200Response(BaseModel):
|
|
|
122
115
|
if self.actual_instance is None:
|
|
123
116
|
return "null"
|
|
124
117
|
|
|
125
|
-
|
|
126
|
-
if callable(to_json):
|
|
118
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
127
119
|
return self.actual_instance.to_json()
|
|
128
120
|
else:
|
|
129
121
|
return json.dumps(self.actual_instance)
|
|
130
122
|
|
|
131
|
-
def to_dict(self) -> Dict:
|
|
123
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, FollowResponse]]:
|
|
132
124
|
"""Returns the dict representation of the actual instance"""
|
|
133
125
|
if self.actual_instance is None:
|
|
134
126
|
return None
|
|
135
127
|
|
|
136
|
-
|
|
137
|
-
if callable(to_dict):
|
|
128
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
138
129
|
return self.actual_instance.to_dict()
|
|
139
130
|
else:
|
|
140
131
|
# primitive type
|
|
@@ -14,22 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
from __future__ import annotations
|
|
17
|
-
from inspect import getfullargspec
|
|
18
17
|
import json
|
|
19
18
|
import pprint
|
|
20
|
-
import re # noqa: F401
|
|
21
|
-
|
|
22
|
-
from typing import Any, List, Optional
|
|
23
19
|
from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator
|
|
20
|
+
from typing import Any, List, Optional
|
|
24
21
|
from twitter_openapi_python_generated.models.errors import Errors
|
|
25
22
|
from twitter_openapi_python_generated.models.timeline_response import TimelineResponse
|
|
26
|
-
from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict
|
|
27
|
-
from typing_extensions import Literal
|
|
28
23
|
from pydantic import StrictStr, Field
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
except ImportError:
|
|
32
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Union, List, Optional, Dict
|
|
25
|
+
from typing_extensions import Literal, Self
|
|
33
26
|
|
|
34
27
|
GETHOMELATESTTIMELINE200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "TimelineResponse"]
|
|
35
28
|
|
|
@@ -42,7 +35,7 @@ class GetHomeLatestTimeline200Response(BaseModel):
|
|
|
42
35
|
# data type: Errors
|
|
43
36
|
oneof_schema_2_validator: Optional[Errors] = None
|
|
44
37
|
actual_instance: Optional[Union[Errors, TimelineResponse]] = None
|
|
45
|
-
one_of_schemas: List[str] = Literal["Errors", "TimelineResponse"]
|
|
38
|
+
one_of_schemas: List[str] = Field(default=Literal["Errors", "TimelineResponse"])
|
|
46
39
|
|
|
47
40
|
model_config = {
|
|
48
41
|
"validate_assignment": True,
|
|
@@ -85,7 +78,7 @@ class GetHomeLatestTimeline200Response(BaseModel):
|
|
|
85
78
|
return v
|
|
86
79
|
|
|
87
80
|
@classmethod
|
|
88
|
-
def from_dict(cls, obj:
|
|
81
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
89
82
|
return cls.from_json(json.dumps(obj))
|
|
90
83
|
|
|
91
84
|
@classmethod
|
|
@@ -122,19 +115,17 @@ class GetHomeLatestTimeline200Response(BaseModel):
|
|
|
122
115
|
if self.actual_instance is None:
|
|
123
116
|
return "null"
|
|
124
117
|
|
|
125
|
-
|
|
126
|
-
if callable(to_json):
|
|
118
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
127
119
|
return self.actual_instance.to_json()
|
|
128
120
|
else:
|
|
129
121
|
return json.dumps(self.actual_instance)
|
|
130
122
|
|
|
131
|
-
def to_dict(self) -> Dict:
|
|
123
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, TimelineResponse]]:
|
|
132
124
|
"""Returns the dict representation of the actual instance"""
|
|
133
125
|
if self.actual_instance is None:
|
|
134
126
|
return None
|
|
135
127
|
|
|
136
|
-
|
|
137
|
-
if callable(to_dict):
|
|
128
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
138
129
|
return self.actual_instance.to_dict()
|
|
139
130
|
else:
|
|
140
131
|
# primitive type
|
|
@@ -14,22 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
from __future__ import annotations
|
|
17
|
-
from inspect import getfullargspec
|
|
18
17
|
import json
|
|
19
18
|
import pprint
|
|
20
|
-
import re # noqa: F401
|
|
21
|
-
|
|
22
|
-
from typing import Any, List, Optional
|
|
23
19
|
from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator
|
|
20
|
+
from typing import Any, List, Optional
|
|
24
21
|
from twitter_openapi_python_generated.models.errors import Errors
|
|
25
22
|
from twitter_openapi_python_generated.models.user_tweets_response import UserTweetsResponse
|
|
26
|
-
from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict
|
|
27
|
-
from typing_extensions import Literal
|
|
28
23
|
from pydantic import StrictStr, Field
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
except ImportError:
|
|
32
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Union, List, Optional, Dict
|
|
25
|
+
from typing_extensions import Literal, Self
|
|
33
26
|
|
|
34
27
|
GETLIKES200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "UserTweetsResponse"]
|
|
35
28
|
|
|
@@ -42,7 +35,7 @@ class GetLikes200Response(BaseModel):
|
|
|
42
35
|
# data type: Errors
|
|
43
36
|
oneof_schema_2_validator: Optional[Errors] = None
|
|
44
37
|
actual_instance: Optional[Union[Errors, UserTweetsResponse]] = None
|
|
45
|
-
one_of_schemas: List[str] = Literal["Errors", "UserTweetsResponse"]
|
|
38
|
+
one_of_schemas: List[str] = Field(default=Literal["Errors", "UserTweetsResponse"])
|
|
46
39
|
|
|
47
40
|
model_config = {
|
|
48
41
|
"validate_assignment": True,
|
|
@@ -85,7 +78,7 @@ class GetLikes200Response(BaseModel):
|
|
|
85
78
|
return v
|
|
86
79
|
|
|
87
80
|
@classmethod
|
|
88
|
-
def from_dict(cls, obj:
|
|
81
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
89
82
|
return cls.from_json(json.dumps(obj))
|
|
90
83
|
|
|
91
84
|
@classmethod
|
|
@@ -122,19 +115,17 @@ class GetLikes200Response(BaseModel):
|
|
|
122
115
|
if self.actual_instance is None:
|
|
123
116
|
return "null"
|
|
124
117
|
|
|
125
|
-
|
|
126
|
-
if callable(to_json):
|
|
118
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
127
119
|
return self.actual_instance.to_json()
|
|
128
120
|
else:
|
|
129
121
|
return json.dumps(self.actual_instance)
|
|
130
122
|
|
|
131
|
-
def to_dict(self) -> Dict:
|
|
123
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, UserTweetsResponse]]:
|
|
132
124
|
"""Returns the dict representation of the actual instance"""
|
|
133
125
|
if self.actual_instance is None:
|
|
134
126
|
return None
|
|
135
127
|
|
|
136
|
-
|
|
137
|
-
if callable(to_dict):
|
|
128
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
138
129
|
return self.actual_instance.to_dict()
|
|
139
130
|
else:
|
|
140
131
|
# primitive type
|
|
@@ -14,22 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
from __future__ import annotations
|
|
17
|
-
from inspect import getfullargspec
|
|
18
17
|
import json
|
|
19
18
|
import pprint
|
|
20
|
-
import re # noqa: F401
|
|
21
|
-
|
|
22
|
-
from typing import Any, List, Optional
|
|
23
19
|
from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator
|
|
20
|
+
from typing import Any, List, Optional
|
|
24
21
|
from twitter_openapi_python_generated.models.errors import Errors
|
|
25
22
|
from twitter_openapi_python_generated.models.list_latest_tweets_timeline_response import ListLatestTweetsTimelineResponse
|
|
26
|
-
from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict
|
|
27
|
-
from typing_extensions import Literal
|
|
28
23
|
from pydantic import StrictStr, Field
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
except ImportError:
|
|
32
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Union, List, Optional, Dict
|
|
25
|
+
from typing_extensions import Literal, Self
|
|
33
26
|
|
|
34
27
|
GETLISTLATESTTWEETSTIMELINE200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "ListLatestTweetsTimelineResponse"]
|
|
35
28
|
|
|
@@ -42,7 +35,7 @@ class GetListLatestTweetsTimeline200Response(BaseModel):
|
|
|
42
35
|
# data type: Errors
|
|
43
36
|
oneof_schema_2_validator: Optional[Errors] = None
|
|
44
37
|
actual_instance: Optional[Union[Errors, ListLatestTweetsTimelineResponse]] = None
|
|
45
|
-
one_of_schemas: List[str] = Literal["Errors", "ListLatestTweetsTimelineResponse"]
|
|
38
|
+
one_of_schemas: List[str] = Field(default=Literal["Errors", "ListLatestTweetsTimelineResponse"])
|
|
46
39
|
|
|
47
40
|
model_config = {
|
|
48
41
|
"validate_assignment": True,
|
|
@@ -85,7 +78,7 @@ class GetListLatestTweetsTimeline200Response(BaseModel):
|
|
|
85
78
|
return v
|
|
86
79
|
|
|
87
80
|
@classmethod
|
|
88
|
-
def from_dict(cls, obj:
|
|
81
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
89
82
|
return cls.from_json(json.dumps(obj))
|
|
90
83
|
|
|
91
84
|
@classmethod
|
|
@@ -122,19 +115,17 @@ class GetListLatestTweetsTimeline200Response(BaseModel):
|
|
|
122
115
|
if self.actual_instance is None:
|
|
123
116
|
return "null"
|
|
124
117
|
|
|
125
|
-
|
|
126
|
-
if callable(to_json):
|
|
118
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
127
119
|
return self.actual_instance.to_json()
|
|
128
120
|
else:
|
|
129
121
|
return json.dumps(self.actual_instance)
|
|
130
122
|
|
|
131
|
-
def to_dict(self) -> Dict:
|
|
123
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, ListLatestTweetsTimelineResponse]]:
|
|
132
124
|
"""Returns the dict representation of the actual instance"""
|
|
133
125
|
if self.actual_instance is None:
|
|
134
126
|
return None
|
|
135
127
|
|
|
136
|
-
|
|
137
|
-
if callable(to_dict):
|
|
128
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
138
129
|
return self.actual_instance.to_dict()
|
|
139
130
|
else:
|
|
140
131
|
# primitive type
|
|
@@ -14,22 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
from __future__ import annotations
|
|
17
|
-
from inspect import getfullargspec
|
|
18
17
|
import json
|
|
19
18
|
import pprint
|
|
20
|
-
import re # noqa: F401
|
|
21
|
-
|
|
22
|
-
from typing import Any, List, Optional
|
|
23
19
|
from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator
|
|
20
|
+
from typing import Any, List, Optional
|
|
24
21
|
from twitter_openapi_python_generated.models.errors import Errors
|
|
25
22
|
from twitter_openapi_python_generated.models.profile_response import ProfileResponse
|
|
26
|
-
from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict
|
|
27
|
-
from typing_extensions import Literal
|
|
28
23
|
from pydantic import StrictStr, Field
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
except ImportError:
|
|
32
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Union, List, Optional, Dict
|
|
25
|
+
from typing_extensions import Literal, Self
|
|
33
26
|
|
|
34
27
|
GETPROFILESPOTLIGHTSQUERY200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "ProfileResponse"]
|
|
35
28
|
|
|
@@ -42,7 +35,7 @@ class GetProfileSpotlightsQuery200Response(BaseModel):
|
|
|
42
35
|
# data type: Errors
|
|
43
36
|
oneof_schema_2_validator: Optional[Errors] = None
|
|
44
37
|
actual_instance: Optional[Union[Errors, ProfileResponse]] = None
|
|
45
|
-
one_of_schemas: List[str] = Literal["Errors", "ProfileResponse"]
|
|
38
|
+
one_of_schemas: List[str] = Field(default=Literal["Errors", "ProfileResponse"])
|
|
46
39
|
|
|
47
40
|
model_config = {
|
|
48
41
|
"validate_assignment": True,
|
|
@@ -85,7 +78,7 @@ class GetProfileSpotlightsQuery200Response(BaseModel):
|
|
|
85
78
|
return v
|
|
86
79
|
|
|
87
80
|
@classmethod
|
|
88
|
-
def from_dict(cls, obj:
|
|
81
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
89
82
|
return cls.from_json(json.dumps(obj))
|
|
90
83
|
|
|
91
84
|
@classmethod
|
|
@@ -122,19 +115,17 @@ class GetProfileSpotlightsQuery200Response(BaseModel):
|
|
|
122
115
|
if self.actual_instance is None:
|
|
123
116
|
return "null"
|
|
124
117
|
|
|
125
|
-
|
|
126
|
-
if callable(to_json):
|
|
118
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
127
119
|
return self.actual_instance.to_json()
|
|
128
120
|
else:
|
|
129
121
|
return json.dumps(self.actual_instance)
|
|
130
122
|
|
|
131
|
-
def to_dict(self) -> Dict:
|
|
123
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, ProfileResponse]]:
|
|
132
124
|
"""Returns the dict representation of the actual instance"""
|
|
133
125
|
if self.actual_instance is None:
|
|
134
126
|
return None
|
|
135
127
|
|
|
136
|
-
|
|
137
|
-
if callable(to_dict):
|
|
128
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
138
129
|
return self.actual_instance.to_dict()
|
|
139
130
|
else:
|
|
140
131
|
# primitive type
|
|
@@ -14,22 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
from __future__ import annotations
|
|
17
|
-
from inspect import getfullargspec
|
|
18
17
|
import json
|
|
19
18
|
import pprint
|
|
20
|
-
import re # noqa: F401
|
|
21
|
-
|
|
22
|
-
from typing import Any, List, Optional
|
|
23
19
|
from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator
|
|
20
|
+
from typing import Any, List, Optional
|
|
24
21
|
from twitter_openapi_python_generated.models.errors import Errors
|
|
25
22
|
from twitter_openapi_python_generated.models.tweet_retweeters_response import TweetRetweetersResponse
|
|
26
|
-
from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict
|
|
27
|
-
from typing_extensions import Literal
|
|
28
23
|
from pydantic import StrictStr, Field
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
except ImportError:
|
|
32
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Union, List, Optional, Dict
|
|
25
|
+
from typing_extensions import Literal, Self
|
|
33
26
|
|
|
34
27
|
GETRETWEETERS200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "TweetRetweetersResponse"]
|
|
35
28
|
|
|
@@ -42,7 +35,7 @@ class GetRetweeters200Response(BaseModel):
|
|
|
42
35
|
# data type: Errors
|
|
43
36
|
oneof_schema_2_validator: Optional[Errors] = None
|
|
44
37
|
actual_instance: Optional[Union[Errors, TweetRetweetersResponse]] = None
|
|
45
|
-
one_of_schemas: List[str] = Literal["Errors", "TweetRetweetersResponse"]
|
|
38
|
+
one_of_schemas: List[str] = Field(default=Literal["Errors", "TweetRetweetersResponse"])
|
|
46
39
|
|
|
47
40
|
model_config = {
|
|
48
41
|
"validate_assignment": True,
|
|
@@ -85,7 +78,7 @@ class GetRetweeters200Response(BaseModel):
|
|
|
85
78
|
return v
|
|
86
79
|
|
|
87
80
|
@classmethod
|
|
88
|
-
def from_dict(cls, obj:
|
|
81
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
89
82
|
return cls.from_json(json.dumps(obj))
|
|
90
83
|
|
|
91
84
|
@classmethod
|
|
@@ -122,19 +115,17 @@ class GetRetweeters200Response(BaseModel):
|
|
|
122
115
|
if self.actual_instance is None:
|
|
123
116
|
return "null"
|
|
124
117
|
|
|
125
|
-
|
|
126
|
-
if callable(to_json):
|
|
118
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
127
119
|
return self.actual_instance.to_json()
|
|
128
120
|
else:
|
|
129
121
|
return json.dumps(self.actual_instance)
|
|
130
122
|
|
|
131
|
-
def to_dict(self) -> Dict:
|
|
123
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, TweetRetweetersResponse]]:
|
|
132
124
|
"""Returns the dict representation of the actual instance"""
|
|
133
125
|
if self.actual_instance is None:
|
|
134
126
|
return None
|
|
135
127
|
|
|
136
|
-
|
|
137
|
-
if callable(to_dict):
|
|
128
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
138
129
|
return self.actual_instance.to_dict()
|
|
139
130
|
else:
|
|
140
131
|
# primitive type
|
|
@@ -14,22 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
from __future__ import annotations
|
|
17
|
-
from inspect import getfullargspec
|
|
18
17
|
import json
|
|
19
18
|
import pprint
|
|
20
|
-
import re # noqa: F401
|
|
21
|
-
|
|
22
|
-
from typing import Any, List, Optional
|
|
23
19
|
from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator
|
|
20
|
+
from typing import Any, List, Optional
|
|
24
21
|
from twitter_openapi_python_generated.models.errors import Errors
|
|
25
22
|
from twitter_openapi_python_generated.models.search_timeline_response import SearchTimelineResponse
|
|
26
|
-
from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict
|
|
27
|
-
from typing_extensions import Literal
|
|
28
23
|
from pydantic import StrictStr, Field
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
except ImportError:
|
|
32
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Union, List, Optional, Dict
|
|
25
|
+
from typing_extensions import Literal, Self
|
|
33
26
|
|
|
34
27
|
GETSEARCHTIMELINE200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "SearchTimelineResponse"]
|
|
35
28
|
|
|
@@ -42,7 +35,7 @@ class GetSearchTimeline200Response(BaseModel):
|
|
|
42
35
|
# data type: Errors
|
|
43
36
|
oneof_schema_2_validator: Optional[Errors] = None
|
|
44
37
|
actual_instance: Optional[Union[Errors, SearchTimelineResponse]] = None
|
|
45
|
-
one_of_schemas: List[str] = Literal["Errors", "SearchTimelineResponse"]
|
|
38
|
+
one_of_schemas: List[str] = Field(default=Literal["Errors", "SearchTimelineResponse"])
|
|
46
39
|
|
|
47
40
|
model_config = {
|
|
48
41
|
"validate_assignment": True,
|
|
@@ -85,7 +78,7 @@ class GetSearchTimeline200Response(BaseModel):
|
|
|
85
78
|
return v
|
|
86
79
|
|
|
87
80
|
@classmethod
|
|
88
|
-
def from_dict(cls, obj:
|
|
81
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
89
82
|
return cls.from_json(json.dumps(obj))
|
|
90
83
|
|
|
91
84
|
@classmethod
|
|
@@ -122,19 +115,17 @@ class GetSearchTimeline200Response(BaseModel):
|
|
|
122
115
|
if self.actual_instance is None:
|
|
123
116
|
return "null"
|
|
124
117
|
|
|
125
|
-
|
|
126
|
-
if callable(to_json):
|
|
118
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
127
119
|
return self.actual_instance.to_json()
|
|
128
120
|
else:
|
|
129
121
|
return json.dumps(self.actual_instance)
|
|
130
122
|
|
|
131
|
-
def to_dict(self) -> Dict:
|
|
123
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, SearchTimelineResponse]]:
|
|
132
124
|
"""Returns the dict representation of the actual instance"""
|
|
133
125
|
if self.actual_instance is None:
|
|
134
126
|
return None
|
|
135
127
|
|
|
136
|
-
|
|
137
|
-
if callable(to_dict):
|
|
128
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
138
129
|
return self.actual_instance.to_dict()
|
|
139
130
|
else:
|
|
140
131
|
# primitive type
|
|
@@ -14,22 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
from __future__ import annotations
|
|
17
|
-
from inspect import getfullargspec
|
|
18
17
|
import json
|
|
19
18
|
import pprint
|
|
20
|
-
import re # noqa: F401
|
|
21
|
-
|
|
22
|
-
from typing import Any, List, Optional
|
|
23
19
|
from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator
|
|
20
|
+
from typing import Any, List, Optional
|
|
24
21
|
from twitter_openapi_python_generated.models.errors import Errors
|
|
25
22
|
from twitter_openapi_python_generated.models.tweet_detail_response import TweetDetailResponse
|
|
26
|
-
from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict
|
|
27
|
-
from typing_extensions import Literal
|
|
28
23
|
from pydantic import StrictStr, Field
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
except ImportError:
|
|
32
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Union, List, Optional, Dict
|
|
25
|
+
from typing_extensions import Literal, Self
|
|
33
26
|
|
|
34
27
|
GETTWEETDETAIL200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "TweetDetailResponse"]
|
|
35
28
|
|
|
@@ -42,7 +35,7 @@ class GetTweetDetail200Response(BaseModel):
|
|
|
42
35
|
# data type: Errors
|
|
43
36
|
oneof_schema_2_validator: Optional[Errors] = None
|
|
44
37
|
actual_instance: Optional[Union[Errors, TweetDetailResponse]] = None
|
|
45
|
-
one_of_schemas: List[str] = Literal["Errors", "TweetDetailResponse"]
|
|
38
|
+
one_of_schemas: List[str] = Field(default=Literal["Errors", "TweetDetailResponse"])
|
|
46
39
|
|
|
47
40
|
model_config = {
|
|
48
41
|
"validate_assignment": True,
|
|
@@ -85,7 +78,7 @@ class GetTweetDetail200Response(BaseModel):
|
|
|
85
78
|
return v
|
|
86
79
|
|
|
87
80
|
@classmethod
|
|
88
|
-
def from_dict(cls, obj:
|
|
81
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
89
82
|
return cls.from_json(json.dumps(obj))
|
|
90
83
|
|
|
91
84
|
@classmethod
|
|
@@ -122,19 +115,17 @@ class GetTweetDetail200Response(BaseModel):
|
|
|
122
115
|
if self.actual_instance is None:
|
|
123
116
|
return "null"
|
|
124
117
|
|
|
125
|
-
|
|
126
|
-
if callable(to_json):
|
|
118
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
127
119
|
return self.actual_instance.to_json()
|
|
128
120
|
else:
|
|
129
121
|
return json.dumps(self.actual_instance)
|
|
130
122
|
|
|
131
|
-
def to_dict(self) -> Dict:
|
|
123
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, TweetDetailResponse]]:
|
|
132
124
|
"""Returns the dict representation of the actual instance"""
|
|
133
125
|
if self.actual_instance is None:
|
|
134
126
|
return None
|
|
135
127
|
|
|
136
|
-
|
|
137
|
-
if callable(to_dict):
|
|
128
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
138
129
|
return self.actual_instance.to_dict()
|
|
139
130
|
else:
|
|
140
131
|
# primitive type
|
|
@@ -14,22 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
from __future__ import annotations
|
|
17
|
-
from inspect import getfullargspec
|
|
18
17
|
import json
|
|
19
18
|
import pprint
|
|
20
|
-
import re # noqa: F401
|
|
21
|
-
|
|
22
|
-
from typing import Any, List, Optional
|
|
23
19
|
from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator
|
|
20
|
+
from typing import Any, List, Optional
|
|
24
21
|
from twitter_openapi_python_generated.models.errors import Errors
|
|
25
22
|
from twitter_openapi_python_generated.models.tweet_result_by_rest_id_response import TweetResultByRestIdResponse
|
|
26
|
-
from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict
|
|
27
|
-
from typing_extensions import Literal
|
|
28
23
|
from pydantic import StrictStr, Field
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
except ImportError:
|
|
32
|
-
from typing_extensions import Self
|
|
24
|
+
from typing import Union, List, Optional, Dict
|
|
25
|
+
from typing_extensions import Literal, Self
|
|
33
26
|
|
|
34
27
|
GETTWEETRESULTBYRESTID200RESPONSE_ONE_OF_SCHEMAS = ["Errors", "TweetResultByRestIdResponse"]
|
|
35
28
|
|
|
@@ -42,7 +35,7 @@ class GetTweetResultByRestId200Response(BaseModel):
|
|
|
42
35
|
# data type: Errors
|
|
43
36
|
oneof_schema_2_validator: Optional[Errors] = None
|
|
44
37
|
actual_instance: Optional[Union[Errors, TweetResultByRestIdResponse]] = None
|
|
45
|
-
one_of_schemas: List[str] = Literal["Errors", "TweetResultByRestIdResponse"]
|
|
38
|
+
one_of_schemas: List[str] = Field(default=Literal["Errors", "TweetResultByRestIdResponse"])
|
|
46
39
|
|
|
47
40
|
model_config = {
|
|
48
41
|
"validate_assignment": True,
|
|
@@ -85,7 +78,7 @@ class GetTweetResultByRestId200Response(BaseModel):
|
|
|
85
78
|
return v
|
|
86
79
|
|
|
87
80
|
@classmethod
|
|
88
|
-
def from_dict(cls, obj:
|
|
81
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
89
82
|
return cls.from_json(json.dumps(obj))
|
|
90
83
|
|
|
91
84
|
@classmethod
|
|
@@ -122,19 +115,17 @@ class GetTweetResultByRestId200Response(BaseModel):
|
|
|
122
115
|
if self.actual_instance is None:
|
|
123
116
|
return "null"
|
|
124
117
|
|
|
125
|
-
|
|
126
|
-
if callable(to_json):
|
|
118
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
127
119
|
return self.actual_instance.to_json()
|
|
128
120
|
else:
|
|
129
121
|
return json.dumps(self.actual_instance)
|
|
130
122
|
|
|
131
|
-
def to_dict(self) -> Dict:
|
|
123
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], Errors, TweetResultByRestIdResponse]]:
|
|
132
124
|
"""Returns the dict representation of the actual instance"""
|
|
133
125
|
if self.actual_instance is None:
|
|
134
126
|
return None
|
|
135
127
|
|
|
136
|
-
|
|
137
|
-
if callable(to_dict):
|
|
128
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
138
129
|
return self.actual_instance.to_dict()
|
|
139
130
|
else:
|
|
140
131
|
# primitive type
|