twitter-openapi-python-generated 0.0.30__py3-none-any.whl → 0.0.32__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 +28 -4
- twitter_openapi_python_generated/api/default_api.py +335 -0
- twitter_openapi_python_generated/api/tweet_api.py +1356 -84
- twitter_openapi_python_generated/api_client.py +1 -1
- twitter_openapi_python_generated/configuration.py +1 -1
- twitter_openapi_python_generated/models/__init__.py +27 -3
- twitter_openapi_python_generated/models/about_community_result.py +95 -0
- twitter_openapi_python_generated/models/{timeline_v2.py → about_community_results.py} +12 -12
- twitter_openapi_python_generated/models/about_community_tweet_data.py +92 -0
- twitter_openapi_python_generated/models/analysis_results.py +94 -0
- twitter_openapi_python_generated/models/birdwatch_pivot.py +3 -1
- twitter_openapi_python_generated/models/community_about_timeline_response.py +102 -0
- twitter_openapi_python_generated/models/community_media_timeline_response.py +102 -0
- twitter_openapi_python_generated/models/community_tweets_timeline_response.py +102 -0
- twitter_openapi_python_generated/models/content_item_type.py +2 -0
- twitter_openapi_python_generated/models/grok_image_annotation.py +90 -0
- twitter_openapi_python_generated/models/grok_share_attachment.py +3 -1
- twitter_openapi_python_generated/models/grok_share_attachment_item.py +10 -2
- twitter_openapi_python_generated/models/home_timeline_response_data.py +2 -2
- twitter_openapi_python_generated/models/instruction_type.py +2 -0
- twitter_openapi_python_generated/models/instruction_union.py +46 -8
- twitter_openapi_python_generated/models/item_content_union.py +27 -8
- twitter_openapi_python_generated/models/list_tweets_timeline_data.py +2 -2
- twitter_openapi_python_generated/models/list_tweets_timeline_list.py +3 -3
- twitter_openapi_python_generated/models/media_community_result.py +95 -0
- twitter_openapi_python_generated/models/media_community_results.py +92 -0
- twitter_openapi_python_generated/models/media_community_tweet_data.py +92 -0
- twitter_openapi_python_generated/models/media_result.py +8 -2
- twitter_openapi_python_generated/models/module_item.py +2 -2
- twitter_openapi_python_generated/models/notification_template.py +93 -0
- twitter_openapi_python_generated/models/notifications_result.py +105 -0
- twitter_openapi_python_generated/models/notifications_timeline_data.py +92 -0
- twitter_openapi_python_generated/models/notifications_timeline_response.py +102 -0
- twitter_openapi_python_generated/models/notifications_user_results.py +92 -0
- twitter_openapi_python_generated/models/notifications_viewer_v2.py +92 -0
- twitter_openapi_python_generated/models/post_create_bookmark_request.py +5 -1
- twitter_openapi_python_generated/models/post_create_retweet_request.py +5 -1
- twitter_openapi_python_generated/models/post_create_tweet_request.py +6 -2
- twitter_openapi_python_generated/models/post_create_tweet_request_features.py +19 -5
- twitter_openapi_python_generated/models/post_delete_bookmark_request.py +5 -1
- twitter_openapi_python_generated/models/post_delete_retweet_request.py +5 -1
- twitter_openapi_python_generated/models/post_delete_tweet_request.py +5 -1
- twitter_openapi_python_generated/models/post_favorite_tweet_request.py +5 -1
- twitter_openapi_python_generated/models/post_unfavorite_tweet_request.py +5 -1
- twitter_openapi_python_generated/models/ranked_community_result.py +95 -0
- twitter_openapi_python_generated/models/ranked_community_results.py +92 -0
- twitter_openapi_python_generated/models/ranked_community_tweet_data.py +92 -0
- twitter_openapi_python_generated/models/rich_message.py +90 -0
- twitter_openapi_python_generated/models/search_timeline_data.py +2 -2
- twitter_openapi_python_generated/models/timeline_add_entry.py +2 -2
- twitter_openapi_python_generated/models/timeline_clear_entries_unread_state.py +89 -0
- twitter_openapi_python_generated/models/timeline_general_context.py +5 -3
- twitter_openapi_python_generated/models/timeline_mark_entries_unread_greater_than_sort_index.py +102 -0
- twitter_openapi_python_generated/models/timeline_notification.py +116 -0
- twitter_openapi_python_generated/models/{list_tweets_timeline.py → timeline_result.py} +8 -6
- twitter_openapi_python_generated/models/timeline_timeline_module.py +1 -1
- twitter_openapi_python_generated/models/timeline_trend.py +3 -3
- twitter_openapi_python_generated/models/timeline_user.py +2 -2
- twitter_openapi_python_generated/models/tweet.py +1 -1
- twitter_openapi_python_generated/models/tweet_favoriters_response_data.py +3 -3
- twitter_openapi_python_generated/models/tweet_retweeters_response_data.py +3 -3
- twitter_openapi_python_generated/models/type_name.py +3 -0
- twitter_openapi_python_generated/models/user.py +2 -2
- twitter_openapi_python_generated/models/user_tweets_result_v1.py +95 -0
- twitter_openapi_python_generated/models/{user_tweets_result.py → user_tweets_result_v2.py} +7 -7
- twitter_openapi_python_generated/models/user_tweets_user.py +3 -3
- {twitter_openapi_python_generated-0.0.30.dist-info → twitter_openapi_python_generated-0.0.32.dist-info}/METADATA +12 -2
- {twitter_openapi_python_generated-0.0.30.dist-info → twitter_openapi_python_generated-0.0.32.dist-info}/RECORD +72 -48
- {twitter_openapi_python_generated-0.0.30.dist-info → twitter_openapi_python_generated-0.0.32.dist-info}/WHEEL +1 -1
- {twitter_openapi_python_generated-0.0.30.dist-info → twitter_openapi_python_generated-0.0.32.dist-info/licenses}/LICENSE +0 -0
- {twitter_openapi_python_generated-0.0.30.dist-info → twitter_openapi_python_generated-0.0.32.dist-info/licenses}/LICENSE.AGPL +0 -0
- {twitter_openapi_python_generated-0.0.30.dist-info → twitter_openapi_python_generated-0.0.32.dist-info}/top_level.txt +0 -0
|
@@ -18,18 +18,19 @@ import pprint
|
|
|
18
18
|
import re # noqa: F401
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
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
26
|
|
|
27
|
-
class
|
|
27
|
+
class TimelineResult(BaseModel):
|
|
28
28
|
"""
|
|
29
|
-
|
|
29
|
+
TimelineResult
|
|
30
30
|
""" # noqa: E501
|
|
31
|
+
id: Optional[StrictStr] = None
|
|
31
32
|
timeline: Optional[Timeline] = None
|
|
32
|
-
__properties: ClassVar[List[str]] = ["timeline"]
|
|
33
|
+
__properties: ClassVar[List[str]] = ["id", "timeline"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
36
|
populate_by_name=True,
|
|
@@ -49,7 +50,7 @@ class ListTweetsTimeline(BaseModel):
|
|
|
49
50
|
|
|
50
51
|
@classmethod
|
|
51
52
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
-
"""Create an instance of
|
|
53
|
+
"""Create an instance of TimelineResult from a JSON string"""
|
|
53
54
|
return cls.from_dict(json.loads(json_str))
|
|
54
55
|
|
|
55
56
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -77,7 +78,7 @@ class ListTweetsTimeline(BaseModel):
|
|
|
77
78
|
|
|
78
79
|
@classmethod
|
|
79
80
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
-
"""Create an instance of
|
|
81
|
+
"""Create an instance of TimelineResult from a dict"""
|
|
81
82
|
if obj is None:
|
|
82
83
|
return None
|
|
83
84
|
|
|
@@ -85,6 +86,7 @@ class ListTweetsTimeline(BaseModel):
|
|
|
85
86
|
return cls.model_validate(obj)
|
|
86
87
|
|
|
87
88
|
_obj = cls.model_validate({
|
|
89
|
+
"id": obj.get("id"),
|
|
88
90
|
"timeline": Timeline.from_dict(obj["timeline"]) if obj.get("timeline") is not None else None
|
|
89
91
|
})
|
|
90
92
|
return _obj
|
|
@@ -33,7 +33,7 @@ class TimelineTimelineModule(BaseModel):
|
|
|
33
33
|
TimelineTimelineModule
|
|
34
34
|
""" # noqa: E501
|
|
35
35
|
typename: StrictStr = Field(alias="__typename")
|
|
36
|
-
client_event_info: ClientEventInfo = Field(alias="clientEventInfo")
|
|
36
|
+
client_event_info: Optional[ClientEventInfo] = Field(default=None, alias="clientEventInfo")
|
|
37
37
|
display_type: DisplayType = Field(alias="displayType")
|
|
38
38
|
entry_type: ContentEntryType = Field(alias="entryType")
|
|
39
39
|
feedback_info: Optional[FeedbackInfo] = Field(default=None, alias="feedbackInfo")
|
|
@@ -35,12 +35,12 @@ class TimelineTrend(BaseModel):
|
|
|
35
35
|
TimelineTrend
|
|
36
36
|
""" # noqa: E501
|
|
37
37
|
typename: TypeName = Field(alias="__typename")
|
|
38
|
-
images: List[TrendImage]
|
|
38
|
+
images: Optional[List[TrendImage]] = None
|
|
39
39
|
is_ai_trend: Optional[StrictBool] = None
|
|
40
|
-
item_type: ContentItemType = Field(alias="itemType")
|
|
40
|
+
item_type: Optional[ContentItemType] = Field(default=None, alias="itemType")
|
|
41
41
|
name: StrictStr
|
|
42
42
|
social_context: Optional[SocialContextUnion] = None
|
|
43
|
-
thumbnail_image: ThumbnailImage
|
|
43
|
+
thumbnail_image: Optional[ThumbnailImage] = None
|
|
44
44
|
trend_metadata: TrendMetadata
|
|
45
45
|
trend_url: SocialContextLandingUrl
|
|
46
46
|
__properties: ClassVar[List[str]] = ["__typename", "images", "is_ai_trend", "itemType", "name", "social_context", "thumbnail_image", "trend_metadata", "trend_url"]
|
|
@@ -41,8 +41,8 @@ class TimelineUser(BaseModel):
|
|
|
41
41
|
@field_validator('user_display_type')
|
|
42
42
|
def user_display_type_validate_enum(cls, value):
|
|
43
43
|
"""Validates the enum"""
|
|
44
|
-
if value not in set(['User', 'UserDetailed', 'SubscribableUser']):
|
|
45
|
-
raise ValueError("must be one of enum values ('User', 'UserDetailed', 'SubscribableUser')")
|
|
44
|
+
if value not in set(['User', 'UserDetailed', 'SubscribableUser', 'UserConcise']):
|
|
45
|
+
raise ValueError("must be one of enum values ('User', 'UserDetailed', 'SubscribableUser', 'UserConcise')")
|
|
46
46
|
return value
|
|
47
47
|
|
|
48
48
|
model_config = ConfigDict(
|
|
@@ -26,7 +26,6 @@ from twitter_openapi_python_generated.models.author_community_relationship impor
|
|
|
26
26
|
from twitter_openapi_python_generated.models.birdwatch_pivot import BirdwatchPivot
|
|
27
27
|
from twitter_openapi_python_generated.models.community import Community
|
|
28
28
|
from twitter_openapi_python_generated.models.community_relationship import CommunityRelationship
|
|
29
|
-
from twitter_openapi_python_generated.models.grok_share_attachment import GrokShareAttachment
|
|
30
29
|
from twitter_openapi_python_generated.models.note_tweet import NoteTweet
|
|
31
30
|
from twitter_openapi_python_generated.models.super_follows_reply_user_result import SuperFollowsReplyUserResult
|
|
32
31
|
from twitter_openapi_python_generated.models.trend_results import TrendResults
|
|
@@ -221,6 +220,7 @@ class Tweet(BaseModel):
|
|
|
221
220
|
})
|
|
222
221
|
return _obj
|
|
223
222
|
|
|
223
|
+
from twitter_openapi_python_generated.models.grok_share_attachment import GrokShareAttachment
|
|
224
224
|
from twitter_openapi_python_generated.models.item_result import ItemResult
|
|
225
225
|
from twitter_openapi_python_generated.models.quoted_ref_result import QuotedRefResult
|
|
226
226
|
from twitter_openapi_python_generated.models.tweet_legacy import TweetLegacy
|
|
@@ -20,7 +20,7 @@ import json
|
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from twitter_openapi_python_generated.models.
|
|
23
|
+
from twitter_openapi_python_generated.models.timeline_result import TimelineResult
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
26
|
|
|
@@ -28,7 +28,7 @@ class TweetFavoritersResponseData(BaseModel):
|
|
|
28
28
|
"""
|
|
29
29
|
TweetFavoritersResponseData
|
|
30
30
|
""" # noqa: E501
|
|
31
|
-
favoriters_timeline: Optional[
|
|
31
|
+
favoriters_timeline: Optional[TimelineResult] = None
|
|
32
32
|
__properties: ClassVar[List[str]] = ["favoriters_timeline"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
@@ -85,7 +85,7 @@ class TweetFavoritersResponseData(BaseModel):
|
|
|
85
85
|
return cls.model_validate(obj)
|
|
86
86
|
|
|
87
87
|
_obj = cls.model_validate({
|
|
88
|
-
"favoriters_timeline":
|
|
88
|
+
"favoriters_timeline": TimelineResult.from_dict(obj["favoriters_timeline"]) if obj.get("favoriters_timeline") is not None else None
|
|
89
89
|
})
|
|
90
90
|
return _obj
|
|
91
91
|
|
|
@@ -20,7 +20,7 @@ import json
|
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
-
from twitter_openapi_python_generated.models.
|
|
23
|
+
from twitter_openapi_python_generated.models.timeline_result import TimelineResult
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
26
|
|
|
@@ -28,7 +28,7 @@ class TweetRetweetersResponseData(BaseModel):
|
|
|
28
28
|
"""
|
|
29
29
|
TweetRetweetersResponseData
|
|
30
30
|
""" # noqa: E501
|
|
31
|
-
retweeters_timeline: Optional[
|
|
31
|
+
retweeters_timeline: Optional[TimelineResult] = None
|
|
32
32
|
__properties: ClassVar[List[str]] = ["retweeters_timeline"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
@@ -85,7 +85,7 @@ class TweetRetweetersResponseData(BaseModel):
|
|
|
85
85
|
return cls.model_validate(obj)
|
|
86
86
|
|
|
87
87
|
_obj = cls.model_validate({
|
|
88
|
-
"retweeters_timeline":
|
|
88
|
+
"retweeters_timeline": TimelineResult.from_dict(obj["retweeters_timeline"]) if obj.get("retweeters_timeline") is not None else None
|
|
89
89
|
})
|
|
90
90
|
return _obj
|
|
91
91
|
|
|
@@ -39,6 +39,9 @@ class TypeName(str, Enum):
|
|
|
39
39
|
TIMELINEMESSAGEPROMPT = 'TimelineMessagePrompt'
|
|
40
40
|
TIMELINECOMMUNITY = 'TimelineCommunity'
|
|
41
41
|
TIMELINETOMBSTONE = 'TimelineTombstone'
|
|
42
|
+
TIMELINETREND = 'TimelineTrend'
|
|
43
|
+
TIMELINENOTIFICATION = 'TimelineNotification'
|
|
44
|
+
TIMELINENOTIFICATIONAGGREGATEUSERACTIONS = 'TimelineNotificationAggregateUserActions'
|
|
42
45
|
TWEETUNAVAILABLE = 'TweetUnavailable'
|
|
43
46
|
TWEETPREVIEWDISPLAY = 'TweetPreviewDisplay'
|
|
44
47
|
TWEET = 'Tweet'
|
|
@@ -75,8 +75,8 @@ class User(BaseModel):
|
|
|
75
75
|
if value is None:
|
|
76
76
|
return value
|
|
77
77
|
|
|
78
|
-
if value not in set(['None', 'Parody']):
|
|
79
|
-
raise ValueError("must be one of enum values ('None', 'Parody')")
|
|
78
|
+
if value not in set(['None', 'Parody', 'Commentary']):
|
|
79
|
+
raise ValueError("must be one of enum values ('None', 'Parody', 'Commentary')")
|
|
80
80
|
return value
|
|
81
81
|
|
|
82
82
|
@field_validator('profile_image_shape')
|
|
@@ -0,0 +1,95 @@
|
|
|
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, Field
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from twitter_openapi_python_generated.models.timeline_result import TimelineResult
|
|
24
|
+
from twitter_openapi_python_generated.models.type_name import TypeName
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class UserTweetsResultV1(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
UserTweetsResultV1
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
typename: TypeName = Field(alias="__typename")
|
|
33
|
+
timeline: TimelineResult
|
|
34
|
+
__properties: ClassVar[List[str]] = ["__typename", "timeline"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of UserTweetsResultV1 from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of timeline
|
|
76
|
+
if self.timeline:
|
|
77
|
+
_dict['timeline'] = self.timeline.to_dict()
|
|
78
|
+
return _dict
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
82
|
+
"""Create an instance of UserTweetsResultV1 from a dict"""
|
|
83
|
+
if obj is None:
|
|
84
|
+
return None
|
|
85
|
+
|
|
86
|
+
if not isinstance(obj, dict):
|
|
87
|
+
return cls.model_validate(obj)
|
|
88
|
+
|
|
89
|
+
_obj = cls.model_validate({
|
|
90
|
+
"__typename": obj.get("__typename"),
|
|
91
|
+
"timeline": TimelineResult.from_dict(obj["timeline"]) if obj.get("timeline") is not None else None
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -20,17 +20,17 @@ import json
|
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field
|
|
22
22
|
from typing import Any, ClassVar, Dict, List
|
|
23
|
-
from twitter_openapi_python_generated.models.
|
|
23
|
+
from twitter_openapi_python_generated.models.timeline_result import TimelineResult
|
|
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
27
|
|
|
28
|
-
class
|
|
28
|
+
class UserTweetsResultV2(BaseModel):
|
|
29
29
|
"""
|
|
30
|
-
|
|
30
|
+
UserTweetsResultV2
|
|
31
31
|
""" # noqa: E501
|
|
32
32
|
typename: TypeName = Field(alias="__typename")
|
|
33
|
-
timeline_v2:
|
|
33
|
+
timeline_v2: TimelineResult
|
|
34
34
|
__properties: ClassVar[List[str]] = ["__typename", "timeline_v2"]
|
|
35
35
|
|
|
36
36
|
model_config = ConfigDict(
|
|
@@ -51,7 +51,7 @@ class UserTweetsResult(BaseModel):
|
|
|
51
51
|
|
|
52
52
|
@classmethod
|
|
53
53
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
-
"""Create an instance of
|
|
54
|
+
"""Create an instance of UserTweetsResultV2 from a JSON string"""
|
|
55
55
|
return cls.from_dict(json.loads(json_str))
|
|
56
56
|
|
|
57
57
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -79,7 +79,7 @@ class UserTweetsResult(BaseModel):
|
|
|
79
79
|
|
|
80
80
|
@classmethod
|
|
81
81
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
82
|
-
"""Create an instance of
|
|
82
|
+
"""Create an instance of UserTweetsResultV2 from a dict"""
|
|
83
83
|
if obj is None:
|
|
84
84
|
return None
|
|
85
85
|
|
|
@@ -88,7 +88,7 @@ class UserTweetsResult(BaseModel):
|
|
|
88
88
|
|
|
89
89
|
_obj = cls.model_validate({
|
|
90
90
|
"__typename": obj.get("__typename"),
|
|
91
|
-
"timeline_v2":
|
|
91
|
+
"timeline_v2": TimelineResult.from_dict(obj["timeline_v2"]) if obj.get("timeline_v2") is not None else None
|
|
92
92
|
})
|
|
93
93
|
return _obj
|
|
94
94
|
|
|
@@ -20,7 +20,7 @@ import json
|
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
22
|
from typing import Any, ClassVar, Dict, List
|
|
23
|
-
from twitter_openapi_python_generated.models.
|
|
23
|
+
from twitter_openapi_python_generated.models.user_tweets_result_v1 import UserTweetsResultV1
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
26
|
|
|
@@ -28,7 +28,7 @@ class UserTweetsUser(BaseModel):
|
|
|
28
28
|
"""
|
|
29
29
|
UserTweetsUser
|
|
30
30
|
""" # noqa: E501
|
|
31
|
-
result:
|
|
31
|
+
result: UserTweetsResultV1
|
|
32
32
|
__properties: ClassVar[List[str]] = ["result"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
@@ -85,7 +85,7 @@ class UserTweetsUser(BaseModel):
|
|
|
85
85
|
return cls.model_validate(obj)
|
|
86
86
|
|
|
87
87
|
_obj = cls.model_validate({
|
|
88
|
-
"result":
|
|
88
|
+
"result": UserTweetsResultV1.from_dict(obj["result"]) if obj.get("result") is not None else None
|
|
89
89
|
})
|
|
90
90
|
return _obj
|
|
91
91
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: twitter_openapi_python_generated
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.32
|
|
4
4
|
Summary: Twitter OpenAPI
|
|
5
5
|
Home-page: https://github.com/fa0311/twitter_openapi_python_generated
|
|
6
6
|
Author: OpenAPI Generator community
|
|
@@ -14,6 +14,16 @@ Requires-Dist: urllib3<3.0.0,>=1.25.3
|
|
|
14
14
|
Requires-Dist: python-dateutil>=2.8.2
|
|
15
15
|
Requires-Dist: pydantic>=2
|
|
16
16
|
Requires-Dist: typing-extensions>=4.7.1
|
|
17
|
+
Dynamic: author
|
|
18
|
+
Dynamic: author-email
|
|
19
|
+
Dynamic: description
|
|
20
|
+
Dynamic: description-content-type
|
|
21
|
+
Dynamic: home-page
|
|
22
|
+
Dynamic: keywords
|
|
23
|
+
Dynamic: license
|
|
24
|
+
Dynamic: license-file
|
|
25
|
+
Dynamic: requires-dist
|
|
26
|
+
Dynamic: summary
|
|
17
27
|
|
|
18
28
|
Twitter OpenAPI(Swagger) specification
|
|
19
29
|
|