twitter-openapi-python-generated 0.0.30__py3-none-any.whl → 0.0.31__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.
@@ -15,7 +15,7 @@
15
15
  """ # noqa: E501
16
16
 
17
17
 
18
- __version__ = "0.0.30"
18
+ __version__ = "0.0.31"
19
19
 
20
20
  # import apis into sdk package
21
21
  from twitter_openapi_python_generated.api.default_api import DefaultApi
@@ -19,6 +19,7 @@ from typing_extensions import Annotated
19
19
 
20
20
  from pydantic import StrictStr
21
21
  from twitter_openapi_python_generated.models.profile_response import ProfileResponse
22
+ from twitter_openapi_python_generated.models.tweet_result_by_rest_id_response import TweetResultByRestIdResponse
22
23
 
23
24
  from twitter_openapi_python_generated.api_client import ApiClient, RequestSerialized
24
25
  from twitter_openapi_python_generated.api_response import ApiResponse
@@ -353,3 +354,337 @@ class DefaultApi:
353
354
  )
354
355
 
355
356
 
357
+
358
+
359
+ @validate_call
360
+ def get_tweet_result_by_rest_id(
361
+ self,
362
+ path_query_id: StrictStr,
363
+ variables: StrictStr,
364
+ features: StrictStr,
365
+ field_toggles: StrictStr,
366
+ _request_timeout: Union[
367
+ None,
368
+ Annotated[StrictFloat, Field(gt=0)],
369
+ Tuple[
370
+ Annotated[StrictFloat, Field(gt=0)],
371
+ Annotated[StrictFloat, Field(gt=0)]
372
+ ]
373
+ ] = None,
374
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
375
+ _content_type: Optional[StrictStr] = None,
376
+ _headers: Optional[Dict[StrictStr, Any]] = None,
377
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
378
+ ) -> TweetResultByRestIdResponse:
379
+ """get_tweet_result_by_rest_id
380
+
381
+ get TweetResultByRestId
382
+
383
+ :param path_query_id: (required)
384
+ :type path_query_id: str
385
+ :param variables: (required)
386
+ :type variables: str
387
+ :param features: (required)
388
+ :type features: str
389
+ :param field_toggles: (required)
390
+ :type field_toggles: str
391
+ :param _request_timeout: timeout setting for this request. If one
392
+ number provided, it will be total request
393
+ timeout. It can also be a pair (tuple) of
394
+ (connection, read) timeouts.
395
+ :type _request_timeout: int, tuple(int, int), optional
396
+ :param _request_auth: set to override the auth_settings for an a single
397
+ request; this effectively ignores the
398
+ authentication in the spec for a single request.
399
+ :type _request_auth: dict, optional
400
+ :param _content_type: force content-type for the request.
401
+ :type _content_type: str, Optional
402
+ :param _headers: set to override the headers for a single
403
+ request; this effectively ignores the headers
404
+ in the spec for a single request.
405
+ :type _headers: dict, optional
406
+ :param _host_index: set to override the host_index for a single
407
+ request; this effectively ignores the host_index
408
+ in the spec for a single request.
409
+ :type _host_index: int, optional
410
+ :return: Returns the result object.
411
+ """ # noqa: E501
412
+
413
+ _param = self._get_tweet_result_by_rest_id_serialize(
414
+ path_query_id=path_query_id,
415
+ variables=variables,
416
+ features=features,
417
+ field_toggles=field_toggles,
418
+ _request_auth=_request_auth,
419
+ _content_type=_content_type,
420
+ _headers=_headers,
421
+ _host_index=_host_index
422
+ )
423
+
424
+ _response_types_map: Dict[str, Optional[str]] = {
425
+ '200': "TweetResultByRestIdResponse",
426
+ }
427
+ response_data = self.api_client.call_api(
428
+ *_param,
429
+ _request_timeout=_request_timeout
430
+ )
431
+ response_data.read()
432
+ return self.api_client.response_deserialize(
433
+ response_data=response_data,
434
+ response_types_map=_response_types_map,
435
+ ).data
436
+
437
+
438
+ @validate_call
439
+ def get_tweet_result_by_rest_id_with_http_info(
440
+ self,
441
+ path_query_id: StrictStr,
442
+ variables: StrictStr,
443
+ features: StrictStr,
444
+ field_toggles: StrictStr,
445
+ _request_timeout: Union[
446
+ None,
447
+ Annotated[StrictFloat, Field(gt=0)],
448
+ Tuple[
449
+ Annotated[StrictFloat, Field(gt=0)],
450
+ Annotated[StrictFloat, Field(gt=0)]
451
+ ]
452
+ ] = None,
453
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
454
+ _content_type: Optional[StrictStr] = None,
455
+ _headers: Optional[Dict[StrictStr, Any]] = None,
456
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
457
+ ) -> ApiResponse[TweetResultByRestIdResponse]:
458
+ """get_tweet_result_by_rest_id
459
+
460
+ get TweetResultByRestId
461
+
462
+ :param path_query_id: (required)
463
+ :type path_query_id: str
464
+ :param variables: (required)
465
+ :type variables: str
466
+ :param features: (required)
467
+ :type features: str
468
+ :param field_toggles: (required)
469
+ :type field_toggles: str
470
+ :param _request_timeout: timeout setting for this request. If one
471
+ number provided, it will be total request
472
+ timeout. It can also be a pair (tuple) of
473
+ (connection, read) timeouts.
474
+ :type _request_timeout: int, tuple(int, int), optional
475
+ :param _request_auth: set to override the auth_settings for an a single
476
+ request; this effectively ignores the
477
+ authentication in the spec for a single request.
478
+ :type _request_auth: dict, optional
479
+ :param _content_type: force content-type for the request.
480
+ :type _content_type: str, Optional
481
+ :param _headers: set to override the headers for a single
482
+ request; this effectively ignores the headers
483
+ in the spec for a single request.
484
+ :type _headers: dict, optional
485
+ :param _host_index: set to override the host_index for a single
486
+ request; this effectively ignores the host_index
487
+ in the spec for a single request.
488
+ :type _host_index: int, optional
489
+ :return: Returns the result object.
490
+ """ # noqa: E501
491
+
492
+ _param = self._get_tweet_result_by_rest_id_serialize(
493
+ path_query_id=path_query_id,
494
+ variables=variables,
495
+ features=features,
496
+ field_toggles=field_toggles,
497
+ _request_auth=_request_auth,
498
+ _content_type=_content_type,
499
+ _headers=_headers,
500
+ _host_index=_host_index
501
+ )
502
+
503
+ _response_types_map: Dict[str, Optional[str]] = {
504
+ '200': "TweetResultByRestIdResponse",
505
+ }
506
+ response_data = self.api_client.call_api(
507
+ *_param,
508
+ _request_timeout=_request_timeout
509
+ )
510
+ response_data.read()
511
+ return self.api_client.response_deserialize(
512
+ response_data=response_data,
513
+ response_types_map=_response_types_map,
514
+ )
515
+
516
+
517
+ @validate_call
518
+ def get_tweet_result_by_rest_id_without_preload_content(
519
+ self,
520
+ path_query_id: StrictStr,
521
+ variables: StrictStr,
522
+ features: StrictStr,
523
+ field_toggles: StrictStr,
524
+ _request_timeout: Union[
525
+ None,
526
+ Annotated[StrictFloat, Field(gt=0)],
527
+ Tuple[
528
+ Annotated[StrictFloat, Field(gt=0)],
529
+ Annotated[StrictFloat, Field(gt=0)]
530
+ ]
531
+ ] = None,
532
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
533
+ _content_type: Optional[StrictStr] = None,
534
+ _headers: Optional[Dict[StrictStr, Any]] = None,
535
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
536
+ ) -> RESTResponseType:
537
+ """get_tweet_result_by_rest_id
538
+
539
+ get TweetResultByRestId
540
+
541
+ :param path_query_id: (required)
542
+ :type path_query_id: str
543
+ :param variables: (required)
544
+ :type variables: str
545
+ :param features: (required)
546
+ :type features: str
547
+ :param field_toggles: (required)
548
+ :type field_toggles: str
549
+ :param _request_timeout: timeout setting for this request. If one
550
+ number provided, it will be total request
551
+ timeout. It can also be a pair (tuple) of
552
+ (connection, read) timeouts.
553
+ :type _request_timeout: int, tuple(int, int), optional
554
+ :param _request_auth: set to override the auth_settings for an a single
555
+ request; this effectively ignores the
556
+ authentication in the spec for a single request.
557
+ :type _request_auth: dict, optional
558
+ :param _content_type: force content-type for the request.
559
+ :type _content_type: str, Optional
560
+ :param _headers: set to override the headers for a single
561
+ request; this effectively ignores the headers
562
+ in the spec for a single request.
563
+ :type _headers: dict, optional
564
+ :param _host_index: set to override the host_index for a single
565
+ request; this effectively ignores the host_index
566
+ in the spec for a single request.
567
+ :type _host_index: int, optional
568
+ :return: Returns the result object.
569
+ """ # noqa: E501
570
+
571
+ _param = self._get_tweet_result_by_rest_id_serialize(
572
+ path_query_id=path_query_id,
573
+ variables=variables,
574
+ features=features,
575
+ field_toggles=field_toggles,
576
+ _request_auth=_request_auth,
577
+ _content_type=_content_type,
578
+ _headers=_headers,
579
+ _host_index=_host_index
580
+ )
581
+
582
+ _response_types_map: Dict[str, Optional[str]] = {
583
+ '200': "TweetResultByRestIdResponse",
584
+ }
585
+ response_data = self.api_client.call_api(
586
+ *_param,
587
+ _request_timeout=_request_timeout
588
+ )
589
+ return response_data.response
590
+
591
+
592
+ def _get_tweet_result_by_rest_id_serialize(
593
+ self,
594
+ path_query_id,
595
+ variables,
596
+ features,
597
+ field_toggles,
598
+ _request_auth,
599
+ _content_type,
600
+ _headers,
601
+ _host_index,
602
+ ) -> RequestSerialized:
603
+
604
+ _host = None
605
+
606
+ _collection_formats: Dict[str, str] = {
607
+ }
608
+
609
+ _path_params: Dict[str, str] = {}
610
+ _query_params: List[Tuple[str, str]] = []
611
+ _header_params: Dict[str, Optional[str]] = _headers or {}
612
+ _form_params: List[Tuple[str, str]] = []
613
+ _files: Dict[
614
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
615
+ ] = {}
616
+ _body_params: Optional[bytes] = None
617
+
618
+ # process the path parameters
619
+ if path_query_id is not None:
620
+ _path_params['pathQueryId'] = path_query_id
621
+ # process the query parameters
622
+ if variables is not None:
623
+
624
+ _query_params.append(('variables', variables))
625
+
626
+ if features is not None:
627
+
628
+ _query_params.append(('features', features))
629
+
630
+ if field_toggles is not None:
631
+
632
+ _query_params.append(('fieldToggles', field_toggles))
633
+
634
+ # process the header parameters
635
+ # process the form parameters
636
+ # process the body parameter
637
+
638
+
639
+ # set the HTTP header `Accept`
640
+ if 'Accept' not in _header_params:
641
+ _header_params['Accept'] = self.api_client.select_header_accept(
642
+ [
643
+ 'application/json'
644
+ ]
645
+ )
646
+
647
+
648
+ # authentication setting
649
+ _auth_settings: List[str] = [
650
+ 'Accept',
651
+ 'ClientLanguage',
652
+ 'Priority',
653
+ 'Referer',
654
+ 'SecFetchDest',
655
+ 'SecChUaPlatform',
656
+ 'SecFetchMode',
657
+ 'CsrfToken',
658
+ 'ClientUuid',
659
+ 'BearerAuth',
660
+ 'GuestToken',
661
+ 'SecChUa',
662
+ 'CookieGt0',
663
+ 'ClientTransactionId',
664
+ 'ActiveUser',
665
+ 'CookieCt0',
666
+ 'UserAgent',
667
+ 'AcceptLanguage',
668
+ 'SecFetchSite',
669
+ 'AuthType',
670
+ 'CookieAuthToken',
671
+ 'SecChUaMobile',
672
+ 'AcceptEncoding'
673
+ ]
674
+
675
+ return self.api_client.param_serialize(
676
+ method='GET',
677
+ resource_path='/graphql/{pathQueryId}/TweetResultByRestId',
678
+ path_params=_path_params,
679
+ query_params=_query_params,
680
+ header_params=_header_params,
681
+ body=_body_params,
682
+ post_params=_form_params,
683
+ files=_files,
684
+ auth_settings=_auth_settings,
685
+ collection_formats=_collection_formats,
686
+ _host=_host,
687
+ _request_auth=_request_auth
688
+ )
689
+
690
+
@@ -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.30/python'
94
+ self.user_agent = 'OpenAPI-Generator/0.0.31/python'
95
95
  self.client_side_validation = configuration.client_side_validation
96
96
 
97
97
  def __enter__(self):
@@ -750,7 +750,7 @@ conf = twitter_openapi_python_generated.Configuration(
750
750
  "OS: {env}\n"\
751
751
  "Python Version: {pyversion}\n"\
752
752
  "Version of the API: 0.0.1\n"\
753
- "SDK Package Version: 0.0.30".\
753
+ "SDK Package Version: 0.0.31".\
754
754
  format(env=sys.platform, pyversion=sys.version)
755
755
 
756
756
  def get_host_settings(self) -> List[HostSetting]:
@@ -39,6 +39,7 @@ class TypeName(str, Enum):
39
39
  TIMELINEMESSAGEPROMPT = 'TimelineMessagePrompt'
40
40
  TIMELINECOMMUNITY = 'TimelineCommunity'
41
41
  TIMELINETOMBSTONE = 'TimelineTombstone'
42
+ TIMELINETREND = 'TimelineTrend'
42
43
  TWEETUNAVAILABLE = 'TweetUnavailable'
43
44
  TWEETPREVIEWDISPLAY = 'TweetPreviewDisplay'
44
45
  TWEET = 'Tweet'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: twitter_openapi_python_generated
3
- Version: 0.0.30
3
+ Version: 0.0.31
4
4
  Summary: Twitter OpenAPI
5
5
  Home-page: https://github.com/fa0311/twitter_openapi_python_generated
6
6
  Author: OpenAPI Generator community
@@ -1,12 +1,12 @@
1
- twitter_openapi_python_generated/__init__.py,sha256=nQuYAF-hus1buVDdQcz9HBp94y0N197Jdt3683DCWfo,28996
2
- twitter_openapi_python_generated/api_client.py,sha256=4Km6gsWPDeAhtl3TsQnFdO8cgg-iqOGb-Fg62FU2nh8,27554
1
+ twitter_openapi_python_generated/__init__.py,sha256=dKqs3Pc8Scb_DyDglhf0E1YNgMt9GTrhtRhFq6SmGZM,28996
2
+ twitter_openapi_python_generated/api_client.py,sha256=EGIq-YCRupa9v5P7X-lDBs7tiaHFYpsgAqKQjbV2W3g,27554
3
3
  twitter_openapi_python_generated/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
4
- twitter_openapi_python_generated/configuration.py,sha256=sMnMD90FPLXijOioD0N3Nt1nPdMkLYVySyejQj7DqN0,26664
4
+ twitter_openapi_python_generated/configuration.py,sha256=ueBLkCqGrsuG_Fxqtr8wuswcXKEjYxU-XXboheRwIpI,26664
5
5
  twitter_openapi_python_generated/exceptions.py,sha256=DLusUo_Nzgjil6GG-rp3ebZfASQU6iIjCDT40sD94h8,6442
6
6
  twitter_openapi_python_generated/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  twitter_openapi_python_generated/rest.py,sha256=yKdXzZOrUl8wM8FUaRqV_0Ahv1m2KEPfQUfXl-nyFUQ,9457
8
8
  twitter_openapi_python_generated/api/__init__.py,sha256=zAml0EP4OMYX4VTZR71tgo7_oX_o2hiISFm9bbEnmms,746
9
- twitter_openapi_python_generated/api/default_api.py,sha256=U-SBfD3RuTSjkDEM-PAw1OjshqQNi69Z-VaJM8pBdMk,12773
9
+ twitter_openapi_python_generated/api/default_api.py,sha256=1aldDxki1z-Owp_oigXvo4GuJdvqV-uljj5WpFfRjOk,25151
10
10
  twitter_openapi_python_generated/api/other_api.py,sha256=ttrHkc03YYjkZpIUquHlbYNteul2FuO6h-fxq1Exnbg,10891
11
11
  twitter_openapi_python_generated/api/post_api.py,sha256=Cm5DJ0bCAFt_gf7SrOiu3XBecASOdwtJEOKYmz7pTUc,98840
12
12
  twitter_openapi_python_generated/api/tweet_api.py,sha256=aSlLf6ELiZhiuecTZIMGrZe5vyP17AZU8Al8gE8dVSE,132457
@@ -261,7 +261,7 @@ twitter_openapi_python_generated/models/tweet_unavailable.py,sha256=Kv9bSrKIOj1o
261
261
  twitter_openapi_python_generated/models/tweet_union.py,sha256=G-JbR8YurkcCzUmlkOshLliX0scQf_SAaFn50QU6yYM,9197
262
262
  twitter_openapi_python_generated/models/tweet_view.py,sha256=v4_oJaSdMmELaGV-8kRxlTY0TDBuGmNQgW4SqfTZHG4,3223
263
263
  twitter_openapi_python_generated/models/tweet_with_visibility_results.py,sha256=rrJpjig_F74MyXJHEdtiZAkQ8Le7wCC5R8hnuv9k6cc,4454
264
- twitter_openapi_python_generated/models/type_name.py,sha256=yrLXA04It36W5SWG2_m7WF1xSKatyuT-H2S0SLrAm0M,2018
264
+ twitter_openapi_python_generated/models/type_name.py,sha256=bHTOlnXy5deOsgrxxbjGhaMM6eoAYM350_xZZxVQ-o0,2054
265
265
  twitter_openapi_python_generated/models/unfavorite_tweet.py,sha256=BdbFDu-0E3VprCfIupdgkpoHBo1VFwfWeV5Y7EwfVPc,2522
266
266
  twitter_openapi_python_generated/models/unfavorite_tweet_response.py,sha256=DlVCIy2bysAvU8sQ-hb8JQVtQgZ1k80yB8vgSSewnDo,3374
267
267
  twitter_openapi_python_generated/models/unified_card.py,sha256=Pg3HjE0YsfZBkBjaOGkh9MhaqQQ7FWhGxE-ryFjp7W8,2755
@@ -303,9 +303,9 @@ twitter_openapi_python_generated/models/user_verification_info_reason_descriptio
303
303
  twitter_openapi_python_generated/models/user_verification_info_reason_description_entities_ref.py,sha256=di6U-pbh04SsZ2dZjyB2rZrnyJraU_ZjLFau8_IHKwI,2926
304
304
  twitter_openapi_python_generated/models/users_response.py,sha256=UGep5Yb1SGXGVIMABf0DhrIuDMLKwCf69QYpNjlr5rQ,3343
305
305
  twitter_openapi_python_generated/models/users_response_data.py,sha256=XTiDXvnyT5hBzzI8Dqs_vM5EoTJchlCOLaM_A2XVQhc,2957
306
- twitter_openapi_python_generated-0.0.30.dist-info/LICENSE,sha256=xthyYzrtSmRlBu2gnfuIxzsZeHrqtIZgZPL9UPrYiQU,1524
307
- twitter_openapi_python_generated-0.0.30.dist-info/LICENSE.AGPL,sha256=Nv6u1ubULm-E2y6q2-pQPK8s2BzkOltLaVlPKQ3tkcs,35182
308
- twitter_openapi_python_generated-0.0.30.dist-info/METADATA,sha256=DQNPFzU2E9nXzN1eQNw0L5mq3bfz1XtbR9x7SBfaASY,637
309
- twitter_openapi_python_generated-0.0.30.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
310
- twitter_openapi_python_generated-0.0.30.dist-info/top_level.txt,sha256=_HJ3iFAuiS8tEZxA90EesWYeEj6OB4-sNr_c8tj1uWg,33
311
- twitter_openapi_python_generated-0.0.30.dist-info/RECORD,,
306
+ twitter_openapi_python_generated-0.0.31.dist-info/LICENSE,sha256=xthyYzrtSmRlBu2gnfuIxzsZeHrqtIZgZPL9UPrYiQU,1524
307
+ twitter_openapi_python_generated-0.0.31.dist-info/LICENSE.AGPL,sha256=Nv6u1ubULm-E2y6q2-pQPK8s2BzkOltLaVlPKQ3tkcs,35182
308
+ twitter_openapi_python_generated-0.0.31.dist-info/METADATA,sha256=gHfbfA_B10RAS1vGEDrS8dHhSY2GhHUPcKO9WNGG9w0,637
309
+ twitter_openapi_python_generated-0.0.31.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
310
+ twitter_openapi_python_generated-0.0.31.dist-info/top_level.txt,sha256=_HJ3iFAuiS8tEZxA90EesWYeEj6OB4-sNr_c8tj1uWg,33
311
+ twitter_openapi_python_generated-0.0.31.dist-info/RECORD,,