twitter-openapi-python-generated 0.0.18__py3-none-any.whl → 0.0.20__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 +2 -2
- twitter_openapi_python_generated/api/other_api.py +6 -6
- twitter_openapi_python_generated/api_client.py +1 -1
- twitter_openapi_python_generated/configuration.py +1 -1
- twitter_openapi_python_generated/models/__init__.py +1 -1
- twitter_openapi_python_generated/models/errors.py +8 -2
- twitter_openapi_python_generated/models/errors_data.py +99 -0
- twitter_openapi_python_generated/models/post_create_tweet_request_variables.py +2 -2
- {twitter_openapi_python_generated-0.0.18.dist-info → twitter_openapi_python_generated-0.0.20.dist-info}/METADATA +1 -1
- {twitter_openapi_python_generated-0.0.18.dist-info → twitter_openapi_python_generated-0.0.20.dist-info}/RECORD +14 -14
- twitter_openapi_python_generated/models/other200_response.py +0 -124
- {twitter_openapi_python_generated-0.0.18.dist-info → twitter_openapi_python_generated-0.0.20.dist-info}/LICENSE +0 -0
- {twitter_openapi_python_generated-0.0.18.dist-info → twitter_openapi_python_generated-0.0.20.dist-info}/LICENSE.AGPL +0 -0
- {twitter_openapi_python_generated-0.0.18.dist-info → twitter_openapi_python_generated-0.0.20.dist-info}/WHEEL +0 -0
- {twitter_openapi_python_generated-0.0.18.dist-info → twitter_openapi_python_generated-0.0.20.dist-info}/top_level.txt +0 -0
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
""" # noqa: E501
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
__version__ = "0.0.
|
|
18
|
+
__version__ = "0.0.20"
|
|
19
19
|
|
|
20
20
|
# import apis into sdk package
|
|
21
21
|
from twitter_openapi_python_generated.api.default_api import DefaultApi
|
|
@@ -112,6 +112,7 @@ from twitter_openapi_python_generated.models.entities import Entities
|
|
|
112
112
|
from twitter_openapi_python_generated.models.error import Error
|
|
113
113
|
from twitter_openapi_python_generated.models.error_extensions import ErrorExtensions
|
|
114
114
|
from twitter_openapi_python_generated.models.errors import Errors
|
|
115
|
+
from twitter_openapi_python_generated.models.errors_data import ErrorsData
|
|
115
116
|
from twitter_openapi_python_generated.models.ext_media_availability import ExtMediaAvailability
|
|
116
117
|
from twitter_openapi_python_generated.models.extended_entities import ExtendedEntities
|
|
117
118
|
from twitter_openapi_python_generated.models.favorite_tweet import FavoriteTweet
|
|
@@ -171,7 +172,6 @@ from twitter_openapi_python_generated.models.note_tweet_result_media_inline_medi
|
|
|
171
172
|
from twitter_openapi_python_generated.models.note_tweet_result_rich_text import NoteTweetResultRichText
|
|
172
173
|
from twitter_openapi_python_generated.models.note_tweet_result_rich_text_tag import NoteTweetResultRichTextTag
|
|
173
174
|
from twitter_openapi_python_generated.models.one_factor_login_eligibility import OneFactorLoginEligibility
|
|
174
|
-
from twitter_openapi_python_generated.models.other200_response import Other200Response
|
|
175
175
|
from twitter_openapi_python_generated.models.other_response import OtherResponse
|
|
176
176
|
from twitter_openapi_python_generated.models.post_create_bookmark200_response import PostCreateBookmark200Response
|
|
177
177
|
from twitter_openapi_python_generated.models.post_create_bookmark_request import PostCreateBookmarkRequest
|
|
@@ -17,7 +17,7 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
|
17
17
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
18
18
|
from typing_extensions import Annotated
|
|
19
19
|
|
|
20
|
-
from twitter_openapi_python_generated.models.
|
|
20
|
+
from twitter_openapi_python_generated.models.other_response import OtherResponse
|
|
21
21
|
|
|
22
22
|
from twitter_openapi_python_generated.api_client import ApiClient, RequestSerialized
|
|
23
23
|
from twitter_openapi_python_generated.api_response import ApiResponse
|
|
@@ -52,7 +52,7 @@ class OtherApi:
|
|
|
52
52
|
_content_type: Optional[StrictStr] = None,
|
|
53
53
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
54
54
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
55
|
-
) ->
|
|
55
|
+
) -> OtherResponse:
|
|
56
56
|
"""other
|
|
57
57
|
|
|
58
58
|
This is not an actual endpoint
|
|
@@ -87,7 +87,7 @@ class OtherApi:
|
|
|
87
87
|
)
|
|
88
88
|
|
|
89
89
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
90
|
-
'200': "
|
|
90
|
+
'200': "OtherResponse",
|
|
91
91
|
}
|
|
92
92
|
response_data = self.api_client.call_api(
|
|
93
93
|
*_param,
|
|
@@ -115,7 +115,7 @@ class OtherApi:
|
|
|
115
115
|
_content_type: Optional[StrictStr] = None,
|
|
116
116
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
117
117
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
118
|
-
) -> ApiResponse[
|
|
118
|
+
) -> ApiResponse[OtherResponse]:
|
|
119
119
|
"""other
|
|
120
120
|
|
|
121
121
|
This is not an actual endpoint
|
|
@@ -150,7 +150,7 @@ class OtherApi:
|
|
|
150
150
|
)
|
|
151
151
|
|
|
152
152
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
153
|
-
'200': "
|
|
153
|
+
'200': "OtherResponse",
|
|
154
154
|
}
|
|
155
155
|
response_data = self.api_client.call_api(
|
|
156
156
|
*_param,
|
|
@@ -213,7 +213,7 @@ class OtherApi:
|
|
|
213
213
|
)
|
|
214
214
|
|
|
215
215
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
216
|
-
'200': "
|
|
216
|
+
'200': "OtherResponse",
|
|
217
217
|
}
|
|
218
218
|
response_data = self.api_client.call_api(
|
|
219
219
|
*_param,
|
|
@@ -91,7 +91,7 @@ class ApiClient:
|
|
|
91
91
|
self.default_headers[header_name] = header_value
|
|
92
92
|
self.cookie = cookie
|
|
93
93
|
# Set default User-Agent.
|
|
94
|
-
self.user_agent = 'OpenAPI-Generator/0.0.
|
|
94
|
+
self.user_agent = 'OpenAPI-Generator/0.0.20/python'
|
|
95
95
|
self.client_side_validation = configuration.client_side_validation
|
|
96
96
|
|
|
97
97
|
def __enter__(self):
|
|
@@ -583,7 +583,7 @@ conf = twitter_openapi_python_generated.Configuration(
|
|
|
583
583
|
"OS: {env}\n"\
|
|
584
584
|
"Python Version: {pyversion}\n"\
|
|
585
585
|
"Version of the API: 0.0.1\n"\
|
|
586
|
-
"SDK Package Version: 0.0.
|
|
586
|
+
"SDK Package Version: 0.0.20".\
|
|
587
587
|
format(env=sys.platform, pyversion=sys.version)
|
|
588
588
|
|
|
589
589
|
def get_host_settings(self):
|
|
@@ -86,6 +86,7 @@ from twitter_openapi_python_generated.models.entities import Entities
|
|
|
86
86
|
from twitter_openapi_python_generated.models.error import Error
|
|
87
87
|
from twitter_openapi_python_generated.models.error_extensions import ErrorExtensions
|
|
88
88
|
from twitter_openapi_python_generated.models.errors import Errors
|
|
89
|
+
from twitter_openapi_python_generated.models.errors_data import ErrorsData
|
|
89
90
|
from twitter_openapi_python_generated.models.ext_media_availability import ExtMediaAvailability
|
|
90
91
|
from twitter_openapi_python_generated.models.extended_entities import ExtendedEntities
|
|
91
92
|
from twitter_openapi_python_generated.models.favorite_tweet import FavoriteTweet
|
|
@@ -145,7 +146,6 @@ from twitter_openapi_python_generated.models.note_tweet_result_media_inline_medi
|
|
|
145
146
|
from twitter_openapi_python_generated.models.note_tweet_result_rich_text import NoteTweetResultRichText
|
|
146
147
|
from twitter_openapi_python_generated.models.note_tweet_result_rich_text_tag import NoteTweetResultRichTextTag
|
|
147
148
|
from twitter_openapi_python_generated.models.one_factor_login_eligibility import OneFactorLoginEligibility
|
|
148
|
-
from twitter_openapi_python_generated.models.other200_response import Other200Response
|
|
149
149
|
from twitter_openapi_python_generated.models.other_response import OtherResponse
|
|
150
150
|
from twitter_openapi_python_generated.models.post_create_bookmark200_response import PostCreateBookmark200Response
|
|
151
151
|
from twitter_openapi_python_generated.models.post_create_bookmark_request import PostCreateBookmarkRequest
|
|
@@ -19,8 +19,9 @@ 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.error import Error
|
|
24
|
+
from twitter_openapi_python_generated.models.errors_data import ErrorsData
|
|
24
25
|
from typing import Optional, Set
|
|
25
26
|
from typing_extensions import Self
|
|
26
27
|
|
|
@@ -28,8 +29,9 @@ class Errors(BaseModel):
|
|
|
28
29
|
"""
|
|
29
30
|
Errors
|
|
30
31
|
""" # noqa: E501
|
|
32
|
+
data: Optional[ErrorsData] = None
|
|
31
33
|
errors: List[Error]
|
|
32
|
-
__properties: ClassVar[List[str]] = ["errors"]
|
|
34
|
+
__properties: ClassVar[List[str]] = ["data", "errors"]
|
|
33
35
|
|
|
34
36
|
model_config = ConfigDict(
|
|
35
37
|
populate_by_name=True,
|
|
@@ -70,6 +72,9 @@ class Errors(BaseModel):
|
|
|
70
72
|
exclude=excluded_fields,
|
|
71
73
|
exclude_none=True,
|
|
72
74
|
)
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of data
|
|
76
|
+
if self.data:
|
|
77
|
+
_dict['data'] = self.data.to_dict()
|
|
73
78
|
# override the default output from pydantic by calling `to_dict()` of each item in errors (list)
|
|
74
79
|
_items = []
|
|
75
80
|
if self.errors:
|
|
@@ -89,6 +94,7 @@ class Errors(BaseModel):
|
|
|
89
94
|
return cls.model_validate(obj)
|
|
90
95
|
|
|
91
96
|
_obj = cls.model_validate({
|
|
97
|
+
"data": ErrorsData.from_dict(obj["data"]) if obj.get("data") is not None else None,
|
|
92
98
|
"errors": [Error.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
|
|
93
99
|
})
|
|
94
100
|
return _obj
|
|
@@ -0,0 +1,99 @@
|
|
|
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, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class ErrorsData(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
ErrorsData
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
user: Optional[Annotated[str, Field(strict=True)]] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["user"]
|
|
33
|
+
|
|
34
|
+
@field_validator('user')
|
|
35
|
+
def user_validate_regular_expression(cls, value):
|
|
36
|
+
"""Validates the regular expression"""
|
|
37
|
+
if value is None:
|
|
38
|
+
return value
|
|
39
|
+
|
|
40
|
+
if not re.match(r"dummy", value):
|
|
41
|
+
raise ValueError(r"must validate the regular expression /dummy/")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
model_config = ConfigDict(
|
|
45
|
+
populate_by_name=True,
|
|
46
|
+
validate_assignment=True,
|
|
47
|
+
protected_namespaces=(),
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def to_str(self) -> str:
|
|
52
|
+
"""Returns the string representation of the model using alias"""
|
|
53
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
54
|
+
|
|
55
|
+
def to_json(self) -> str:
|
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
|
57
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
58
|
+
return json.dumps(self.to_dict())
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
62
|
+
"""Create an instance of ErrorsData from a JSON string"""
|
|
63
|
+
return cls.from_dict(json.loads(json_str))
|
|
64
|
+
|
|
65
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
66
|
+
"""Return the dictionary representation of the model using alias.
|
|
67
|
+
|
|
68
|
+
This has the following differences from calling pydantic's
|
|
69
|
+
`self.model_dump(by_alias=True)`:
|
|
70
|
+
|
|
71
|
+
* `None` is only added to the output dict for nullable fields that
|
|
72
|
+
were set at model initialization. Other fields with value `None`
|
|
73
|
+
are ignored.
|
|
74
|
+
"""
|
|
75
|
+
excluded_fields: Set[str] = set([
|
|
76
|
+
])
|
|
77
|
+
|
|
78
|
+
_dict = self.model_dump(
|
|
79
|
+
by_alias=True,
|
|
80
|
+
exclude=excluded_fields,
|
|
81
|
+
exclude_none=True,
|
|
82
|
+
)
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
87
|
+
"""Create an instance of ErrorsData from a dict"""
|
|
88
|
+
if obj is None:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
if not isinstance(obj, dict):
|
|
92
|
+
return cls.model_validate(obj)
|
|
93
|
+
|
|
94
|
+
_obj = cls.model_validate({
|
|
95
|
+
"user": obj.get("user")
|
|
96
|
+
})
|
|
97
|
+
return _obj
|
|
98
|
+
|
|
99
|
+
|
|
@@ -30,7 +30,7 @@ class PostCreateTweetRequestVariables(BaseModel):
|
|
|
30
30
|
PostCreateTweetRequestVariables
|
|
31
31
|
""" # noqa: E501
|
|
32
32
|
dark_request: StrictBool
|
|
33
|
-
disallowed_reply_options:
|
|
33
|
+
disallowed_reply_options: Optional[Dict[str, Any]] = None
|
|
34
34
|
media: PostCreateTweetRequestVariablesMedia
|
|
35
35
|
reply: Optional[PostCreateTweetRequestVariablesReply] = None
|
|
36
36
|
semantic_annotation_ids: List[Dict[str, Any]]
|
|
@@ -95,7 +95,7 @@ class PostCreateTweetRequestVariables(BaseModel):
|
|
|
95
95
|
|
|
96
96
|
_obj = cls.model_validate({
|
|
97
97
|
"dark_request": obj.get("dark_request") if obj.get("dark_request") is not None else False,
|
|
98
|
-
"disallowed_reply_options": obj.get("disallowed_reply_options")
|
|
98
|
+
"disallowed_reply_options": obj.get("disallowed_reply_options"),
|
|
99
99
|
"media": PostCreateTweetRequestVariablesMedia.from_dict(obj["media"]) if obj.get("media") is not None else None,
|
|
100
100
|
"reply": PostCreateTweetRequestVariablesReply.from_dict(obj["reply"]) if obj.get("reply") is not None else None,
|
|
101
101
|
"semantic_annotation_ids": obj.get("semantic_annotation_ids"),
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
twitter_openapi_python_generated/__init__.py,sha256=
|
|
2
|
-
twitter_openapi_python_generated/api_client.py,sha256=
|
|
1
|
+
twitter_openapi_python_generated/__init__.py,sha256=MV1XRHFELi1JW4aF8Kb-sZgy0Vmb2q8inHWFk6vM0dw,29184
|
|
2
|
+
twitter_openapi_python_generated/api_client.py,sha256=P2K0NsFOaoCGvitgfE7pXRoAlz9bBmS500YQDKsOeMk,27153
|
|
3
3
|
twitter_openapi_python_generated/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
4
|
-
twitter_openapi_python_generated/configuration.py,sha256=
|
|
4
|
+
twitter_openapi_python_generated/configuration.py,sha256=1ThGq3fdQsUjS05FadAvWjHiTc0d3CdwLVSu7_v9Ilo,21885
|
|
5
5
|
twitter_openapi_python_generated/exceptions.py,sha256=OsisMZb6wF9a6soxi_1fAHu8I7tykw9fx7fVMIFrl2M,5943
|
|
6
6
|
twitter_openapi_python_generated/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
twitter_openapi_python_generated/rest.py,sha256=Ktfv-wkaDYypmnjVg5SgH9eUzm9mWlCLs3RYbmcaL3M,9397
|
|
8
8
|
twitter_openapi_python_generated/api/__init__.py,sha256=zAml0EP4OMYX4VTZR71tgo7_oX_o2hiISFm9bbEnmms,746
|
|
9
9
|
twitter_openapi_python_generated/api/default_api.py,sha256=I0qUYlbIALbqAlZJcCkBbuX1gDO5EYkTKyz2Riks62E,25024
|
|
10
|
-
twitter_openapi_python_generated/api/other_api.py,sha256
|
|
10
|
+
twitter_openapi_python_generated/api/other_api.py,sha256=bvSlX40cSjzv1kpNHOHt3VlU3ZEcSLwccqzhVLsBrXE,10723
|
|
11
11
|
twitter_openapi_python_generated/api/post_api.py,sha256=rr_PwVlRz6ZGV8fB-iXcqynW7PHn_rngR7BCGDflobM,97960
|
|
12
12
|
twitter_openapi_python_generated/api/tweet_api.py,sha256=BX70TpYanUEU5BHTuRlejMOPZdRLpqibem_UCxuMEKQ,128129
|
|
13
13
|
twitter_openapi_python_generated/api/user_api.py,sha256=SZYIxnPqa-7qeUE9lZ_T5hcVN3p7TIRdqyp_gqJvtKg,24636
|
|
@@ -16,7 +16,7 @@ twitter_openapi_python_generated/api/users_api.py,sha256=G2jGZUKCjLK9wbpewwZM_Iw
|
|
|
16
16
|
twitter_openapi_python_generated/api/v11_get_api.py,sha256=lH-Y3yj6TMgYjlyXtrULaX87Nug_b1ySLYa8uKH7LII,36063
|
|
17
17
|
twitter_openapi_python_generated/api/v11_post_api.py,sha256=O7y326Pw1w4dkxQQH-9ATFt0ZK1_JQ0gQ6do7ubcYTo,41131
|
|
18
18
|
twitter_openapi_python_generated/api/v20_get_api.py,sha256=sJ8vjeyxsqKqjWyLHtAWH5r9iOoWa_PlpZ33WoeGFSE,37073
|
|
19
|
-
twitter_openapi_python_generated/models/__init__.py,sha256=
|
|
19
|
+
twitter_openapi_python_generated/models/__init__.py,sha256=bx-Tm0fTQTRbjxeynHOWu8aDw2PkCZQ1halRXPDdMSw,27779
|
|
20
20
|
twitter_openapi_python_generated/models/additional_media_info.py,sha256=F4YvWBr_lzTf8-oPx61hHyohAOmR5dzR_qld-sKTyJM,3828
|
|
21
21
|
twitter_openapi_python_generated/models/additional_media_info_call_to_actions.py,sha256=CzURdzKmFNQ-QCFamn3CT1KXymaWLoNzQqXH91XIobM,3368
|
|
22
22
|
twitter_openapi_python_generated/models/additional_media_info_call_to_actions_url.py,sha256=7PrKZ33xUc-NOdxSZYeEKuFLEYCuYxJnaIpTaOmj3v4,2523
|
|
@@ -87,7 +87,8 @@ twitter_openapi_python_generated/models/display_type.py,sha256=l27fwbf5XWYO8gRqZ
|
|
|
87
87
|
twitter_openapi_python_generated/models/entities.py,sha256=fFzAwUl8Co1AmkUXkLQ7znCxN2fh8GYGxPGjncCMiZ4,4313
|
|
88
88
|
twitter_openapi_python_generated/models/error.py,sha256=0bfqktkvTZ-q02IsxRTMD3U1o-meXIKAjLG1dfnZGGc,4269
|
|
89
89
|
twitter_openapi_python_generated/models/error_extensions.py,sha256=zn4sWvA_Rus6hGGK6zhU9Wkc_2ieSkerc_6nV5l51zU,3148
|
|
90
|
-
twitter_openapi_python_generated/models/errors.py,sha256=
|
|
90
|
+
twitter_openapi_python_generated/models/errors.py,sha256=ica9ASGCHZCjx7T4Vq7lgv0nLqME9XMkceIT9I4aXXQ,3253
|
|
91
|
+
twitter_openapi_python_generated/models/errors_data.py,sha256=0oqghj5ueY5V5nKEtOOSQLvMMpuSMcWrFl2smlITCUA,2856
|
|
91
92
|
twitter_openapi_python_generated/models/ext_media_availability.py,sha256=xUEYoUq8TqEcjoretH5qVvwmrsGEw9toXQfE9y_IjxA,2936
|
|
92
93
|
twitter_openapi_python_generated/models/extended_entities.py,sha256=WHVw6eiJm8Ct-k2whBXHWgWIFXqjCBe2GmWNUm3ixK0,2934
|
|
93
94
|
twitter_openapi_python_generated/models/favorite_tweet.py,sha256=A0oyQdR5--IAAZy5quigdk0L-zoYeYcu-xMGQRo7jgw,2479
|
|
@@ -147,7 +148,6 @@ twitter_openapi_python_generated/models/note_tweet_result_media_inline_media.py,
|
|
|
147
148
|
twitter_openapi_python_generated/models/note_tweet_result_rich_text.py,sha256=U_4kF_15qE8-kgZ4o6kt5Rq2S5DaIPbBF2kXMz0wCK0,3114
|
|
148
149
|
twitter_openapi_python_generated/models/note_tweet_result_rich_text_tag.py,sha256=wq4cr4VFJ8SjlKn8aXPkdPwIvGBOcY8CMnGs0ecZQdg,3037
|
|
149
150
|
twitter_openapi_python_generated/models/one_factor_login_eligibility.py,sha256=VQP_SG58nylFXqkQRtSQ_Umi3bSn9UdlhoERWtxpnrE,2552
|
|
150
|
-
twitter_openapi_python_generated/models/other200_response.py,sha256=ctTxvHtM77tKJCd2KktHE9BgIz408mfQUT8QwmPPjdA,4542
|
|
151
151
|
twitter_openapi_python_generated/models/other_response.py,sha256=-FoKmgn9PLFkXMh7GOfxD-3vfPaUlB-adOja02GOZ5g,2796
|
|
152
152
|
twitter_openapi_python_generated/models/post_create_bookmark200_response.py,sha256=ULqGwAyrpqc_J7bjTayL4wUDuA05XOvRN56DsnIr6Vk,5442
|
|
153
153
|
twitter_openapi_python_generated/models/post_create_bookmark_request.py,sha256=_81a0alkzMcTNa83VOXYwhavmrSgiwSy4iNQgCRCQLE,3093
|
|
@@ -158,7 +158,7 @@ twitter_openapi_python_generated/models/post_create_retweet_request_variables.py
|
|
|
158
158
|
twitter_openapi_python_generated/models/post_create_tweet200_response.py,sha256=FctYnkPFuzJZn8KHPcXYUTATg3MHIjkgZ9OzSFzYaTI,5367
|
|
159
159
|
twitter_openapi_python_generated/models/post_create_tweet_request.py,sha256=GsMn1yqosCXNm5L4dU-cIOrdZlWydKhyUQ-wc8BHhEE,3541
|
|
160
160
|
twitter_openapi_python_generated/models/post_create_tweet_request_features.py,sha256=TaoQhdIXKX-m35nQT3ULTFTFsfH6ggTDOoTYE0B0lcc,9012
|
|
161
|
-
twitter_openapi_python_generated/models/post_create_tweet_request_variables.py,sha256=
|
|
161
|
+
twitter_openapi_python_generated/models/post_create_tweet_request_variables.py,sha256=V0N9aLfpLqN1MeJudwJMq2DYhf9O8cgXkfSBJxDnZeY,4030
|
|
162
162
|
twitter_openapi_python_generated/models/post_create_tweet_request_variables_media.py,sha256=dsxdP5xOBQD2uE4thDFcQe36AmecbmaSrHGyLnep1BM,3483
|
|
163
163
|
twitter_openapi_python_generated/models/post_create_tweet_request_variables_media_media_entities_inner.py,sha256=0YJQdjVRAdeJq-LUBWQSAIhdzozWh9d8zgRha4QmQQw,2789
|
|
164
164
|
twitter_openapi_python_generated/models/post_create_tweet_request_variables_reply.py,sha256=KZBICwtskaKf6ZN2UZKtd8AytTAiBWANl_V8j6AoTrc,2817
|
|
@@ -302,9 +302,9 @@ twitter_openapi_python_generated/models/user_verification_info_reason_descriptio
|
|
|
302
302
|
twitter_openapi_python_generated/models/user_verification_info_reason_description_entities_ref.py,sha256=di6U-pbh04SsZ2dZjyB2rZrnyJraU_ZjLFau8_IHKwI,2926
|
|
303
303
|
twitter_openapi_python_generated/models/users_response.py,sha256=ayZuqzBdIIQPP5ENpkDz5Jk_skcKxVnoHhjr9vJoqxk,2745
|
|
304
304
|
twitter_openapi_python_generated/models/users_response_data.py,sha256=kVzorz4jxERUhVSUKe6MTHN_IOzG26uVkei_z5ubB74,2930
|
|
305
|
-
twitter_openapi_python_generated-0.0.
|
|
306
|
-
twitter_openapi_python_generated-0.0.
|
|
307
|
-
twitter_openapi_python_generated-0.0.
|
|
308
|
-
twitter_openapi_python_generated-0.0.
|
|
309
|
-
twitter_openapi_python_generated-0.0.
|
|
310
|
-
twitter_openapi_python_generated-0.0.
|
|
305
|
+
twitter_openapi_python_generated-0.0.20.dist-info/LICENSE,sha256=xthyYzrtSmRlBu2gnfuIxzsZeHrqtIZgZPL9UPrYiQU,1524
|
|
306
|
+
twitter_openapi_python_generated-0.0.20.dist-info/LICENSE.AGPL,sha256=Nv6u1ubULm-E2y6q2-pQPK8s2BzkOltLaVlPKQ3tkcs,35182
|
|
307
|
+
twitter_openapi_python_generated-0.0.20.dist-info/METADATA,sha256=oWIf8Sb4MPDX_3JbaYlZtXasw9RfG_HJn_AYZPsjG_s,630
|
|
308
|
+
twitter_openapi_python_generated-0.0.20.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
309
|
+
twitter_openapi_python_generated-0.0.20.dist-info/top_level.txt,sha256=_HJ3iFAuiS8tEZxA90EesWYeEj6OB4-sNr_c8tj1uWg,33
|
|
310
|
+
twitter_openapi_python_generated-0.0.20.dist-info/RECORD,,
|
|
@@ -1,124 +0,0 @@
|
|
|
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 json
|
|
18
|
-
import pprint
|
|
19
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
20
|
-
from typing import Any, List, Optional
|
|
21
|
-
from twitter_openapi_python_generated.models.other_response import OtherResponse
|
|
22
|
-
from pydantic import StrictStr, Field
|
|
23
|
-
from typing import Union, List, Set, Optional, Dict
|
|
24
|
-
from typing_extensions import Literal, Self
|
|
25
|
-
|
|
26
|
-
OTHER200RESPONSE_ONE_OF_SCHEMAS = ["OtherResponse"]
|
|
27
|
-
|
|
28
|
-
class Other200Response(BaseModel):
|
|
29
|
-
"""
|
|
30
|
-
Other200Response
|
|
31
|
-
"""
|
|
32
|
-
# data type: OtherResponse
|
|
33
|
-
oneof_schema_1_validator: Optional[OtherResponse] = None
|
|
34
|
-
actual_instance: Optional[Union[OtherResponse]] = None
|
|
35
|
-
one_of_schemas: Set[str] = { "OtherResponse" }
|
|
36
|
-
|
|
37
|
-
model_config = ConfigDict(
|
|
38
|
-
validate_assignment=True,
|
|
39
|
-
protected_namespaces=(),
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def __init__(self, *args, **kwargs) -> None:
|
|
44
|
-
if args:
|
|
45
|
-
if len(args) > 1:
|
|
46
|
-
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
47
|
-
if kwargs:
|
|
48
|
-
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
49
|
-
super().__init__(actual_instance=args[0])
|
|
50
|
-
else:
|
|
51
|
-
super().__init__(**kwargs)
|
|
52
|
-
|
|
53
|
-
@field_validator('actual_instance')
|
|
54
|
-
def actual_instance_must_validate_oneof(cls, v):
|
|
55
|
-
instance = Other200Response.model_construct()
|
|
56
|
-
error_messages = []
|
|
57
|
-
match = 0
|
|
58
|
-
# validate data type: OtherResponse
|
|
59
|
-
if not isinstance(v, OtherResponse):
|
|
60
|
-
error_messages.append(f"Error! Input type `{type(v)}` is not `OtherResponse`")
|
|
61
|
-
else:
|
|
62
|
-
match += 1
|
|
63
|
-
if match > 1:
|
|
64
|
-
# more than 1 match
|
|
65
|
-
raise ValueError("Multiple matches found when setting `actual_instance` in Other200Response with oneOf schemas: OtherResponse. Details: " + ", ".join(error_messages))
|
|
66
|
-
elif match == 0:
|
|
67
|
-
# no match
|
|
68
|
-
raise ValueError("No match found when setting `actual_instance` in Other200Response with oneOf schemas: OtherResponse. Details: " + ", ".join(error_messages))
|
|
69
|
-
else:
|
|
70
|
-
return v
|
|
71
|
-
|
|
72
|
-
@classmethod
|
|
73
|
-
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
74
|
-
return cls.from_json(json.dumps(obj))
|
|
75
|
-
|
|
76
|
-
@classmethod
|
|
77
|
-
def from_json(cls, json_str: str) -> Self:
|
|
78
|
-
"""Returns the object represented by the json string"""
|
|
79
|
-
instance = cls.model_construct()
|
|
80
|
-
error_messages = []
|
|
81
|
-
match = 0
|
|
82
|
-
|
|
83
|
-
# deserialize data into OtherResponse
|
|
84
|
-
try:
|
|
85
|
-
instance.actual_instance = OtherResponse.from_json(json_str)
|
|
86
|
-
match += 1
|
|
87
|
-
except (ValidationError, ValueError) as e:
|
|
88
|
-
error_messages.append(str(e))
|
|
89
|
-
|
|
90
|
-
if match > 1:
|
|
91
|
-
# more than 1 match
|
|
92
|
-
raise ValueError("Multiple matches found when deserializing the JSON string into Other200Response with oneOf schemas: OtherResponse. Details: " + ", ".join(error_messages))
|
|
93
|
-
elif match == 0:
|
|
94
|
-
# no match
|
|
95
|
-
raise ValueError("No match found when deserializing the JSON string into Other200Response with oneOf schemas: OtherResponse. Details: " + ", ".join(error_messages))
|
|
96
|
-
else:
|
|
97
|
-
return instance
|
|
98
|
-
|
|
99
|
-
def to_json(self) -> str:
|
|
100
|
-
"""Returns the JSON representation of the actual instance"""
|
|
101
|
-
if self.actual_instance is None:
|
|
102
|
-
return "null"
|
|
103
|
-
|
|
104
|
-
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
105
|
-
return self.actual_instance.to_json()
|
|
106
|
-
else:
|
|
107
|
-
return json.dumps(self.actual_instance)
|
|
108
|
-
|
|
109
|
-
def to_dict(self) -> Optional[Union[Dict[str, Any], OtherResponse]]:
|
|
110
|
-
"""Returns the dict representation of the actual instance"""
|
|
111
|
-
if self.actual_instance is None:
|
|
112
|
-
return None
|
|
113
|
-
|
|
114
|
-
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
115
|
-
return self.actual_instance.to_dict()
|
|
116
|
-
else:
|
|
117
|
-
# primitive type
|
|
118
|
-
return self.actual_instance
|
|
119
|
-
|
|
120
|
-
def to_str(self) -> str:
|
|
121
|
-
"""Returns the string representation of the actual instance"""
|
|
122
|
-
return pprint.pformat(self.model_dump())
|
|
123
|
-
|
|
124
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|