twitter-openapi-python 0.1.2__tar.gz → 0.1.3__tar.gz

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.
Files changed (30) hide show
  1. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/PKG-INFO +2 -2
  2. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/pyproject.toml +2 -2
  3. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/pyproject.toml.orig +2 -2
  4. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/api/default_api.py +66 -0
  5. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/api/tweet_api.py +75 -49
  6. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/api/user_api.py +17 -0
  7. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/api/user_list_api.py +28 -12
  8. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/api/users_api.py +17 -0
  9. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/client.py +1 -1
  10. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/LICENSE +0 -0
  11. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/LICENSE.AGPL +0 -0
  12. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/README.md +0 -0
  13. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/__init__.py +0 -0
  14. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/api/__init__.py +0 -0
  15. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/api/birdwatch_api.py +0 -0
  16. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/api/community_api.py +0 -0
  17. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/api/initial_state_api.py +0 -0
  18. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/api/post_api.py +0 -0
  19. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/api/v11_get_api.py +0 -0
  20. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/api/v11_post_api.py +0 -0
  21. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/models/__init__.py +0 -0
  22. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/models/base.py +0 -0
  23. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/models/header.py +0 -0
  24. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/models/initial_state.py +0 -0
  25. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/models/response.py +0 -0
  26. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/models/timeline.py +0 -0
  27. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/py.typed +0 -0
  28. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/tid.py +0 -0
  29. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/utils/__init__.py +0 -0
  30. {twitter_openapi_python-0.1.2 → twitter_openapi_python-0.1.3}/twitter_openapi_python/utils/api.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: twitter_openapi_python
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Twitter OpenAPI
5
5
  Keywords: twitter,api,python,scraper
6
6
  Author: fa0311
@@ -8,7 +8,7 @@ Author-email: fa0311 <yuki@yuki0311.com>
8
8
  License-Expression: LicenseRef-Custom OR AGPL-3.0-or-later
9
9
  License-File: LICENSE
10
10
  License-File: LICENSE.AGPL
11
- Requires-Dist: twitter-openapi-python-generated==0.1.2
11
+ Requires-Dist: twitter-openapi-python-generated==0.1.3
12
12
  Requires-Dist: pydantic>=2.6
13
13
  Requires-Dist: requests>=2.31.0,<3.0.0
14
14
  Requires-Dist: urllib3>=2.1.0,<3.0.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "twitter_openapi_python"
3
- version = "0.1.2"
3
+ version = "0.1.3"
4
4
  description = "Twitter OpenAPI"
5
5
  readme = "README.md"
6
6
  license = "LicenseRef-Custom OR AGPL-3.0-or-later"
@@ -16,7 +16,7 @@ keywords = [
16
16
  ]
17
17
  requires-python = ">=3.10"
18
18
  dependencies = [
19
- "twitter_openapi_python_generated==0.1.2",
19
+ "twitter_openapi_python_generated==0.1.3",
20
20
  "pydantic>=2.6",
21
21
  "requests>=2.31.0,<3.0.0",
22
22
  "urllib3>=2.1.0,<3.0.0",
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "twitter_openapi_python"
3
- version = "0.1.2"
3
+ version = "0.1.3"
4
4
  description = "Twitter OpenAPI"
5
5
  authors = [{ name = "fa0311", email = "yuki@yuki0311.com" }]
6
6
  readme = "README.md"
@@ -9,7 +9,7 @@ license-files = ["LICENSE", "LICENSE.AGPL"]
9
9
  keywords = ["twitter", "api", "python", "scraper"]
10
10
  requires-python = ">=3.10"
11
11
  dependencies = [
12
- "twitter_openapi_python_generated==0.1.2",
12
+ "twitter_openapi_python_generated==0.1.3",
13
13
  "pydantic>=2.6",
14
14
  "requests>=2.31.0,<3.0.0",
15
15
  "urllib3>=2.1.0,<3.0.0",
@@ -153,3 +153,69 @@ class DefaultApiUtils:
153
153
  key="PinnedTimelines",
154
154
  param=param,
155
155
  )
156
+
157
+ def get_broadcast_query(
158
+ self,
159
+ id: str,
160
+ extra_param: Optional[ParamType] = None,
161
+ ) -> TwitterApiUtilsResponse[models.Broadcast]:
162
+ """A live video broadcast by id."""
163
+ param: ParamType = {"id": id}
164
+ if extra_param is not None:
165
+ param.update(extra_param)
166
+ return self.request(
167
+ apiFn=self.api.get_broadcast_query_with_http_info,
168
+ convertFn=lambda x: error_check(x.data, x.errors).broadcast,
169
+ key="BroadcastQuery",
170
+ param=param,
171
+ )
172
+
173
+ def get_audio_space_by_id(
174
+ self,
175
+ id: str,
176
+ extra_param: Optional[ParamType] = None,
177
+ ) -> TwitterApiUtilsResponse[models.AudioSpace]:
178
+ """A Space by id: metadata, participants and the announcing post."""
179
+ param: ParamType = {"id": id}
180
+ if extra_param is not None:
181
+ param.update(extra_param)
182
+ return self.request(
183
+ apiFn=self.api.get_audio_space_by_id_with_http_info,
184
+ convertFn=lambda x: error_check(x.data, x.errors).audio_space,
185
+ key="AudioSpaceById",
186
+ param=param,
187
+ )
188
+
189
+ def get_use_story_topic_query(
190
+ self,
191
+ rest_id: str = "For You",
192
+ limit: Optional[int] = None,
193
+ extra_param: Optional[ParamType] = None,
194
+ ) -> TwitterApiUtilsResponse[models.StoryTopic]:
195
+ """AI-written stories of an explore topic."""
196
+ param: ParamType = {"rest_id": rest_id}
197
+ if limit is not None:
198
+ param["limit"] = limit
199
+ if extra_param is not None:
200
+ param.update(extra_param)
201
+ return self.request(
202
+ apiFn=self.api.get_use_story_topic_query_with_http_info,
203
+ convertFn=lambda x: error_check(x.data, x.errors).story_topic,
204
+ key="useStoryTopicQuery",
205
+ param=param,
206
+ )
207
+
208
+ def get_grok_account_jwt_query(
209
+ self,
210
+ extra_param: Optional[ParamType] = None,
211
+ ) -> TwitterApiUtilsResponse[models.GrokAccountJwt]:
212
+ """Whether the account is linked to a Grok account."""
213
+ param: ParamType = {}
214
+ if extra_param is not None:
215
+ param.update(extra_param)
216
+ return self.request(
217
+ apiFn=self.api.get_grok_account_jwt_query_with_http_info,
218
+ convertFn=lambda x: error_check(x.data, x.errors).grok_account_jwt,
219
+ key="grokAccountJwtQuery",
220
+ param=param,
221
+ )
@@ -93,9 +93,11 @@ class TweetApiUtils:
93
93
 
94
94
  response = self.request(
95
95
  apiFn=self.api.get_search_timeline_with_http_info,
96
- convertFn=lambda e: error_check(
97
- error_check(e.data.search_by_raw_query, e.errors).search_timeline.timeline, e.errors
98
- ).instructions,
96
+ convertFn=lambda e: (
97
+ error_check(
98
+ error_check(e.data.search_by_raw_query, e.errors).search_timeline.timeline, e.errors
99
+ ).instructions
100
+ ),
99
101
  key="SearchTimeline",
100
102
  param=param,
101
103
  )
@@ -162,9 +164,9 @@ class TweetApiUtils:
162
164
 
163
165
  response = self.request(
164
166
  apiFn=self.api.get_list_latest_tweets_timeline_with_http_info,
165
- convertFn=lambda e: error_check(
166
- error_check(e.data.list, e.errors).tweets_timeline.timeline, e.errors
167
- ).instructions,
167
+ convertFn=lambda e: (
168
+ error_check(error_check(e.data.list, e.errors).tweets_timeline.timeline, e.errors).instructions
169
+ ),
168
170
  key="ListLatestTweetsTimeline",
169
171
  param=param,
170
172
  )
@@ -187,9 +189,11 @@ class TweetApiUtils:
187
189
 
188
190
  response = self.request(
189
191
  apiFn=self.api.get_user_tweets_with_http_info,
190
- convertFn=lambda e: error_check(
191
- error_check(e.data.user, e.errors).result.timeline.timeline, e.errors
192
- ).instructions,
192
+ convertFn=lambda e: (
193
+ error_check(
194
+ error_check(error_check(e.data.user, e.errors).result.timeline, e.errors).timeline, e.errors
195
+ ).instructions
196
+ ),
193
197
  key="UserTweets",
194
198
  param=param,
195
199
  )
@@ -212,9 +216,11 @@ class TweetApiUtils:
212
216
 
213
217
  response = self.request(
214
218
  apiFn=self.api.get_user_originals_timeline_with_http_info,
215
- convertFn=lambda e: error_check(
216
- error_check(e.data.user, e.errors).result.timeline.timeline, e.errors
217
- ).instructions,
219
+ convertFn=lambda e: (
220
+ error_check(
221
+ error_check(error_check(e.data.user, e.errors).result.timeline, e.errors).timeline, e.errors
222
+ ).instructions
223
+ ),
218
224
  key="UserOriginalsTimeline",
219
225
  param=param,
220
226
  )
@@ -237,9 +243,11 @@ class TweetApiUtils:
237
243
 
238
244
  response = self.request(
239
245
  apiFn=self.api.get_user_replies_timeline_with_http_info,
240
- convertFn=lambda e: error_check(
241
- error_check(e.data.user, e.errors).result.timeline.timeline, e.errors
242
- ).instructions,
246
+ convertFn=lambda e: (
247
+ error_check(
248
+ error_check(error_check(e.data.user, e.errors).result.timeline, e.errors).timeline, e.errors
249
+ ).instructions
250
+ ),
243
251
  key="UserRepliesTimeline",
244
252
  param=param,
245
253
  )
@@ -262,9 +270,11 @@ class TweetApiUtils:
262
270
 
263
271
  response = self.request(
264
272
  apiFn=self.api.get_user_video_timeline_with_http_info,
265
- convertFn=lambda e: error_check(
266
- error_check(e.data.user, e.errors).result.timeline.timeline, e.errors
267
- ).instructions,
273
+ convertFn=lambda e: (
274
+ error_check(
275
+ error_check(error_check(e.data.user, e.errors).result.timeline, e.errors).timeline, e.errors
276
+ ).instructions
277
+ ),
268
278
  key="UserVideoTimeline",
269
279
  param=param,
270
280
  )
@@ -287,9 +297,11 @@ class TweetApiUtils:
287
297
 
288
298
  response = self.request(
289
299
  apiFn=self.api.get_user_tweets_and_replies_with_http_info,
290
- convertFn=lambda e: error_check(
291
- error_check(e.data.user, e.errors).result.timeline.timeline, e.errors
292
- ).instructions,
300
+ convertFn=lambda e: (
301
+ error_check(
302
+ error_check(error_check(e.data.user, e.errors).result.timeline, e.errors).timeline, e.errors
303
+ ).instructions
304
+ ),
293
305
  key="UserTweetsAndReplies",
294
306
  param=param,
295
307
  )
@@ -312,9 +324,11 @@ class TweetApiUtils:
312
324
 
313
325
  response = self.request(
314
326
  apiFn=self.api.get_user_media_with_http_info,
315
- convertFn=lambda e: error_check(
316
- error_check(e.data.user, e.errors).result.timeline.timeline, e.errors
317
- ).instructions,
327
+ convertFn=lambda e: (
328
+ error_check(
329
+ error_check(error_check(e.data.user, e.errors).result.timeline, e.errors).timeline, e.errors
330
+ ).instructions
331
+ ),
318
332
  key="UserMedia",
319
333
  param=param,
320
334
  )
@@ -337,9 +351,11 @@ class TweetApiUtils:
337
351
 
338
352
  response = self.request(
339
353
  apiFn=self.api.get_likes_with_http_info,
340
- convertFn=lambda e: error_check(
341
- error_check(e.data.user, e.errors).result.timeline.timeline, e.errors
342
- ).instructions,
354
+ convertFn=lambda e: (
355
+ error_check(
356
+ error_check(error_check(e.data.user, e.errors).result.timeline, e.errors).timeline, e.errors
357
+ ).instructions
358
+ ),
343
359
  key="Likes",
344
360
  param=param,
345
361
  )
@@ -361,9 +377,9 @@ class TweetApiUtils:
361
377
 
362
378
  response = self.request(
363
379
  apiFn=self.api.get_bookmarks_with_http_info,
364
- convertFn=lambda e: error_check(
365
- error_check(e.data, e.errors).bookmark_timeline_v2.timeline, e.errors
366
- ).instructions,
380
+ convertFn=lambda e: (
381
+ error_check(error_check(e.data, e.errors).bookmark_timeline_v2.timeline, e.errors).instructions
382
+ ),
367
383
  key="Bookmarks",
368
384
  param=param,
369
385
  )
@@ -389,9 +405,11 @@ class TweetApiUtils:
389
405
 
390
406
  response = self.request(
391
407
  apiFn=self.api.get_community_tweets_timeline_with_http_info,
392
- convertFn=lambda e: error_check(
393
- error_check(e.data, e.errors).community_results.result.ranked_community_timeline.timeline, e.errors
394
- ).instructions,
408
+ convertFn=lambda e: (
409
+ error_check(
410
+ error_check(e.data, e.errors).community_results.result.ranked_community_timeline.timeline, e.errors
411
+ ).instructions
412
+ ),
395
413
  key="CommunityTweetsTimeline",
396
414
  param=param,
397
415
  )
@@ -414,9 +432,11 @@ class TweetApiUtils:
414
432
 
415
433
  response = self.request(
416
434
  apiFn=self.api.get_community_media_timeline_with_http_info,
417
- convertFn=lambda e: error_check(
418
- error_check(e.data, e.errors).community_results.result.community_media_timeline.timeline, e.errors
419
- ).instructions,
435
+ convertFn=lambda e: (
436
+ error_check(
437
+ error_check(e.data, e.errors).community_results.result.community_media_timeline.timeline, e.errors
438
+ ).instructions
439
+ ),
420
440
  key="CommunityMediaTimeline",
421
441
  param=param,
422
442
  )
@@ -439,7 +459,9 @@ class TweetApiUtils:
439
459
 
440
460
  response = self.request(
441
461
  apiFn=self.api.get_user_highlights_tweets_with_http_info,
442
- convertFn=lambda e: error_check(e.data.user, e.errors).result.timeline.timeline.instructions,
462
+ convertFn=lambda e: (
463
+ error_check(error_check(e.data.user, e.errors).result.timeline, e.errors).timeline.instructions
464
+ ),
443
465
  key="UserHighlightsTweets",
444
466
  param=param,
445
467
  )
@@ -462,9 +484,11 @@ class TweetApiUtils:
462
484
 
463
485
  response = self.request(
464
486
  apiFn=self.api.get_user_reposts_timeline_with_http_info,
465
- convertFn=lambda e: error_check(
466
- error_check(e.data.user, e.errors).result.timeline.timeline, e.errors
467
- ).instructions,
487
+ convertFn=lambda e: (
488
+ error_check(
489
+ error_check(error_check(e.data.user, e.errors).result.timeline, e.errors).timeline, e.errors
490
+ ).instructions
491
+ ),
468
492
  key="UserRepostsTimeline",
469
493
  param=param,
470
494
  )
@@ -488,9 +512,11 @@ class TweetApiUtils:
488
512
 
489
513
  response = self.request(
490
514
  apiFn=self.api.get_user_super_follow_tweets_with_http_info,
491
- convertFn=lambda e: error_check(
492
- error_check(e.data.user, e.errors).result.timeline.timeline, e.errors
493
- ).instructions,
515
+ convertFn=lambda e: (
516
+ error_check(
517
+ error_check(error_check(e.data.user, e.errors).result.timeline, e.errors).timeline, e.errors
518
+ ).instructions
519
+ ),
494
520
  key="UserSuperFollowTweets",
495
521
  param=param,
496
522
  )
@@ -564,9 +590,9 @@ class TweetApiUtils:
564
590
  self.api.get_notifications_timeline_with_http_info,
565
591
  self.flag["NotificationsTimeline"],
566
592
  self.ct,
567
- lambda e: error_check(
568
- e.data.viewer_v2.user_results.result.notification_timeline.timeline, e.errors
569
- ).instructions,
593
+ lambda e: (
594
+ error_check(e.data.viewer_v2.user_results.result.notification_timeline.timeline, e.errors).instructions
595
+ ),
570
596
  param,
571
597
  notification_entries_converter,
572
598
  )
@@ -655,9 +681,9 @@ class TweetApiUtils:
655
681
 
656
682
  response = self.request(
657
683
  apiFn=self.api.get_bookmark_search_timeline_with_http_info,
658
- convertFn=lambda e: error_check(
659
- e.data.search_by_raw_query.bookmarks_search_timeline.timeline, e.errors
660
- ).instructions,
684
+ convertFn=lambda e: (
685
+ error_check(e.data.search_by_raw_query.bookmarks_search_timeline.timeline, e.errors).instructions
686
+ ),
661
687
  key="BookmarkSearchTimeline",
662
688
  param=param,
663
689
  )
@@ -80,6 +80,23 @@ class UserApiUtils:
80
80
  param=param,
81
81
  )
82
82
 
83
+ def get_about_account_query(
84
+ self,
85
+ screen_name: str,
86
+ extra_param: Optional[ParamType] = None,
87
+ ) -> TwitterApiUtilsResponse[models.AboutAccountUser]:
88
+ """The "About this account" panel: join date, where the account is based, username changes, verification."""
89
+ param: ParamType = {"screenName": screen_name}
90
+ if extra_param is not None:
91
+ param.update(extra_param)
92
+ return data_request(
93
+ self.api.get_about_account_query_with_http_info,
94
+ self.flag["AboutAccountQuery"],
95
+ self.ct,
96
+ lambda e: error_check(e.data, e.errors).user_result_by_screen_name.result,
97
+ param,
98
+ )
99
+
83
100
  def get_viewer_badge_counts(
84
101
  self,
85
102
  extra_param: Optional[ParamType] = None,
@@ -66,7 +66,9 @@ class UserListApiUtils:
66
66
  param.update(extra_param)
67
67
  return self.request(
68
68
  apiFn=self.api.get_followers_with_http_info,
69
- convertFn=lambda e: error_check(e.data.user, e.errors).result.timeline.timeline.instructions,
69
+ convertFn=lambda e: (
70
+ error_check(error_check(e.data.user, e.errors).result.timeline, e.errors).timeline.instructions
71
+ ),
70
72
  key="Followers",
71
73
  param=param,
72
74
  )
@@ -87,7 +89,9 @@ class UserListApiUtils:
87
89
  param.update(extra_param)
88
90
  return self.request(
89
91
  apiFn=self.api.get_following_with_http_info,
90
- convertFn=lambda e: error_check(e.data.user, e.errors).result.timeline.timeline.instructions,
92
+ convertFn=lambda e: (
93
+ error_check(error_check(e.data.user, e.errors).result.timeline, e.errors).timeline.instructions
94
+ ),
91
95
  key="Following",
92
96
  param=param,
93
97
  )
@@ -108,7 +112,9 @@ class UserListApiUtils:
108
112
  param.update(extra_param)
109
113
  return self.request(
110
114
  apiFn=self.api.get_followers_you_know_with_http_info,
111
- convertFn=lambda e: error_check(e.data.user, e.errors).result.timeline.timeline.instructions,
115
+ convertFn=lambda e: (
116
+ error_check(error_check(e.data.user, e.errors).result.timeline, e.errors).timeline.instructions
117
+ ),
112
118
  key="FollowersYouKnow",
113
119
  param=param,
114
120
  )
@@ -129,9 +135,9 @@ class UserListApiUtils:
129
135
  param.update(extra_param)
130
136
  return self.request(
131
137
  apiFn=self.api.get_favoriters_with_http_info,
132
- convertFn=lambda e: error_check(
133
- error_check(e.data.favoriters_timeline, e.errors).timeline, e.errors
134
- ).instructions,
138
+ convertFn=lambda e: (
139
+ error_check(error_check(e.data.favoriters_timeline, e.errors).timeline, e.errors).instructions
140
+ ),
135
141
  key="Favoriters",
136
142
  param=param,
137
143
  )
@@ -152,9 +158,9 @@ class UserListApiUtils:
152
158
  param.update(extra_param)
153
159
  return self.request(
154
160
  apiFn=self.api.get_retweeters_with_http_info,
155
- convertFn=lambda e: error_check(
156
- error_check(e.data.retweeters_timeline, e.errors).timeline, e.errors
157
- ).instructions,
161
+ convertFn=lambda e: (
162
+ error_check(error_check(e.data.retweeters_timeline, e.errors).timeline, e.errors).instructions
163
+ ),
158
164
  key="Retweeters",
159
165
  param=param,
160
166
  )
@@ -175,7 +181,9 @@ class UserListApiUtils:
175
181
  param.update(extra_param)
176
182
  return self.request(
177
183
  apiFn=self.api.get_blue_verified_followers_with_http_info,
178
- convertFn=lambda e: error_check(e.data.user, e.errors).result.timeline.timeline.instructions,
184
+ convertFn=lambda e: (
185
+ error_check(error_check(e.data.user, e.errors).result.timeline, e.errors).timeline.instructions
186
+ ),
179
187
  key="BlueVerifiedFollowers",
180
188
  param=param,
181
189
  )
@@ -282,7 +290,11 @@ class UserListApiUtils:
282
290
  self.api.get_list_ownerships_with_http_info,
283
291
  self.flag["ListOwnerships"],
284
292
  self.ct,
285
- lambda e: error_check(error_check(e.data.user, e.errors).result.timeline.timeline, e.errors).instructions,
293
+ lambda e: (
294
+ error_check(
295
+ error_check(error_check(e.data.user, e.errors).result.timeline, e.errors).timeline, e.errors
296
+ ).instructions
297
+ ),
286
298
  param,
287
299
  list_entries_converter,
288
300
  )
@@ -345,7 +357,11 @@ class UserListApiUtils:
345
357
  self.api.get_combined_lists_with_http_info,
346
358
  self.flag["CombinedLists"],
347
359
  self.ct,
348
- lambda e: error_check(error_check(e.data.user, e.errors).result.timeline.timeline, e.errors).instructions,
360
+ lambda e: (
361
+ error_check(
362
+ error_check(error_check(e.data.user, e.errors).result.timeline, e.errors).timeline, e.errors
363
+ ).instructions
364
+ ),
349
365
  param,
350
366
  list_entries_converter,
351
367
  )
@@ -72,3 +72,20 @@ class UsersApiUtils:
72
72
  lambda e: [x.result for x in error_check(e.data, e.errors).users_results],
73
73
  param,
74
74
  )
75
+
76
+ def get_sidebar_user_recommendations(
77
+ self,
78
+ profile_user_id: str,
79
+ extra_param: Optional[ParamType] = None,
80
+ ) -> TwitterApiUtilsResponse[list[models.SidebarUserRecommendation]]:
81
+ """Who to follow, shown in the sidebar of a profile, each with its recommendation token."""
82
+ param: ParamType = {"profileUserId": profile_user_id}
83
+ if extra_param is not None:
84
+ param.update(extra_param)
85
+ return data_request(
86
+ self.api.get_sidebar_user_recommendations_with_http_info,
87
+ self.flag["SidebarUserRecommendations"],
88
+ self.ct,
89
+ lambda e: error_check(e.data, e.errors).sidebar_user_recommendations,
90
+ param,
91
+ )
@@ -69,7 +69,7 @@ class TwitterOpenapiPythonClient:
69
69
 
70
70
 
71
71
  class TwitterOpenapiPython:
72
- hash: str = "127fa210d7f9b0252276c86a1860a7db816d9d69"
72
+ hash: str = "82d12f1e93e93cd283534f6abb4102bf7dc31c74"
73
73
  placeholder_url = "https://raw.githubusercontent.com/fa0311/twitter-openapi/{hash}/src/config/placeholder.json"
74
74
  header = "https://raw.githubusercontent.com/fa0311/latest-user-agent/refs/heads/main/header.json"
75
75
  access_token: str = (