twitter-openapi-python 0.0.35__py3-none-any.whl → 0.0.37__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/api/default_api.py +4 -2
- twitter_openapi_python/api/post_api.py +10 -1
- twitter_openapi_python/api/tweet_api.py +61 -8
- twitter_openapi_python/api/user_api.py +4 -2
- twitter_openapi_python/api/user_list_api.py +4 -2
- twitter_openapi_python/api/users_api.py +4 -2
- twitter_openapi_python/client.py +6 -3
- twitter_openapi_python/tid.py +17 -0
- twitter_openapi_python/utils/api.py +9 -1
- {twitter_openapi_python-0.0.35.dist-info → twitter_openapi_python-0.0.37.dist-info}/METADATA +4 -4
- {twitter_openapi_python-0.0.35.dist-info → twitter_openapi_python-0.0.37.dist-info}/RECORD +15 -14
- {twitter_openapi_python-0.0.35.dist-info → twitter_openapi_python-0.0.37.dist-info}/WHEEL +1 -1
- {twitter_openapi_python-0.0.35.dist-info → twitter_openapi_python-0.0.37.dist-info}/LICENSE +0 -0
- {twitter_openapi_python-0.0.35.dist-info → twitter_openapi_python-0.0.37.dist-info}/LICENSE.AGPL +0 -0
- {twitter_openapi_python-0.0.35.dist-info → twitter_openapi_python-0.0.37.dist-info}/top_level.txt +0 -0
|
@@ -2,6 +2,7 @@ from typing import Any, Callable, Optional, TypeVar
|
|
|
2
2
|
|
|
3
3
|
import twitter_openapi_python_generated as twitter
|
|
4
4
|
import twitter_openapi_python_generated.models as models
|
|
5
|
+
from x_client_transaction import ClientTransaction
|
|
5
6
|
|
|
6
7
|
from twitter_openapi_python.models import TweetApiUtilsData, TwitterApiUtilsResponse
|
|
7
8
|
from twitter_openapi_python.utils import (
|
|
@@ -21,9 +22,10 @@ class DefaultApiUtils:
|
|
|
21
22
|
api: twitter.DefaultApi
|
|
22
23
|
flag: ParamType
|
|
23
24
|
|
|
24
|
-
def __init__(self, api: twitter.DefaultApi, flag: ParamType):
|
|
25
|
+
def __init__(self, api: twitter.DefaultApi, flag: ParamType, ct: ClientTransaction):
|
|
25
26
|
self.api = api
|
|
26
27
|
self.flag = flag
|
|
28
|
+
self.ct = ct
|
|
27
29
|
|
|
28
30
|
def request(
|
|
29
31
|
self,
|
|
@@ -32,7 +34,7 @@ class DefaultApiUtils:
|
|
|
32
34
|
key: str,
|
|
33
35
|
param: ParamType,
|
|
34
36
|
):
|
|
35
|
-
args = get_kwargs(flag=self.flag[key], additional=param)
|
|
37
|
+
args = get_kwargs(flag=self.flag[key], additional=param, ct=self.ct)
|
|
36
38
|
res = apiFn(**args)
|
|
37
39
|
data = convertFn(res.data)
|
|
38
40
|
return build_response(res, data)
|
|
@@ -2,9 +2,11 @@ from typing import Any, Optional, TypeVar
|
|
|
2
2
|
|
|
3
3
|
import twitter_openapi_python_generated as twitter
|
|
4
4
|
import twitter_openapi_python_generated.models as models
|
|
5
|
+
from x_client_transaction import ClientTransaction
|
|
5
6
|
|
|
6
7
|
from twitter_openapi_python.models import TwitterApiUtilsResponse
|
|
7
8
|
from twitter_openapi_python.utils import build_response, non_nullable
|
|
9
|
+
from twitter_openapi_python.utils.api import get_headers
|
|
8
10
|
|
|
9
11
|
T = TypeVar("T")
|
|
10
12
|
ResponseType = TwitterApiUtilsResponse[T]
|
|
@@ -15,9 +17,10 @@ class PostApiUtils:
|
|
|
15
17
|
api: twitter.PostApi
|
|
16
18
|
flag: ParamType
|
|
17
19
|
|
|
18
|
-
def __init__(self, api: twitter.PostApi, flag: ParamType):
|
|
20
|
+
def __init__(self, api: twitter.PostApi, flag: ParamType, ct: ClientTransaction):
|
|
19
21
|
self.api = api
|
|
20
22
|
self.flag = flag
|
|
23
|
+
self.ct = ct
|
|
21
24
|
|
|
22
25
|
def post_create_tweet(
|
|
23
26
|
self,
|
|
@@ -61,6 +64,7 @@ class PostApiUtils:
|
|
|
61
64
|
variables=variables,
|
|
62
65
|
features=features,
|
|
63
66
|
),
|
|
67
|
+
_headers=get_headers(self.flag["CreateTweet"], self.ct),
|
|
64
68
|
)
|
|
65
69
|
return build_response(res, res.data)
|
|
66
70
|
|
|
@@ -79,6 +83,7 @@ class PostApiUtils:
|
|
|
79
83
|
queryId=self.flag["DeleteTweet"]["queryId"],
|
|
80
84
|
variables=variables,
|
|
81
85
|
),
|
|
86
|
+
_headers=get_headers(self.flag["DeleteTweet"], self.ct),
|
|
82
87
|
)
|
|
83
88
|
return build_response(res, res.data)
|
|
84
89
|
|
|
@@ -97,6 +102,7 @@ class PostApiUtils:
|
|
|
97
102
|
queryId=self.flag["CreateRetweet"]["queryId"],
|
|
98
103
|
variables=variables,
|
|
99
104
|
),
|
|
105
|
+
_headers=get_headers(self.flag["CreateRetweet"], self.ct),
|
|
100
106
|
)
|
|
101
107
|
return build_response(res, res.data)
|
|
102
108
|
|
|
@@ -115,6 +121,7 @@ class PostApiUtils:
|
|
|
115
121
|
queryId=self.flag["DeleteRetweet"]["queryId"],
|
|
116
122
|
variables=variables,
|
|
117
123
|
),
|
|
124
|
+
_headers=get_headers(self.flag["DeleteRetweet"], self.ct),
|
|
118
125
|
)
|
|
119
126
|
return build_response(res, res.data)
|
|
120
127
|
|
|
@@ -134,6 +141,7 @@ class PostApiUtils:
|
|
|
134
141
|
queryId=self.flag["FavoriteTweet"]["queryId"],
|
|
135
142
|
variables=variables,
|
|
136
143
|
),
|
|
144
|
+
_headers=get_headers(self.flag["FavoriteTweet"], self.ct),
|
|
137
145
|
)
|
|
138
146
|
return build_response(res, res.data)
|
|
139
147
|
|
|
@@ -153,5 +161,6 @@ class PostApiUtils:
|
|
|
153
161
|
queryId=self.flag["UnfavoriteTweet"]["queryId"],
|
|
154
162
|
variables=variables,
|
|
155
163
|
),
|
|
164
|
+
_headers=get_headers(self.flag["UnfavoriteTweet"], self.ct),
|
|
156
165
|
)
|
|
157
166
|
return build_response(res, res.data)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
from typing import Any, Callable, List, Optional, TypeVar
|
|
1
|
+
from typing import Any, Callable, List, Literal, Optional, TypeVar
|
|
2
2
|
|
|
3
3
|
import twitter_openapi_python_generated as twitter
|
|
4
4
|
import twitter_openapi_python_generated.models as models
|
|
5
|
+
from x_client_transaction import ClientTransaction
|
|
5
6
|
|
|
6
7
|
from twitter_openapi_python.models import (
|
|
7
8
|
ApiUtilsRaw,
|
|
@@ -28,9 +29,10 @@ class TweetApiUtils:
|
|
|
28
29
|
api: twitter.TweetApi
|
|
29
30
|
flag: ParamType
|
|
30
31
|
|
|
31
|
-
def __init__(self, api: twitter.TweetApi, flag: ParamType):
|
|
32
|
+
def __init__(self, api: twitter.TweetApi, flag: ParamType, ct: ClientTransaction):
|
|
32
33
|
self.api = api
|
|
33
34
|
self.flag = flag
|
|
35
|
+
self.ct = ct
|
|
34
36
|
|
|
35
37
|
def request(
|
|
36
38
|
self,
|
|
@@ -39,7 +41,7 @@ class TweetApiUtils:
|
|
|
39
41
|
key: str,
|
|
40
42
|
param: ParamType,
|
|
41
43
|
) -> ResponseType:
|
|
42
|
-
args = get_kwargs(flag=self.flag[key], additional=param)
|
|
44
|
+
args = get_kwargs(flag=self.flag[key], additional=param, ct=self.ct)
|
|
43
45
|
res = apiFn(**args)
|
|
44
46
|
instruction = convertFn(res.data)
|
|
45
47
|
entry = instruction_to_entry(instruction)
|
|
@@ -81,7 +83,7 @@ class TweetApiUtils:
|
|
|
81
83
|
def get_search_timeline(
|
|
82
84
|
self,
|
|
83
85
|
raw_query: str,
|
|
84
|
-
product: Optional[
|
|
86
|
+
product: Optional[Literal["Top", "Latest", "People", "Photos", "Videos"]] = None,
|
|
85
87
|
cursor: Optional[str] = None,
|
|
86
88
|
count: Optional[int] = None,
|
|
87
89
|
extra_param: Optional[ParamType] = None,
|
|
@@ -191,7 +193,7 @@ class TweetApiUtils:
|
|
|
191
193
|
response = self.request(
|
|
192
194
|
apiFn=self.api.get_user_tweets_with_http_info,
|
|
193
195
|
convertFn=lambda e: error_check(
|
|
194
|
-
error_check(e.data.user, e.errors).result.
|
|
196
|
+
error_check(e.data.user, e.errors).result.timeline.timeline, e.errors
|
|
195
197
|
).instructions,
|
|
196
198
|
key="UserTweets",
|
|
197
199
|
param=param,
|
|
@@ -216,7 +218,7 @@ class TweetApiUtils:
|
|
|
216
218
|
response = self.request(
|
|
217
219
|
apiFn=self.api.get_user_tweets_and_replies_with_http_info,
|
|
218
220
|
convertFn=lambda e: error_check(
|
|
219
|
-
error_check(e.data.user, e.errors).result.
|
|
221
|
+
error_check(e.data.user, e.errors).result.timeline.timeline, e.errors
|
|
220
222
|
).instructions,
|
|
221
223
|
key="UserTweetsAndReplies",
|
|
222
224
|
param=param,
|
|
@@ -241,7 +243,7 @@ class TweetApiUtils:
|
|
|
241
243
|
response = self.request(
|
|
242
244
|
apiFn=self.api.get_user_media_with_http_info,
|
|
243
245
|
convertFn=lambda e: error_check(
|
|
244
|
-
error_check(e.data.user, e.errors).result.
|
|
246
|
+
error_check(e.data.user, e.errors).result.timeline.timeline, e.errors
|
|
245
247
|
).instructions,
|
|
246
248
|
key="UserMedia",
|
|
247
249
|
param=param,
|
|
@@ -266,7 +268,7 @@ class TweetApiUtils:
|
|
|
266
268
|
response = self.request(
|
|
267
269
|
apiFn=self.api.get_likes_with_http_info,
|
|
268
270
|
convertFn=lambda e: error_check(
|
|
269
|
-
error_check(e.data.user, e.errors).result.
|
|
271
|
+
error_check(e.data.user, e.errors).result.timeline.timeline, e.errors
|
|
270
272
|
).instructions,
|
|
271
273
|
key="Likes",
|
|
272
274
|
param=param,
|
|
@@ -296,3 +298,54 @@ class TweetApiUtils:
|
|
|
296
298
|
param=param,
|
|
297
299
|
)
|
|
298
300
|
return response
|
|
301
|
+
|
|
302
|
+
def get_community_tweets_timeline(
|
|
303
|
+
self,
|
|
304
|
+
cursor: Optional[str] = None,
|
|
305
|
+
count: Optional[int] = None,
|
|
306
|
+
rankingMode: Optional[Literal["Recency", "Relevance"]] = None,
|
|
307
|
+
extra_param: Optional[ParamType] = None,
|
|
308
|
+
) -> ResponseType:
|
|
309
|
+
param: ParamType = {}
|
|
310
|
+
if cursor is not None:
|
|
311
|
+
param["cursor"] = cursor
|
|
312
|
+
if count is not None:
|
|
313
|
+
param["count"] = count
|
|
314
|
+
if rankingMode is not None:
|
|
315
|
+
param["rankingMode"] = rankingMode
|
|
316
|
+
if extra_param is not None:
|
|
317
|
+
param.update(extra_param)
|
|
318
|
+
|
|
319
|
+
response = self.request(
|
|
320
|
+
apiFn=self.api.get_community_tweets_timeline_with_http_info,
|
|
321
|
+
convertFn=lambda e: error_check(
|
|
322
|
+
error_check(e.data, e.errors).community_results.result.ranked_community_timeline.timeline, e.errors
|
|
323
|
+
).instructions,
|
|
324
|
+
key="CommunityTweetsTimeline",
|
|
325
|
+
param=param,
|
|
326
|
+
)
|
|
327
|
+
return response
|
|
328
|
+
|
|
329
|
+
def get_community_media_timeline(
|
|
330
|
+
self,
|
|
331
|
+
cursor: Optional[str] = None,
|
|
332
|
+
count: Optional[int] = None,
|
|
333
|
+
extra_param: Optional[ParamType] = None,
|
|
334
|
+
) -> ResponseType:
|
|
335
|
+
param: ParamType = {}
|
|
336
|
+
if cursor is not None:
|
|
337
|
+
param["cursor"] = cursor
|
|
338
|
+
if count is not None:
|
|
339
|
+
param["count"] = count
|
|
340
|
+
if extra_param is not None:
|
|
341
|
+
param.update(extra_param)
|
|
342
|
+
|
|
343
|
+
response = self.request(
|
|
344
|
+
apiFn=self.api.get_community_media_timeline_with_http_info,
|
|
345
|
+
convertFn=lambda e: error_check(
|
|
346
|
+
error_check(e.data, e.errors).community_results.result.community_media_timeline.timeline, e.errors
|
|
347
|
+
).instructions,
|
|
348
|
+
key="CommunityMediaTimeline",
|
|
349
|
+
param=param,
|
|
350
|
+
)
|
|
351
|
+
return response
|
|
@@ -2,6 +2,7 @@ from typing import Any, Callable, Optional, TypeVar
|
|
|
2
2
|
|
|
3
3
|
import twitter_openapi_python_generated as twitter
|
|
4
4
|
import twitter_openapi_python_generated.models as models
|
|
5
|
+
from x_client_transaction import ClientTransaction
|
|
5
6
|
|
|
6
7
|
from twitter_openapi_python.models import TwitterApiUtilsResponse, UserApiUtilsData
|
|
7
8
|
from twitter_openapi_python.utils import (
|
|
@@ -21,9 +22,10 @@ class UserApiUtils:
|
|
|
21
22
|
api: twitter.UserApi
|
|
22
23
|
flag: ParamType
|
|
23
24
|
|
|
24
|
-
def __init__(self, api: twitter.UserApi, flag: ParamType):
|
|
25
|
+
def __init__(self, api: twitter.UserApi, flag: ParamType, ct: ClientTransaction):
|
|
25
26
|
self.api = api
|
|
26
27
|
self.flag = flag
|
|
28
|
+
self.ct = ct
|
|
27
29
|
|
|
28
30
|
def request(
|
|
29
31
|
self,
|
|
@@ -32,7 +34,7 @@ class UserApiUtils:
|
|
|
32
34
|
key: str,
|
|
33
35
|
param: ParamType,
|
|
34
36
|
) -> ResponseType:
|
|
35
|
-
args = get_kwargs(flag=self.flag[key], additional=param)
|
|
37
|
+
args = get_kwargs(flag=self.flag[key], additional=param, ct=self.ct)
|
|
36
38
|
res = apiFn(**args)
|
|
37
39
|
result = convertFn(res.data)
|
|
38
40
|
if result.result is None:
|
|
@@ -2,6 +2,7 @@ from typing import Any, Callable, List, Optional, TypeVar
|
|
|
2
2
|
|
|
3
3
|
import twitter_openapi_python_generated as twitter
|
|
4
4
|
import twitter_openapi_python_generated.models as models
|
|
5
|
+
from x_client_transaction import ClientTransaction
|
|
5
6
|
|
|
6
7
|
from twitter_openapi_python.models import (
|
|
7
8
|
ApiUtilsRaw,
|
|
@@ -29,9 +30,10 @@ class UserListApiUtils:
|
|
|
29
30
|
api: twitter.UserListApi
|
|
30
31
|
flag: ParamType
|
|
31
32
|
|
|
32
|
-
def __init__(self, api: twitter.UserListApi, flag: ParamType):
|
|
33
|
+
def __init__(self, api: twitter.UserListApi, flag: ParamType, ct: ClientTransaction):
|
|
33
34
|
self.api = api
|
|
34
35
|
self.flag = flag
|
|
36
|
+
self.ct = ct
|
|
35
37
|
|
|
36
38
|
def request(
|
|
37
39
|
self,
|
|
@@ -40,7 +42,7 @@ class UserListApiUtils:
|
|
|
40
42
|
key: str,
|
|
41
43
|
param: ParamType,
|
|
42
44
|
) -> ResponseType:
|
|
43
|
-
args = get_kwargs(flag=self.flag[key], additional=param)
|
|
45
|
+
args = get_kwargs(flag=self.flag[key], additional=param, ct=self.ct)
|
|
44
46
|
res = apiFn(**args)
|
|
45
47
|
instruction = convertFn(res.data)
|
|
46
48
|
entry = instruction_to_entry(instruction)
|
|
@@ -2,6 +2,7 @@ from typing import Any, Callable, Optional, TypeVar
|
|
|
2
2
|
|
|
3
3
|
import twitter_openapi_python_generated as twitter
|
|
4
4
|
import twitter_openapi_python_generated.models as models
|
|
5
|
+
from x_client_transaction import ClientTransaction
|
|
5
6
|
|
|
6
7
|
from twitter_openapi_python.models import TwitterApiUtilsResponse, UserApiUtilsData
|
|
7
8
|
from twitter_openapi_python.utils import (
|
|
@@ -21,9 +22,10 @@ class UsersApiUtils:
|
|
|
21
22
|
api: twitter.UsersApi
|
|
22
23
|
flag: ParamType
|
|
23
24
|
|
|
24
|
-
def __init__(self, api: twitter.UsersApi, flag: ParamType):
|
|
25
|
+
def __init__(self, api: twitter.UsersApi, flag: ParamType, ct: ClientTransaction):
|
|
25
26
|
self.api = api
|
|
26
27
|
self.flag = flag
|
|
28
|
+
self.ct = ct
|
|
27
29
|
|
|
28
30
|
def request(
|
|
29
31
|
self,
|
|
@@ -32,7 +34,7 @@ class UsersApiUtils:
|
|
|
32
34
|
key: str,
|
|
33
35
|
param: ParamType,
|
|
34
36
|
) -> ResponseType:
|
|
35
|
-
args = get_kwargs(flag=self.flag[key], additional=param)
|
|
37
|
+
args = get_kwargs(flag=self.flag[key], additional=param, ct=self.ct)
|
|
36
38
|
res = apiFn(**args)
|
|
37
39
|
user_result = convertFn(res.data)
|
|
38
40
|
user = user_result_converter(user_result)
|
twitter_openapi_python/client.py
CHANGED
|
@@ -5,6 +5,7 @@ from typing import Any
|
|
|
5
5
|
import twitter_openapi_python_generated as twitter
|
|
6
6
|
import twitter_openapi_python_generated.configuration as conf
|
|
7
7
|
import urllib3
|
|
8
|
+
from x_client_transaction import ClientTransaction
|
|
8
9
|
|
|
9
10
|
from twitter_openapi_python.api import (
|
|
10
11
|
DefaultApiUtils,
|
|
@@ -25,12 +26,13 @@ class TwitterOpenapiPythonClient:
|
|
|
25
26
|
api: twitter.ApiClient
|
|
26
27
|
placeholder: ParamType
|
|
27
28
|
|
|
28
|
-
def __init__(self, api: twitter.ApiClient, placeholder: ParamType):
|
|
29
|
+
def __init__(self, api: twitter.ApiClient, placeholder: ParamType, ct: ClientTransaction):
|
|
29
30
|
self.api = api
|
|
30
31
|
self.placeholder = placeholder
|
|
32
|
+
self.ct = ct
|
|
31
33
|
|
|
32
34
|
def get_default_api(self) -> DefaultApiUtils:
|
|
33
|
-
return DefaultApiUtils(twitter.DefaultApi(self.api), self.placeholder)
|
|
35
|
+
return DefaultApiUtils(twitter.DefaultApi(self.api), self.placeholder, self.ct)
|
|
34
36
|
|
|
35
37
|
def get_initial_state_api(self) -> InitialStateApiUtils:
|
|
36
38
|
return InitialStateApiUtils(self.api)
|
|
@@ -123,7 +125,8 @@ class TwitterOpenapiPython:
|
|
|
123
125
|
) -> TwitterOpenapiPythonClient:
|
|
124
126
|
http = urllib3.PoolManager()
|
|
125
127
|
flag = http.request("GET", self.placeholder_url.format(hash=self.hash))
|
|
126
|
-
|
|
128
|
+
ct = get_tid()
|
|
129
|
+
return TwitterOpenapiPythonClient(api, json.loads(flag.data), ct)
|
|
127
130
|
|
|
128
131
|
def get_client_from_cookies(
|
|
129
132
|
self,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import bs4
|
|
2
|
+
import requests
|
|
3
|
+
from x_client_transaction import ClientTransaction
|
|
4
|
+
from x_client_transaction.utils import generate_headers, get_ondemand_file_url, handle_x_migration
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def get_tid():
|
|
8
|
+
session = requests.Session()
|
|
9
|
+
session.headers = generate_headers() # type: ignore
|
|
10
|
+
home_page_response = handle_x_migration(session=session)
|
|
11
|
+
home_page = session.get(url="https://x.com")
|
|
12
|
+
home_page_response = bs4.BeautifulSoup(home_page.content, "html.parser")
|
|
13
|
+
ondemand_file_url = get_ondemand_file_url(response=home_page_response)
|
|
14
|
+
ondemand_file = session.get(url=ondemand_file_url) # type: ignore
|
|
15
|
+
ondemand_file_response = bs4.BeautifulSoup(ondemand_file.content, "html.parser")
|
|
16
|
+
ct = ClientTransaction(home_page_response=home_page_response, ondemand_file_response=ondemand_file_response)
|
|
17
|
+
return ct
|
|
@@ -3,6 +3,7 @@ from typing import Any, Dict, List, Mapping, Optional, TypeGuard, TypeVar
|
|
|
3
3
|
|
|
4
4
|
import twitter_openapi_python_generated as twitter
|
|
5
5
|
import twitter_openapi_python_generated.models as models
|
|
6
|
+
from x_client_transaction import ClientTransaction
|
|
6
7
|
|
|
7
8
|
from twitter_openapi_python.models import (
|
|
8
9
|
ApiUtilsHeader,
|
|
@@ -36,7 +37,7 @@ def non_nullable_list(x: List[Optional[T]]) -> List[T]:
|
|
|
36
37
|
return list(filter(filter_fn, x))
|
|
37
38
|
|
|
38
39
|
|
|
39
|
-
def get_kwargs(flag: ParamType, additional: ParamType) -> ParamType:
|
|
40
|
+
def get_kwargs(flag: ParamType, additional: ParamType, ct: ClientTransaction) -> ParamType:
|
|
40
41
|
assert flag is not None
|
|
41
42
|
kwargs = {"path_query_id": flag["queryId"]}
|
|
42
43
|
if flag.get("variables") is not None:
|
|
@@ -45,9 +46,16 @@ def get_kwargs(flag: ParamType, additional: ParamType) -> ParamType:
|
|
|
45
46
|
kwargs["features"] = json.dumps(flag["features"])
|
|
46
47
|
if flag.get("fieldToggles") is not None:
|
|
47
48
|
kwargs["field_toggles"] = json.dumps(flag["fieldToggles"])
|
|
49
|
+
if flag.get("@path") is not None:
|
|
50
|
+
kwargs["_headers"] = get_headers(flag, ct)
|
|
48
51
|
return kwargs
|
|
49
52
|
|
|
50
53
|
|
|
54
|
+
def get_headers(flag: ParamType, ct: ClientTransaction) -> Dict[str, str]:
|
|
55
|
+
tid = ct.generate_transaction_id(flag["@method"], flag["@path"])
|
|
56
|
+
return {"x-client-transaction-id": tid}
|
|
57
|
+
|
|
58
|
+
|
|
51
59
|
def get_legacy_kwargs(flag: ParamType, additional: ParamType) -> ParamType:
|
|
52
60
|
assert flag is not None
|
|
53
61
|
|
{twitter_openapi_python-0.0.35.dist-info → twitter_openapi_python-0.0.37.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: twitter-openapi-python
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.37
|
|
4
4
|
Summary: Twitter OpenAPI
|
|
5
5
|
Home-page: https://github.com/fa0311/twitter_openapi_python
|
|
6
6
|
Author: fa0311
|
|
@@ -10,9 +10,9 @@ Keywords: OpenAPI,OpenAPI-Generator,Twitter OpenAPI
|
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
License-File: LICENSE.AGPL
|
|
13
|
-
Requires-Dist: twitter-openapi-python-generated
|
|
14
|
-
Requires-Dist: pydantic
|
|
15
|
-
Requires-Dist: urllib3
|
|
13
|
+
Requires-Dist: twitter-openapi-python-generated==0.0.33
|
|
14
|
+
Requires-Dist: pydantic>=2.6
|
|
15
|
+
Requires-Dist: urllib3<3.0.0,>=2.1.0
|
|
16
16
|
|
|
17
17
|
# twitter_openapi_python
|
|
18
18
|
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
twitter_openapi_python/__init__.py,sha256=stqYIfWDqM0yC93SQNp4-b2hSz-ONWR3QxOG5g2oREg,339
|
|
2
|
-
twitter_openapi_python/client.py,sha256=
|
|
2
|
+
twitter_openapi_python/client.py,sha256=mFe9wE92YpM1PfstIK6on-b56N-UqefPjwEXJ7SoX7E,6887
|
|
3
3
|
twitter_openapi_python/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
twitter_openapi_python/tid.py,sha256=gYw3QWmWNRA_skpjLnMUARx_ea20ZDLCcDhdQvAlAZk,846
|
|
4
5
|
twitter_openapi_python/api/__init__.py,sha256=-2hoS75Fp0KvCIWKYQFpvAl0pcbFyt7Be3ood08P7n8,643
|
|
5
|
-
twitter_openapi_python/api/default_api.py,sha256=
|
|
6
|
+
twitter_openapi_python/api/default_api.py,sha256=kq-8kdgs0yL60sbYQx6aMrp6Me3cNvSG2ThO62YPw78,2666
|
|
6
7
|
twitter_openapi_python/api/initial_state_api.py,sha256=eByv3zyjmDHL2bu_rA7_KNvh-oc36AsIUi78Dg1SYK0,2341
|
|
7
|
-
twitter_openapi_python/api/post_api.py,sha256=
|
|
8
|
-
twitter_openapi_python/api/tweet_api.py,sha256=
|
|
9
|
-
twitter_openapi_python/api/user_api.py,sha256=
|
|
10
|
-
twitter_openapi_python/api/user_list_api.py,sha256=
|
|
11
|
-
twitter_openapi_python/api/users_api.py,sha256=
|
|
8
|
+
twitter_openapi_python/api/post_api.py,sha256=jZV_XfLVYG8R_cJeX7iwXUoaP-M7M364tnXX7LGoysI,6692
|
|
9
|
+
twitter_openapi_python/api/tweet_api.py,sha256=oPC8Z-dMgVzGICuBzCoNPRoF8UR_m0WkrdQedOvmKCA,11922
|
|
10
|
+
twitter_openapi_python/api/user_api.py,sha256=ffC5D8vX8XsWikE8eOsZD5zCb_y8br0VoMvC29KsB3g,2537
|
|
11
|
+
twitter_openapi_python/api/user_list_api.py,sha256=qK1hHL0pw5Fjhp3yl4hrww6hxCbBlkd0pHqJWjSX1EI,5673
|
|
12
|
+
twitter_openapi_python/api/users_api.py,sha256=25Z11AfWbUQBJR5FcdB4s1aS5DOIjUK3Lm1HWyaI_-4,1806
|
|
12
13
|
twitter_openapi_python/api/v11_get_api.py,sha256=Gz5hLf4yJkGdpzjmJIsSqdr1eI6mqtjB3DHQii_uzzg,2144
|
|
13
14
|
twitter_openapi_python/api/v11_post_api.py,sha256=y1jJ5Q_-CYLC4HGjvl3eKDnKdtCVbHVRC2VAbJr8_EM,1945
|
|
14
15
|
twitter_openapi_python/models/__init__.py,sha256=uKZYFWWoXinGRjMU7ErbunUhfsThEuZf8aGFBd7lus0,583
|
|
@@ -18,10 +19,10 @@ twitter_openapi_python/models/initial_state.py,sha256=h8P3hC_tLVSmDuYxB03fuSviz2
|
|
|
18
19
|
twitter_openapi_python/models/response.py,sha256=ZuaX36mKRsVx5aiJhNw3CjrvVGVaGjMCGdXy28PMFy8,480
|
|
19
20
|
twitter_openapi_python/models/timeline.py,sha256=AoWfrJsonYImlweciaUSjFzmeciaX0zshi7d-FkT4LM,1392
|
|
20
21
|
twitter_openapi_python/utils/__init__.py,sha256=2Am22zCH-BUwPxKnnPoHQvKEF-gWX_eryKgA4OZeiog,449
|
|
21
|
-
twitter_openapi_python/utils/api.py,sha256=
|
|
22
|
-
twitter_openapi_python-0.0.
|
|
23
|
-
twitter_openapi_python-0.0.
|
|
24
|
-
twitter_openapi_python-0.0.
|
|
25
|
-
twitter_openapi_python-0.0.
|
|
26
|
-
twitter_openapi_python-0.0.
|
|
27
|
-
twitter_openapi_python-0.0.
|
|
22
|
+
twitter_openapi_python/utils/api.py,sha256=d6lCw3inSis9FVdQosDdTcwJPUl9UNGWT04bdd_l8xs,10325
|
|
23
|
+
twitter_openapi_python-0.0.37.dist-info/LICENSE,sha256=xthyYzrtSmRlBu2gnfuIxzsZeHrqtIZgZPL9UPrYiQU,1524
|
|
24
|
+
twitter_openapi_python-0.0.37.dist-info/LICENSE.AGPL,sha256=Nv6u1ubULm-E2y6q2-pQPK8s2BzkOltLaVlPKQ3tkcs,35182
|
|
25
|
+
twitter_openapi_python-0.0.37.dist-info/METADATA,sha256=SGXmNaS8wrb5gl59Qp1j-_Bm_Ug8DcE8tMsTWTcmlX4,3106
|
|
26
|
+
twitter_openapi_python-0.0.37.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
27
|
+
twitter_openapi_python-0.0.37.dist-info/top_level.txt,sha256=wKFCnW_S6aWD3nFPmd65SxZIviiqQ30LqHOLLpcnTdE,23
|
|
28
|
+
twitter_openapi_python-0.0.37.dist-info/RECORD,,
|
|
File without changes
|
{twitter_openapi_python-0.0.35.dist-info → twitter_openapi_python-0.0.37.dist-info}/LICENSE.AGPL
RENAMED
|
File without changes
|
{twitter_openapi_python-0.0.35.dist-info → twitter_openapi_python-0.0.37.dist-info}/top_level.txt
RENAMED
|
File without changes
|