twitter-openapi-python-generated 0.0.24__py3-none-any.whl → 0.0.26__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 +7 -29
- twitter_openapi_python_generated/api/default_api.py +14 -12
- twitter_openapi_python_generated/api/other_api.py +7 -6
- twitter_openapi_python_generated/api/post_api.py +56 -48
- twitter_openapi_python_generated/api/tweet_api.py +73 -62
- twitter_openapi_python_generated/api/user_api.py +13 -11
- twitter_openapi_python_generated/api/user_list_api.py +33 -28
- twitter_openapi_python_generated/api/users_api.py +7 -6
- twitter_openapi_python_generated/api/v11_get_api.py +2 -0
- twitter_openapi_python_generated/api/v11_post_api.py +2 -0
- twitter_openapi_python_generated/api/v20_get_api.py +1 -0
- twitter_openapi_python_generated/api_client.py +1 -1
- twitter_openapi_python_generated/configuration.py +185 -38
- twitter_openapi_python_generated/models/__init__.py +6 -28
- twitter_openapi_python_generated/models/author_community_relationship.py +2 -2
- twitter_openapi_python_generated/models/birdwatch_pivot.py +6 -6
- twitter_openapi_python_generated/models/bookmarks_response.py +14 -4
- twitter_openapi_python_generated/models/community_actions.py +3 -3
- twitter_openapi_python_generated/models/community_data.py +4 -4
- twitter_openapi_python_generated/models/{favorite_tweet_response_data.py → community_join_action_unavailable.py} +20 -12
- twitter_openapi_python_generated/models/{post_favorite_tweet200_response.py → community_join_action_union.py} +50 -27
- twitter_openapi_python_generated/models/create_bookmark_response.py +13 -3
- twitter_openapi_python_generated/models/create_bookmark_response_data.py +2 -2
- twitter_openapi_python_generated/models/create_retweet_response.py +13 -3
- twitter_openapi_python_generated/models/create_retweet_response_data.py +2 -2
- twitter_openapi_python_generated/models/create_tweet_response.py +13 -3
- twitter_openapi_python_generated/models/create_tweet_response_data.py +2 -2
- twitter_openapi_python_generated/models/delete_bookmark_response.py +13 -3
- twitter_openapi_python_generated/models/delete_bookmark_response_data.py +2 -2
- twitter_openapi_python_generated/models/delete_retweet_response.py +13 -3
- twitter_openapi_python_generated/models/delete_retweet_response_data.py +3 -3
- twitter_openapi_python_generated/models/delete_tweet_response.py +13 -3
- twitter_openapi_python_generated/models/{error.py → error_response.py} +5 -5
- twitter_openapi_python_generated/models/favorite_tweet.py +2 -2
- twitter_openapi_python_generated/models/{errors.py → favorite_tweet_response.py} +10 -10
- twitter_openapi_python_generated/models/follow_response.py +13 -3
- twitter_openapi_python_generated/models/follow_response_data.py +2 -2
- twitter_openapi_python_generated/models/home_timeline_response_data.py +2 -2
- twitter_openapi_python_generated/models/list_latest_tweets_timeline_response.py +13 -3
- twitter_openapi_python_generated/models/list_tweets_timeline_data.py +2 -2
- twitter_openapi_python_generated/models/{other_response.py → other_object_all.py} +4 -4
- twitter_openapi_python_generated/models/profile_response.py +13 -3
- twitter_openapi_python_generated/models/profile_response_data.py +2 -2
- twitter_openapi_python_generated/models/search_timeline_data.py +2 -2
- twitter_openapi_python_generated/models/search_timeline_response.py +13 -3
- twitter_openapi_python_generated/models/sensitive_media_warning.py +4 -4
- twitter_openapi_python_generated/models/timeline_response.py +13 -3
- twitter_openapi_python_generated/models/tweet_detail_response.py +13 -3
- twitter_openapi_python_generated/models/tweet_detail_response_data.py +2 -2
- twitter_openapi_python_generated/models/tweet_favoriters_response.py +13 -3
- twitter_openapi_python_generated/models/tweet_favoriters_response_data.py +2 -2
- twitter_openapi_python_generated/models/tweet_legacy.py +2 -2
- twitter_openapi_python_generated/models/tweet_result_by_rest_id_data.py +2 -2
- twitter_openapi_python_generated/models/tweet_result_by_rest_id_response.py +13 -3
- twitter_openapi_python_generated/models/tweet_retweeters_response.py +13 -3
- twitter_openapi_python_generated/models/tweet_retweeters_response_data.py +2 -2
- twitter_openapi_python_generated/models/type_name.py +1 -0
- twitter_openapi_python_generated/models/unfavorite_tweet.py +2 -2
- twitter_openapi_python_generated/models/{unfavorite_tweet_response_data.py → unfavorite_tweet_response.py} +17 -7
- twitter_openapi_python_generated/models/user.py +1 -1
- twitter_openapi_python_generated/models/user_highlights_tweets_data.py +2 -2
- twitter_openapi_python_generated/models/user_highlights_tweets_response.py +13 -3
- twitter_openapi_python_generated/models/user_legacy_extended_profile_birthdate.py +2 -2
- twitter_openapi_python_generated/models/user_response.py +13 -3
- twitter_openapi_python_generated/models/user_tip_jar_settings.py +3 -1
- twitter_openapi_python_generated/models/user_tweets_data.py +2 -2
- twitter_openapi_python_generated/models/user_tweets_response.py +13 -3
- twitter_openapi_python_generated/models/user_verification_info_reason.py +2 -2
- twitter_openapi_python_generated/models/users_response.py +13 -3
- twitter_openapi_python_generated/models/users_response_data.py +2 -2
- {twitter_openapi_python_generated-0.0.24.dist-info → twitter_openapi_python_generated-0.0.26.dist-info}/METADATA +6 -6
- {twitter_openapi_python_generated-0.0.24.dist-info → twitter_openapi_python_generated-0.0.26.dist-info}/RECORD +76 -98
- {twitter_openapi_python_generated-0.0.24.dist-info → twitter_openapi_python_generated-0.0.26.dist-info}/WHEEL +1 -1
- twitter_openapi_python_generated/models/errors_data.py +0 -99
- twitter_openapi_python_generated/models/get_bookmarks200_response.py +0 -138
- twitter_openapi_python_generated/models/get_favoriters200_response.py +0 -138
- twitter_openapi_python_generated/models/get_followers200_response.py +0 -138
- twitter_openapi_python_generated/models/get_home_latest_timeline200_response.py +0 -138
- twitter_openapi_python_generated/models/get_likes200_response.py +0 -138
- twitter_openapi_python_generated/models/get_list_latest_tweets_timeline200_response.py +0 -138
- twitter_openapi_python_generated/models/get_profile_spotlights_query200_response.py +0 -138
- twitter_openapi_python_generated/models/get_retweeters200_response.py +0 -138
- twitter_openapi_python_generated/models/get_search_timeline200_response.py +0 -138
- twitter_openapi_python_generated/models/get_tweet_detail200_response.py +0 -138
- twitter_openapi_python_generated/models/get_tweet_result_by_rest_id200_response.py +0 -138
- twitter_openapi_python_generated/models/get_user_by_rest_id200_response.py +0 -138
- twitter_openapi_python_generated/models/get_user_highlights_tweets200_response.py +0 -138
- twitter_openapi_python_generated/models/get_users_by_rest_ids200_response.py +0 -138
- twitter_openapi_python_generated/models/post_create_bookmark200_response.py +0 -138
- twitter_openapi_python_generated/models/post_create_retweet200_response.py +0 -138
- twitter_openapi_python_generated/models/post_create_tweet200_response.py +0 -138
- twitter_openapi_python_generated/models/post_delete_bookmark200_response.py +0 -138
- twitter_openapi_python_generated/models/post_delete_retweet200_response.py +0 -138
- twitter_openapi_python_generated/models/post_delete_tweet200_response.py +0 -138
- twitter_openapi_python_generated/models/post_unfavorite_tweet200_response.py +0 -138
- {twitter_openapi_python_generated-0.0.24.dist-info → twitter_openapi_python_generated-0.0.26.dist-info}/LICENSE +0 -0
- {twitter_openapi_python_generated-0.0.24.dist-info → twitter_openapi_python_generated-0.0.26.dist-info}/LICENSE.AGPL +0 -0
- {twitter_openapi_python_generated-0.0.24.dist-info → twitter_openapi_python_generated-0.0.26.dist-info}/top_level.txt +0 -0
|
@@ -20,17 +20,17 @@ 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.
|
|
24
|
-
from twitter_openapi_python_generated.models.
|
|
23
|
+
from twitter_openapi_python_generated.models.error_response import ErrorResponse
|
|
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
27
|
|
|
28
|
-
class
|
|
28
|
+
class FavoriteTweetResponse(BaseModel):
|
|
29
29
|
"""
|
|
30
|
-
|
|
30
|
+
FavoriteTweetResponse
|
|
31
31
|
""" # noqa: E501
|
|
32
|
-
data:
|
|
33
|
-
errors: List[
|
|
32
|
+
data: FavoriteTweet
|
|
33
|
+
errors: Optional[List[ErrorResponse]] = None
|
|
34
34
|
__properties: ClassVar[List[str]] = ["data", "errors"]
|
|
35
35
|
|
|
36
36
|
model_config = ConfigDict(
|
|
@@ -51,7 +51,7 @@ class Errors(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 FavoriteTweetResponse 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]:
|
|
@@ -86,7 +86,7 @@ class Errors(BaseModel):
|
|
|
86
86
|
|
|
87
87
|
@classmethod
|
|
88
88
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
89
|
-
"""Create an instance of
|
|
89
|
+
"""Create an instance of FavoriteTweetResponse from a dict"""
|
|
90
90
|
if obj is None:
|
|
91
91
|
return None
|
|
92
92
|
|
|
@@ -94,8 +94,8 @@ class Errors(BaseModel):
|
|
|
94
94
|
return cls.model_validate(obj)
|
|
95
95
|
|
|
96
96
|
_obj = cls.model_validate({
|
|
97
|
-
"data":
|
|
98
|
-
"errors": [
|
|
97
|
+
"data": FavoriteTweet.from_dict(obj["data"]) if obj.get("data") is not None else None,
|
|
98
|
+
"errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
|
|
99
99
|
})
|
|
100
100
|
return _obj
|
|
101
101
|
|
|
@@ -19,7 +19,8 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from twitter_openapi_python_generated.models.error_response import ErrorResponse
|
|
23
24
|
from twitter_openapi_python_generated.models.follow_response_data import FollowResponseData
|
|
24
25
|
from typing import Optional, Set
|
|
25
26
|
from typing_extensions import Self
|
|
@@ -29,7 +30,8 @@ class FollowResponse(BaseModel):
|
|
|
29
30
|
FollowResponse
|
|
30
31
|
""" # noqa: E501
|
|
31
32
|
data: FollowResponseData
|
|
32
|
-
|
|
33
|
+
errors: Optional[List[ErrorResponse]] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["data", "errors"]
|
|
33
35
|
|
|
34
36
|
model_config = ConfigDict(
|
|
35
37
|
populate_by_name=True,
|
|
@@ -73,6 +75,13 @@ class FollowResponse(BaseModel):
|
|
|
73
75
|
# override the default output from pydantic by calling `to_dict()` of data
|
|
74
76
|
if self.data:
|
|
75
77
|
_dict['data'] = self.data.to_dict()
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in errors (list)
|
|
79
|
+
_items = []
|
|
80
|
+
if self.errors:
|
|
81
|
+
for _item_errors in self.errors:
|
|
82
|
+
if _item_errors:
|
|
83
|
+
_items.append(_item_errors.to_dict())
|
|
84
|
+
_dict['errors'] = _items
|
|
76
85
|
return _dict
|
|
77
86
|
|
|
78
87
|
@classmethod
|
|
@@ -85,7 +94,8 @@ class FollowResponse(BaseModel):
|
|
|
85
94
|
return cls.model_validate(obj)
|
|
86
95
|
|
|
87
96
|
_obj = cls.model_validate({
|
|
88
|
-
"data": FollowResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
|
|
97
|
+
"data": FollowResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None,
|
|
98
|
+
"errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
|
|
89
99
|
})
|
|
90
100
|
return _obj
|
|
91
101
|
|
|
@@ -19,7 +19,7 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
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
|
|
@@ -28,7 +28,7 @@ class FollowResponseData(BaseModel):
|
|
|
28
28
|
"""
|
|
29
29
|
FollowResponseData
|
|
30
30
|
""" # noqa: E501
|
|
31
|
-
user: FollowResponseUser
|
|
31
|
+
user: Optional[FollowResponseUser] = None
|
|
32
32
|
__properties: ClassVar[List[str]] = ["user"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
@@ -19,7 +19,7 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from twitter_openapi_python_generated.models.home_timeline_home import HomeTimelineHome
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
@@ -28,7 +28,7 @@ class HomeTimelineResponseData(BaseModel):
|
|
|
28
28
|
"""
|
|
29
29
|
HomeTimelineResponseData
|
|
30
30
|
""" # noqa: E501
|
|
31
|
-
home: HomeTimelineHome
|
|
31
|
+
home: Optional[HomeTimelineHome] = None
|
|
32
32
|
__properties: ClassVar[List[str]] = ["home"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
@@ -19,7 +19,8 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from twitter_openapi_python_generated.models.error_response import ErrorResponse
|
|
23
24
|
from twitter_openapi_python_generated.models.list_tweets_timeline_data import ListTweetsTimelineData
|
|
24
25
|
from typing import Optional, Set
|
|
25
26
|
from typing_extensions import Self
|
|
@@ -29,7 +30,8 @@ class ListLatestTweetsTimelineResponse(BaseModel):
|
|
|
29
30
|
ListLatestTweetsTimelineResponse
|
|
30
31
|
""" # noqa: E501
|
|
31
32
|
data: ListTweetsTimelineData
|
|
32
|
-
|
|
33
|
+
errors: Optional[List[ErrorResponse]] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["data", "errors"]
|
|
33
35
|
|
|
34
36
|
model_config = ConfigDict(
|
|
35
37
|
populate_by_name=True,
|
|
@@ -73,6 +75,13 @@ class ListLatestTweetsTimelineResponse(BaseModel):
|
|
|
73
75
|
# override the default output from pydantic by calling `to_dict()` of data
|
|
74
76
|
if self.data:
|
|
75
77
|
_dict['data'] = self.data.to_dict()
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in errors (list)
|
|
79
|
+
_items = []
|
|
80
|
+
if self.errors:
|
|
81
|
+
for _item_errors in self.errors:
|
|
82
|
+
if _item_errors:
|
|
83
|
+
_items.append(_item_errors.to_dict())
|
|
84
|
+
_dict['errors'] = _items
|
|
76
85
|
return _dict
|
|
77
86
|
|
|
78
87
|
@classmethod
|
|
@@ -85,7 +94,8 @@ class ListLatestTweetsTimelineResponse(BaseModel):
|
|
|
85
94
|
return cls.model_validate(obj)
|
|
86
95
|
|
|
87
96
|
_obj = cls.model_validate({
|
|
88
|
-
"data": ListTweetsTimelineData.from_dict(obj["data"]) if obj.get("data") is not None else None
|
|
97
|
+
"data": ListTweetsTimelineData.from_dict(obj["data"]) if obj.get("data") is not None else None,
|
|
98
|
+
"errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
|
|
89
99
|
})
|
|
90
100
|
return _obj
|
|
91
101
|
|
|
@@ -19,7 +19,7 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from twitter_openapi_python_generated.models.list_tweets_timeline_list import ListTweetsTimelineList
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
@@ -28,7 +28,7 @@ class ListTweetsTimelineData(BaseModel):
|
|
|
28
28
|
"""
|
|
29
29
|
ListTweetsTimelineData
|
|
30
30
|
""" # noqa: E501
|
|
31
|
-
list: ListTweetsTimelineList
|
|
31
|
+
list: Optional[ListTweetsTimelineList] = None
|
|
32
32
|
__properties: ClassVar[List[str]] = ["list"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
@@ -24,9 +24,9 @@ from twitter_openapi_python_generated.models.session import Session
|
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
26
26
|
|
|
27
|
-
class
|
|
27
|
+
class OtherObjectAll(BaseModel):
|
|
28
28
|
"""
|
|
29
|
-
|
|
29
|
+
OtherObjectAll
|
|
30
30
|
""" # noqa: E501
|
|
31
31
|
session: Optional[Session] = Field(default=None, alias="Session")
|
|
32
32
|
__properties: ClassVar[List[str]] = ["Session"]
|
|
@@ -49,7 +49,7 @@ class OtherResponse(BaseModel):
|
|
|
49
49
|
|
|
50
50
|
@classmethod
|
|
51
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
-
"""Create an instance of
|
|
52
|
+
"""Create an instance of OtherObjectAll from a JSON string"""
|
|
53
53
|
return cls.from_dict(json.loads(json_str))
|
|
54
54
|
|
|
55
55
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -77,7 +77,7 @@ class OtherResponse(BaseModel):
|
|
|
77
77
|
|
|
78
78
|
@classmethod
|
|
79
79
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
-
"""Create an instance of
|
|
80
|
+
"""Create an instance of OtherObjectAll from a dict"""
|
|
81
81
|
if obj is None:
|
|
82
82
|
return None
|
|
83
83
|
|
|
@@ -19,7 +19,8 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from twitter_openapi_python_generated.models.error_response import ErrorResponse
|
|
23
24
|
from twitter_openapi_python_generated.models.profile_response_data import ProfileResponseData
|
|
24
25
|
from typing import Optional, Set
|
|
25
26
|
from typing_extensions import Self
|
|
@@ -29,7 +30,8 @@ class ProfileResponse(BaseModel):
|
|
|
29
30
|
ProfileResponse
|
|
30
31
|
""" # noqa: E501
|
|
31
32
|
data: ProfileResponseData
|
|
32
|
-
|
|
33
|
+
errors: Optional[List[ErrorResponse]] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["data", "errors"]
|
|
33
35
|
|
|
34
36
|
model_config = ConfigDict(
|
|
35
37
|
populate_by_name=True,
|
|
@@ -73,6 +75,13 @@ class ProfileResponse(BaseModel):
|
|
|
73
75
|
# override the default output from pydantic by calling `to_dict()` of data
|
|
74
76
|
if self.data:
|
|
75
77
|
_dict['data'] = self.data.to_dict()
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in errors (list)
|
|
79
|
+
_items = []
|
|
80
|
+
if self.errors:
|
|
81
|
+
for _item_errors in self.errors:
|
|
82
|
+
if _item_errors:
|
|
83
|
+
_items.append(_item_errors.to_dict())
|
|
84
|
+
_dict['errors'] = _items
|
|
76
85
|
return _dict
|
|
77
86
|
|
|
78
87
|
@classmethod
|
|
@@ -85,7 +94,8 @@ class ProfileResponse(BaseModel):
|
|
|
85
94
|
return cls.model_validate(obj)
|
|
86
95
|
|
|
87
96
|
_obj = cls.model_validate({
|
|
88
|
-
"data": ProfileResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
|
|
97
|
+
"data": ProfileResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None,
|
|
98
|
+
"errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
|
|
89
99
|
})
|
|
90
100
|
return _obj
|
|
91
101
|
|
|
@@ -19,7 +19,7 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from twitter_openapi_python_generated.models.user_result_by_screen_name import UserResultByScreenName
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
@@ -28,7 +28,7 @@ class ProfileResponseData(BaseModel):
|
|
|
28
28
|
"""
|
|
29
29
|
ProfileResponseData
|
|
30
30
|
""" # noqa: E501
|
|
31
|
-
user_result_by_screen_name: UserResultByScreenName
|
|
31
|
+
user_result_by_screen_name: Optional[UserResultByScreenName] = None
|
|
32
32
|
__properties: ClassVar[List[str]] = ["user_result_by_screen_name"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
@@ -19,7 +19,7 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from twitter_openapi_python_generated.models.search_by_raw_query import SearchByRawQuery
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
@@ -28,7 +28,7 @@ class SearchTimelineData(BaseModel):
|
|
|
28
28
|
"""
|
|
29
29
|
SearchTimelineData
|
|
30
30
|
""" # noqa: E501
|
|
31
|
-
search_by_raw_query: SearchByRawQuery
|
|
31
|
+
search_by_raw_query: Optional[SearchByRawQuery] = None
|
|
32
32
|
__properties: ClassVar[List[str]] = ["search_by_raw_query"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
@@ -19,7 +19,8 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from twitter_openapi_python_generated.models.error_response import ErrorResponse
|
|
23
24
|
from twitter_openapi_python_generated.models.search_timeline_data import SearchTimelineData
|
|
24
25
|
from typing import Optional, Set
|
|
25
26
|
from typing_extensions import Self
|
|
@@ -29,7 +30,8 @@ class SearchTimelineResponse(BaseModel):
|
|
|
29
30
|
SearchTimelineResponse
|
|
30
31
|
""" # noqa: E501
|
|
31
32
|
data: SearchTimelineData
|
|
32
|
-
|
|
33
|
+
errors: Optional[List[ErrorResponse]] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["data", "errors"]
|
|
33
35
|
|
|
34
36
|
model_config = ConfigDict(
|
|
35
37
|
populate_by_name=True,
|
|
@@ -73,6 +75,13 @@ class SearchTimelineResponse(BaseModel):
|
|
|
73
75
|
# override the default output from pydantic by calling `to_dict()` of data
|
|
74
76
|
if self.data:
|
|
75
77
|
_dict['data'] = self.data.to_dict()
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in errors (list)
|
|
79
|
+
_items = []
|
|
80
|
+
if self.errors:
|
|
81
|
+
for _item_errors in self.errors:
|
|
82
|
+
if _item_errors:
|
|
83
|
+
_items.append(_item_errors.to_dict())
|
|
84
|
+
_dict['errors'] = _items
|
|
76
85
|
return _dict
|
|
77
86
|
|
|
78
87
|
@classmethod
|
|
@@ -85,7 +94,8 @@ class SearchTimelineResponse(BaseModel):
|
|
|
85
94
|
return cls.model_validate(obj)
|
|
86
95
|
|
|
87
96
|
_obj = cls.model_validate({
|
|
88
|
-
"data": SearchTimelineData.from_dict(obj["data"]) if obj.get("data") is not None else None
|
|
97
|
+
"data": SearchTimelineData.from_dict(obj["data"]) if obj.get("data") is not None else None,
|
|
98
|
+
"errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
|
|
89
99
|
})
|
|
90
100
|
return _obj
|
|
91
101
|
|
|
@@ -19,7 +19,7 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, StrictBool
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
@@ -27,9 +27,9 @@ class SensitiveMediaWarning(BaseModel):
|
|
|
27
27
|
"""
|
|
28
28
|
SensitiveMediaWarning
|
|
29
29
|
""" # noqa: E501
|
|
30
|
-
adult_content: StrictBool
|
|
31
|
-
graphic_violence: StrictBool
|
|
32
|
-
other: StrictBool
|
|
30
|
+
adult_content: Optional[StrictBool] = None
|
|
31
|
+
graphic_violence: Optional[StrictBool] = None
|
|
32
|
+
other: Optional[StrictBool] = None
|
|
33
33
|
__properties: ClassVar[List[str]] = ["adult_content", "graphic_violence", "other"]
|
|
34
34
|
|
|
35
35
|
model_config = ConfigDict(
|
|
@@ -19,7 +19,8 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from twitter_openapi_python_generated.models.error_response import ErrorResponse
|
|
23
24
|
from twitter_openapi_python_generated.models.home_timeline_response_data import HomeTimelineResponseData
|
|
24
25
|
from typing import Optional, Set
|
|
25
26
|
from typing_extensions import Self
|
|
@@ -29,7 +30,8 @@ class TimelineResponse(BaseModel):
|
|
|
29
30
|
TimelineResponse
|
|
30
31
|
""" # noqa: E501
|
|
31
32
|
data: HomeTimelineResponseData
|
|
32
|
-
|
|
33
|
+
errors: Optional[List[ErrorResponse]] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["data", "errors"]
|
|
33
35
|
|
|
34
36
|
model_config = ConfigDict(
|
|
35
37
|
populate_by_name=True,
|
|
@@ -73,6 +75,13 @@ class TimelineResponse(BaseModel):
|
|
|
73
75
|
# override the default output from pydantic by calling `to_dict()` of data
|
|
74
76
|
if self.data:
|
|
75
77
|
_dict['data'] = self.data.to_dict()
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in errors (list)
|
|
79
|
+
_items = []
|
|
80
|
+
if self.errors:
|
|
81
|
+
for _item_errors in self.errors:
|
|
82
|
+
if _item_errors:
|
|
83
|
+
_items.append(_item_errors.to_dict())
|
|
84
|
+
_dict['errors'] = _items
|
|
76
85
|
return _dict
|
|
77
86
|
|
|
78
87
|
@classmethod
|
|
@@ -85,7 +94,8 @@ class TimelineResponse(BaseModel):
|
|
|
85
94
|
return cls.model_validate(obj)
|
|
86
95
|
|
|
87
96
|
_obj = cls.model_validate({
|
|
88
|
-
"data": HomeTimelineResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
|
|
97
|
+
"data": HomeTimelineResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None,
|
|
98
|
+
"errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
|
|
89
99
|
})
|
|
90
100
|
return _obj
|
|
91
101
|
|
|
@@ -19,7 +19,8 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from twitter_openapi_python_generated.models.error_response import ErrorResponse
|
|
23
24
|
from twitter_openapi_python_generated.models.tweet_detail_response_data import TweetDetailResponseData
|
|
24
25
|
from typing import Optional, Set
|
|
25
26
|
from typing_extensions import Self
|
|
@@ -29,7 +30,8 @@ class TweetDetailResponse(BaseModel):
|
|
|
29
30
|
TweetDetailResponse
|
|
30
31
|
""" # noqa: E501
|
|
31
32
|
data: TweetDetailResponseData
|
|
32
|
-
|
|
33
|
+
errors: Optional[List[ErrorResponse]] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["data", "errors"]
|
|
33
35
|
|
|
34
36
|
model_config = ConfigDict(
|
|
35
37
|
populate_by_name=True,
|
|
@@ -73,6 +75,13 @@ class TweetDetailResponse(BaseModel):
|
|
|
73
75
|
# override the default output from pydantic by calling `to_dict()` of data
|
|
74
76
|
if self.data:
|
|
75
77
|
_dict['data'] = self.data.to_dict()
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in errors (list)
|
|
79
|
+
_items = []
|
|
80
|
+
if self.errors:
|
|
81
|
+
for _item_errors in self.errors:
|
|
82
|
+
if _item_errors:
|
|
83
|
+
_items.append(_item_errors.to_dict())
|
|
84
|
+
_dict['errors'] = _items
|
|
76
85
|
return _dict
|
|
77
86
|
|
|
78
87
|
@classmethod
|
|
@@ -85,7 +94,8 @@ class TweetDetailResponse(BaseModel):
|
|
|
85
94
|
return cls.model_validate(obj)
|
|
86
95
|
|
|
87
96
|
_obj = cls.model_validate({
|
|
88
|
-
"data": TweetDetailResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
|
|
97
|
+
"data": TweetDetailResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None,
|
|
98
|
+
"errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
|
|
89
99
|
})
|
|
90
100
|
return _obj
|
|
91
101
|
|
|
@@ -19,7 +19,7 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
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
|
|
@@ -28,7 +28,7 @@ class TweetDetailResponseData(BaseModel):
|
|
|
28
28
|
"""
|
|
29
29
|
TweetDetailResponseData
|
|
30
30
|
""" # noqa: E501
|
|
31
|
-
threaded_conversation_with_injections_v2: Timeline
|
|
31
|
+
threaded_conversation_with_injections_v2: Optional[Timeline] = None
|
|
32
32
|
__properties: ClassVar[List[str]] = ["threaded_conversation_with_injections_v2"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
@@ -19,7 +19,8 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from twitter_openapi_python_generated.models.error_response import ErrorResponse
|
|
23
24
|
from twitter_openapi_python_generated.models.tweet_favoriters_response_data import TweetFavoritersResponseData
|
|
24
25
|
from typing import Optional, Set
|
|
25
26
|
from typing_extensions import Self
|
|
@@ -29,7 +30,8 @@ class TweetFavoritersResponse(BaseModel):
|
|
|
29
30
|
TweetFavoritersResponse
|
|
30
31
|
""" # noqa: E501
|
|
31
32
|
data: TweetFavoritersResponseData
|
|
32
|
-
|
|
33
|
+
errors: Optional[List[ErrorResponse]] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["data", "errors"]
|
|
33
35
|
|
|
34
36
|
model_config = ConfigDict(
|
|
35
37
|
populate_by_name=True,
|
|
@@ -73,6 +75,13 @@ class TweetFavoritersResponse(BaseModel):
|
|
|
73
75
|
# override the default output from pydantic by calling `to_dict()` of data
|
|
74
76
|
if self.data:
|
|
75
77
|
_dict['data'] = self.data.to_dict()
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in errors (list)
|
|
79
|
+
_items = []
|
|
80
|
+
if self.errors:
|
|
81
|
+
for _item_errors in self.errors:
|
|
82
|
+
if _item_errors:
|
|
83
|
+
_items.append(_item_errors.to_dict())
|
|
84
|
+
_dict['errors'] = _items
|
|
76
85
|
return _dict
|
|
77
86
|
|
|
78
87
|
@classmethod
|
|
@@ -85,7 +94,8 @@ class TweetFavoritersResponse(BaseModel):
|
|
|
85
94
|
return cls.model_validate(obj)
|
|
86
95
|
|
|
87
96
|
_obj = cls.model_validate({
|
|
88
|
-
"data": TweetFavoritersResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
|
|
97
|
+
"data": TweetFavoritersResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None,
|
|
98
|
+
"errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
|
|
89
99
|
})
|
|
90
100
|
return _obj
|
|
91
101
|
|
|
@@ -19,7 +19,7 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from twitter_openapi_python_generated.models.timeline_v2 import TimelineV2
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
@@ -28,7 +28,7 @@ class TweetFavoritersResponseData(BaseModel):
|
|
|
28
28
|
"""
|
|
29
29
|
TweetFavoritersResponseData
|
|
30
30
|
""" # noqa: E501
|
|
31
|
-
favoriters_timeline: TimelineV2
|
|
31
|
+
favoriters_timeline: Optional[TimelineV2] = None
|
|
32
32
|
__properties: ClassVar[List[str]] = ["favoriters_timeline"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
@@ -113,8 +113,8 @@ class TweetLegacy(BaseModel):
|
|
|
113
113
|
if value is None:
|
|
114
114
|
return value
|
|
115
115
|
|
|
116
|
-
if value not in set(['limited_replies', 'non_compliant', 'dynamic_product_ad', 'stale_tweet', 'community_tweet_non_member_public_community', 'community_tweet_non_member_closed_community']):
|
|
117
|
-
raise ValueError("must be one of enum values ('limited_replies', 'non_compliant', 'dynamic_product_ad', 'stale_tweet', 'community_tweet_non_member_public_community', 'community_tweet_non_member_closed_community')")
|
|
116
|
+
if value not in set(['limited_replies', 'non_compliant', 'dynamic_product_ad', 'stale_tweet', 'community_tweet_non_member_public_community', 'community_tweet_non_member_closed_community', 'blocked_viewer']):
|
|
117
|
+
raise ValueError("must be one of enum values ('limited_replies', 'non_compliant', 'dynamic_product_ad', 'stale_tweet', 'community_tweet_non_member_public_community', 'community_tweet_non_member_closed_community', 'blocked_viewer')")
|
|
118
118
|
return value
|
|
119
119
|
|
|
120
120
|
@field_validator('quoted_status_id_str')
|
|
@@ -19,7 +19,7 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from twitter_openapi_python_generated.models.item_result import ItemResult
|
|
24
24
|
from typing import Optional, Set
|
|
25
25
|
from typing_extensions import Self
|
|
@@ -28,7 +28,7 @@ class TweetResultByRestIdData(BaseModel):
|
|
|
28
28
|
"""
|
|
29
29
|
TweetResultByRestIdData
|
|
30
30
|
""" # noqa: E501
|
|
31
|
-
tweet_result: ItemResult = Field(alias="tweetResult")
|
|
31
|
+
tweet_result: Optional[ItemResult] = Field(default=None, alias="tweetResult")
|
|
32
32
|
__properties: ClassVar[List[str]] = ["tweetResult"]
|
|
33
33
|
|
|
34
34
|
model_config = ConfigDict(
|
|
@@ -19,7 +19,8 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from twitter_openapi_python_generated.models.error_response import ErrorResponse
|
|
23
24
|
from twitter_openapi_python_generated.models.tweet_result_by_rest_id_data import TweetResultByRestIdData
|
|
24
25
|
from typing import Optional, Set
|
|
25
26
|
from typing_extensions import Self
|
|
@@ -29,7 +30,8 @@ class TweetResultByRestIdResponse(BaseModel):
|
|
|
29
30
|
TweetResultByRestIdResponse
|
|
30
31
|
""" # noqa: E501
|
|
31
32
|
data: TweetResultByRestIdData
|
|
32
|
-
|
|
33
|
+
errors: Optional[List[ErrorResponse]] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["data", "errors"]
|
|
33
35
|
|
|
34
36
|
model_config = ConfigDict(
|
|
35
37
|
populate_by_name=True,
|
|
@@ -73,6 +75,13 @@ class TweetResultByRestIdResponse(BaseModel):
|
|
|
73
75
|
# override the default output from pydantic by calling `to_dict()` of data
|
|
74
76
|
if self.data:
|
|
75
77
|
_dict['data'] = self.data.to_dict()
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in errors (list)
|
|
79
|
+
_items = []
|
|
80
|
+
if self.errors:
|
|
81
|
+
for _item_errors in self.errors:
|
|
82
|
+
if _item_errors:
|
|
83
|
+
_items.append(_item_errors.to_dict())
|
|
84
|
+
_dict['errors'] = _items
|
|
76
85
|
return _dict
|
|
77
86
|
|
|
78
87
|
@classmethod
|
|
@@ -85,7 +94,8 @@ class TweetResultByRestIdResponse(BaseModel):
|
|
|
85
94
|
return cls.model_validate(obj)
|
|
86
95
|
|
|
87
96
|
_obj = cls.model_validate({
|
|
88
|
-
"data": TweetResultByRestIdData.from_dict(obj["data"]) if obj.get("data") is not None else None
|
|
97
|
+
"data": TweetResultByRestIdData.from_dict(obj["data"]) if obj.get("data") is not None else None,
|
|
98
|
+
"errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
|
|
89
99
|
})
|
|
90
100
|
return _obj
|
|
91
101
|
|
|
@@ -19,7 +19,8 @@ import re # noqa: F401
|
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from twitter_openapi_python_generated.models.error_response import ErrorResponse
|
|
23
24
|
from twitter_openapi_python_generated.models.tweet_retweeters_response_data import TweetRetweetersResponseData
|
|
24
25
|
from typing import Optional, Set
|
|
25
26
|
from typing_extensions import Self
|
|
@@ -29,7 +30,8 @@ class TweetRetweetersResponse(BaseModel):
|
|
|
29
30
|
TweetRetweetersResponse
|
|
30
31
|
""" # noqa: E501
|
|
31
32
|
data: TweetRetweetersResponseData
|
|
32
|
-
|
|
33
|
+
errors: Optional[List[ErrorResponse]] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["data", "errors"]
|
|
33
35
|
|
|
34
36
|
model_config = ConfigDict(
|
|
35
37
|
populate_by_name=True,
|
|
@@ -73,6 +75,13 @@ class TweetRetweetersResponse(BaseModel):
|
|
|
73
75
|
# override the default output from pydantic by calling `to_dict()` of data
|
|
74
76
|
if self.data:
|
|
75
77
|
_dict['data'] = self.data.to_dict()
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of each item in errors (list)
|
|
79
|
+
_items = []
|
|
80
|
+
if self.errors:
|
|
81
|
+
for _item_errors in self.errors:
|
|
82
|
+
if _item_errors:
|
|
83
|
+
_items.append(_item_errors.to_dict())
|
|
84
|
+
_dict['errors'] = _items
|
|
76
85
|
return _dict
|
|
77
86
|
|
|
78
87
|
@classmethod
|
|
@@ -85,7 +94,8 @@ class TweetRetweetersResponse(BaseModel):
|
|
|
85
94
|
return cls.model_validate(obj)
|
|
86
95
|
|
|
87
96
|
_obj = cls.model_validate({
|
|
88
|
-
"data": TweetRetweetersResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None
|
|
97
|
+
"data": TweetRetweetersResponseData.from_dict(obj["data"]) if obj.get("data") is not None else None,
|
|
98
|
+
"errors": [ErrorResponse.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
|
|
89
99
|
})
|
|
90
100
|
return _obj
|
|
91
101
|
|