twitter-openapi-python-generated 0.1.1__py3-none-any.whl → 0.1.3__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.
Files changed (223) hide show
  1. twitter_openapi_python_generated/__init__.py +323 -1
  2. twitter_openapi_python_generated/api/__init__.py +2 -0
  3. twitter_openapi_python_generated/api/birdwatch_api.py +1609 -0
  4. twitter_openapi_python_generated/api/community_api.py +1910 -0
  5. twitter_openapi_python_generated/api/default_api.py +2831 -71
  6. twitter_openapi_python_generated/api/tweet_api.py +778 -142
  7. twitter_openapi_python_generated/api/user_api.py +301 -0
  8. twitter_openapi_python_generated/api/user_list_api.py +1145 -192
  9. twitter_openapi_python_generated/api/users_api.py +655 -19
  10. twitter_openapi_python_generated/api_client.py +1 -1
  11. twitter_openapi_python_generated/configuration.py +1 -1
  12. twitter_openapi_python_generated/models/__init__.py +159 -0
  13. twitter_openapi_python_generated/models/about_account_data.py +93 -0
  14. twitter_openapi_python_generated/models/about_account_response.py +102 -0
  15. twitter_openapi_python_generated/models/about_account_user.py +161 -0
  16. twitter_openapi_python_generated/models/about_account_user_result.py +95 -0
  17. twitter_openapi_python_generated/models/about_account_verification_info.py +95 -0
  18. twitter_openapi_python_generated/models/about_account_verification_info_reason.py +99 -0
  19. twitter_openapi_python_generated/models/about_profile.py +103 -0
  20. twitter_openapi_python_generated/models/about_profile_username_changes.py +109 -0
  21. twitter_openapi_python_generated/models/ad_metadata_container.py +5 -3
  22. twitter_openapi_python_generated/models/ai_trend.py +126 -0
  23. twitter_openapi_python_generated/models/ai_trend_core.py +95 -0
  24. twitter_openapi_python_generated/models/ai_trend_results.py +95 -0
  25. twitter_openapi_python_generated/models/ai_trend_social_proof.py +89 -0
  26. twitter_openapi_python_generated/models/article_content_block.py +117 -0
  27. twitter_openapi_python_generated/models/article_content_block_data.py +104 -0
  28. twitter_openapi_python_generated/models/article_content_entity.py +95 -0
  29. twitter_openapi_python_generated/models/article_content_entity_data.py +115 -0
  30. twitter_openapi_python_generated/models/article_content_entity_range.py +93 -0
  31. twitter_openapi_python_generated/models/article_content_entity_value.py +104 -0
  32. twitter_openapi_python_generated/models/article_content_inline_style_range.py +100 -0
  33. twitter_openapi_python_generated/models/article_content_media_item.py +101 -0
  34. twitter_openapi_python_generated/models/article_content_state.py +105 -0
  35. twitter_openapi_python_generated/models/article_content_text_range.py +93 -0
  36. twitter_openapi_python_generated/models/article_result.py +9 -3
  37. twitter_openapi_python_generated/models/audio_space.py +107 -0
  38. twitter_openapi_python_generated/models/audio_space_data.py +93 -0
  39. twitter_openapi_python_generated/models/audio_space_mentioned_user.py +97 -0
  40. twitter_openapi_python_generated/models/audio_space_metadata.py +165 -0
  41. twitter_openapi_python_generated/models/audio_space_participant.py +109 -0
  42. twitter_openapi_python_generated/models/audio_space_participant_user.py +104 -0
  43. twitter_openapi_python_generated/models/audio_space_participant_user_results.py +103 -0
  44. twitter_openapi_python_generated/models/audio_space_participant_verification.py +99 -0
  45. twitter_openapi_python_generated/models/audio_space_participants.py +114 -0
  46. twitter_openapi_python_generated/models/audio_space_response.py +102 -0
  47. twitter_openapi_python_generated/models/audio_space_sharings.py +91 -0
  48. twitter_openapi_python_generated/models/authenticate_periscope_response.py +102 -0
  49. twitter_openapi_python_generated/models/authenticate_periscope_response_data.py +89 -0
  50. twitter_openapi_python_generated/models/birdwatch_alias_self_select_status.py +91 -0
  51. twitter_openapi_python_generated/models/birdwatch_fetch_alias_self_select_status_response.py +102 -0
  52. twitter_openapi_python_generated/models/birdwatch_fetch_alias_self_select_status_response_data.py +93 -0
  53. twitter_openapi_python_generated/models/birdwatch_fetch_authenticated_user_profile_response.py +102 -0
  54. twitter_openapi_python_generated/models/birdwatch_fetch_authenticated_user_profile_response_data.py +93 -0
  55. twitter_openapi_python_generated/models/birdwatch_fetch_birdwatch_profile_response.py +102 -0
  56. twitter_openapi_python_generated/models/birdwatch_fetch_birdwatch_profile_response_data.py +93 -0
  57. twitter_openapi_python_generated/models/birdwatch_fetch_global_timeline_response.py +102 -0
  58. twitter_openapi_python_generated/models/birdwatch_fetch_global_timeline_response_data.py +93 -0
  59. twitter_openapi_python_generated/models/birdwatch_fetch_public_data_response.py +102 -0
  60. twitter_openapi_python_generated/models/birdwatch_fetch_public_data_response_data.py +93 -0
  61. twitter_openapi_python_generated/models/birdwatch_home_page.py +101 -0
  62. twitter_openapi_python_generated/models/birdwatch_home_page_body.py +104 -0
  63. twitter_openapi_python_generated/models/birdwatch_home_timeline.py +97 -0
  64. twitter_openapi_python_generated/models/birdwatch_pivot.py +0 -17
  65. twitter_openapi_python_generated/models/birdwatch_profile.py +89 -0
  66. twitter_openapi_python_generated/models/birdwatch_public_data_file.py +91 -0
  67. twitter_openapi_python_generated/models/birdwatch_public_data_file_bundle.py +113 -0
  68. twitter_openapi_python_generated/models/birdwatch_viewer.py +93 -0
  69. twitter_openapi_python_generated/models/bookmark_search.py +93 -0
  70. twitter_openapi_python_generated/models/bookmark_search_timeline_response.py +102 -0
  71. twitter_openapi_python_generated/models/bookmark_search_timeline_response_data.py +93 -0
  72. twitter_openapi_python_generated/models/broadcast.py +159 -0
  73. twitter_openapi_python_generated/models/broadcast_data.py +93 -0
  74. twitter_openapi_python_generated/models/broadcast_edited_replay.py +89 -0
  75. twitter_openapi_python_generated/models/broadcast_periscope_user.py +95 -0
  76. twitter_openapi_python_generated/models/broadcast_response.py +102 -0
  77. twitter_openapi_python_generated/models/cashtag_attachment.py +6 -4
  78. twitter_openapi_python_generated/models/client_event_info_details.py +8 -2
  79. twitter_openapi_python_generated/models/communities_fetch_one_query_response.py +102 -0
  80. twitter_openapi_python_generated/models/communities_fetch_one_query_response_data.py +93 -0
  81. twitter_openapi_python_generated/models/communities_search_query_response.py +102 -0
  82. twitter_openapi_python_generated/models/communities_search_query_response_data.py +93 -0
  83. twitter_openapi_python_generated/models/communities_search_slice.py +102 -0
  84. twitter_openapi_python_generated/models/community.py +2 -2
  85. twitter_openapi_python_generated/models/community_delete_action_result.py +1 -8
  86. twitter_openapi_python_generated/models/community_facepile_user.py +98 -0
  87. twitter_openapi_python_generated/models/community_facepile_user_results.py +95 -0
  88. twitter_openapi_python_generated/models/community_hashtag.py +91 -0
  89. twitter_openapi_python_generated/models/community_hashtag_slice.py +99 -0
  90. twitter_openapi_python_generated/models/community_id_user_results.py +95 -0
  91. twitter_openapi_python_generated/models/community_invites_result.py +1 -8
  92. twitter_openapi_python_generated/models/community_join_action_unavailable.py +1 -8
  93. twitter_openapi_python_generated/models/community_leave_action_result.py +1 -8
  94. twitter_openapi_python_generated/models/community_list_members_action_result.py +90 -0
  95. twitter_openapi_python_generated/models/community_page_actions.py +113 -0
  96. twitter_openapi_python_generated/models/community_page_community.py +187 -0
  97. twitter_openapi_python_generated/models/community_page_delete_action_result.py +94 -0
  98. twitter_openapi_python_generated/models/community_page_invites_result.py +96 -0
  99. twitter_openapi_python_generated/models/community_page_join_action_result.py +92 -0
  100. twitter_openapi_python_generated/models/community_page_leave_action_result.py +96 -0
  101. twitter_openapi_python_generated/models/community_page_pin_action_result.py +92 -0
  102. twitter_openapi_python_generated/models/community_page_results.py +95 -0
  103. twitter_openapi_python_generated/models/community_primary_topic_name.py +89 -0
  104. twitter_openapi_python_generated/models/community_query_response.py +102 -0
  105. twitter_openapi_python_generated/models/community_query_response_data.py +93 -0
  106. twitter_openapi_python_generated/models/community_relay_rule.py +103 -0
  107. twitter_openapi_python_generated/models/community_search_community.py +134 -0
  108. twitter_openapi_python_generated/models/community_search_results.py +95 -0
  109. twitter_openapi_python_generated/models/community_settings_actions.py +101 -0
  110. twitter_openapi_python_generated/models/community_settings_community.py +183 -0
  111. twitter_openapi_python_generated/models/community_settings_creator.py +106 -0
  112. twitter_openapi_python_generated/models/community_settings_creator_core.py +89 -0
  113. twitter_openapi_python_generated/models/community_settings_creator_results.py +95 -0
  114. twitter_openapi_python_generated/models/community_settings_creator_verification.py +89 -0
  115. twitter_openapi_python_generated/models/community_settings_invites_result.py +90 -0
  116. twitter_openapi_python_generated/models/community_settings_results.py +95 -0
  117. twitter_openapi_python_generated/models/community_subtopic.py +99 -0
  118. twitter_openapi_python_generated/models/community_topic.py +108 -0
  119. twitter_openapi_python_generated/models/community_topic_results.py +96 -0
  120. twitter_openapi_python_generated/models/content_item_type.py +1 -0
  121. twitter_openapi_python_generated/models/conversation_control.py +8 -1
  122. twitter_openapi_python_generated/models/conversation_details.py +1 -8
  123. twitter_openapi_python_generated/models/cover_cta.py +5 -15
  124. twitter_openapi_python_generated/models/creator_studio_tab_bar_item_query_response.py +102 -0
  125. twitter_openapi_python_generated/models/creator_studio_tab_bar_item_query_response_data.py +89 -0
  126. twitter_openapi_python_generated/models/cta_client_event_info.py +1 -8
  127. twitter_openapi_python_generated/models/cta_limited_action_prompt.py +1 -8
  128. twitter_openapi_python_generated/models/data_saver_mode_response.py +102 -0
  129. twitter_openapi_python_generated/models/data_saver_mode_response_data.py +89 -0
  130. twitter_openapi_python_generated/models/event_summary_ad_metadata_container.py +91 -0
  131. twitter_openapi_python_generated/models/event_summary_event.py +97 -0
  132. twitter_openapi_python_generated/models/event_summary_media.py +99 -0
  133. twitter_openapi_python_generated/models/event_summary_media_entity.py +95 -0
  134. twitter_openapi_python_generated/models/event_summary_media_key.py +91 -0
  135. twitter_openapi_python_generated/models/event_summary_promoted_metadata.py +117 -0
  136. twitter_openapi_python_generated/models/explore_sidebar_response.py +102 -0
  137. twitter_openapi_python_generated/models/explore_sidebar_response_data.py +93 -0
  138. twitter_openapi_python_generated/models/feedback_action.py +1 -28
  139. twitter_openapi_python_generated/models/global_communities_latest_post_search.py +93 -0
  140. twitter_openapi_python_generated/models/global_communities_latest_post_search_timeline_response.py +102 -0
  141. twitter_openapi_python_generated/models/global_communities_latest_post_search_timeline_response_data.py +93 -0
  142. twitter_openapi_python_generated/models/global_communities_post_search.py +93 -0
  143. twitter_openapi_python_generated/models/global_communities_post_search_timeline_response.py +102 -0
  144. twitter_openapi_python_generated/models/global_communities_post_search_timeline_response_data.py +93 -0
  145. twitter_openapi_python_generated/models/grok_account_jwt.py +89 -0
  146. twitter_openapi_python_generated/models/grok_account_jwt_data.py +93 -0
  147. twitter_openapi_python_generated/models/grok_account_jwt_response.py +102 -0
  148. twitter_openapi_python_generated/models/grok_entity_ref.py +19 -4
  149. twitter_openapi_python_generated/models/grok_home.py +114 -0
  150. twitter_openapi_python_generated/models/grok_home_layout.py +98 -0
  151. twitter_openapi_python_generated/models/grok_home_layout_section.py +98 -0
  152. twitter_openapi_python_generated/models/grok_home_prompt.py +99 -0
  153. twitter_openapi_python_generated/models/grok_home_response.py +102 -0
  154. twitter_openapi_python_generated/models/grok_home_response_data.py +93 -0
  155. twitter_openapi_python_generated/models/grok_image_annotation.py +2 -2
  156. twitter_openapi_python_generated/models/grok_model_option.py +103 -0
  157. twitter_openapi_python_generated/models/identity_profile_labels_highlighted_label.py +93 -0
  158. twitter_openapi_python_generated/models/item_content_union.py +27 -8
  159. twitter_openapi_python_generated/models/limited_action.py +8 -1
  160. twitter_openapi_python_generated/models/limited_action_results_data.py +8 -1
  161. twitter_openapi_python_generated/models/list_search.py +93 -0
  162. twitter_openapi_python_generated/models/list_search_timeline_response.py +102 -0
  163. twitter_openapi_python_generated/models/list_search_timeline_response_data.py +93 -0
  164. twitter_openapi_python_generated/models/lists_management_page_timeline_response.py +102 -0
  165. twitter_openapi_python_generated/models/lists_management_page_timeline_response_data.py +93 -0
  166. twitter_openapi_python_generated/models/lists_management_viewer.py +93 -0
  167. twitter_openapi_python_generated/models/media_result.py +1 -1
  168. twitter_openapi_python_generated/models/module_footer.py +1 -8
  169. twitter_openapi_python_generated/models/module_header.py +8 -9
  170. twitter_openapi_python_generated/models/note_tweet_result_data.py +2 -2
  171. twitter_openapi_python_generated/models/notification_details.py +91 -0
  172. twitter_openapi_python_generated/models/pinned_timelines.py +89 -0
  173. twitter_openapi_python_generated/models/pinned_timelines_response.py +102 -0
  174. twitter_openapi_python_generated/models/pinned_timelines_response_data.py +93 -0
  175. twitter_openapi_python_generated/models/promoted_trend.py +97 -0
  176. twitter_openapi_python_generated/models/rich_message.py +10 -1
  177. twitter_openapi_python_generated/models/rich_message_entity.py +97 -0
  178. twitter_openapi_python_generated/models/rich_message_entity_ref.py +117 -0
  179. twitter_openapi_python_generated/models/session.py +0 -7
  180. twitter_openapi_python_generated/models/sidebar_user_recommendation.py +95 -0
  181. twitter_openapi_python_generated/models/sidebar_user_recommendations_data.py +96 -0
  182. twitter_openapi_python_generated/models/sidebar_user_recommendations_response.py +102 -0
  183. twitter_openapi_python_generated/models/slice_info.py +89 -0
  184. twitter_openapi_python_generated/models/story_topic.py +95 -0
  185. twitter_openapi_python_generated/models/story_topic_data.py +93 -0
  186. twitter_openapi_python_generated/models/story_topic_item.py +93 -0
  187. twitter_openapi_python_generated/models/story_topic_response.py +102 -0
  188. twitter_openapi_python_generated/models/story_topic_stories.py +96 -0
  189. twitter_openapi_python_generated/models/timeline_event_summary.py +121 -0
  190. twitter_openapi_python_generated/models/timeline_general_context.py +2 -2
  191. twitter_openapi_python_generated/models/timeline_half_cover.py +0 -7
  192. twitter_openapi_python_generated/models/timeline_message_prompt_content.py +1 -8
  193. twitter_openapi_python_generated/models/timeline_prompt_content.py +1 -15
  194. twitter_openapi_python_generated/models/timeline_show_alert.py +1 -15
  195. twitter_openapi_python_generated/models/timeline_tombstone.py +1 -11
  196. twitter_openapi_python_generated/models/timeline_topic_context.py +1 -11
  197. twitter_openapi_python_generated/models/timeline_trend.py +9 -1
  198. twitter_openapi_python_generated/models/topic_carousel_query_response.py +102 -0
  199. twitter_openapi_python_generated/models/topic_carousel_query_response_data.py +93 -0
  200. twitter_openapi_python_generated/models/trend_metadata.py +3 -1
  201. twitter_openapi_python_generated/models/trend_promoted_metadata.py +111 -0
  202. twitter_openapi_python_generated/models/tweet.py +4 -2
  203. twitter_openapi_python_generated/models/tweet_card_legacy_binding_value_data.py +8 -1
  204. twitter_openapi_python_generated/models/tweet_card_platform_audience.py +1 -8
  205. twitter_openapi_python_generated/models/tweet_legacy.py +18 -3
  206. twitter_openapi_python_generated/models/tweet_legacy_place.py +107 -0
  207. twitter_openapi_python_generated/models/tweet_legacy_place_bounding_box.py +98 -0
  208. twitter_openapi_python_generated/models/tweet_legacy_point.py +98 -0
  209. twitter_openapi_python_generated/models/tweet_post_cta.py +1 -9
  210. twitter_openapi_python_generated/models/type_name.py +4 -0
  211. twitter_openapi_python_generated/models/unified_card.py +1 -8
  212. twitter_openapi_python_generated/models/user_highlights_tweets_result.py +2 -2
  213. twitter_openapi_python_generated/models/user_tweets_result_v1.py +2 -2
  214. twitter_openapi_python_generated/models/users_verified_avatars_response.py +102 -0
  215. twitter_openapi_python_generated/models/users_verified_avatars_response_data.py +96 -0
  216. twitter_openapi_python_generated/models/verified_avatar_user.py +112 -0
  217. twitter_openapi_python_generated/models/verified_avatar_user_results.py +93 -0
  218. {twitter_openapi_python_generated-0.1.1.dist-info → twitter_openapi_python_generated-0.1.3.dist-info}/METADATA +195 -9
  219. {twitter_openapi_python_generated-0.1.1.dist-info → twitter_openapi_python_generated-0.1.3.dist-info}/RECORD +223 -62
  220. {twitter_openapi_python_generated-0.1.1.dist-info → twitter_openapi_python_generated-0.1.3.dist-info}/WHEEL +0 -0
  221. {twitter_openapi_python_generated-0.1.1.dist-info → twitter_openapi_python_generated-0.1.3.dist-info}/licenses/LICENSE +0 -0
  222. {twitter_openapi_python_generated-0.1.1.dist-info → twitter_openapi_python_generated-0.1.3.dist-info}/licenses/LICENSE.AGPL +0 -0
  223. {twitter_openapi_python_generated-0.1.1.dist-info → twitter_openapi_python_generated-0.1.3.dist-info}/top_level.txt +0 -0
@@ -17,7 +17,16 @@ from typing import Any, Dict, List, Optional, Tuple, Union
17
17
  from typing_extensions import Annotated
18
18
 
19
19
  from pydantic import StrictStr
20
+ from twitter_openapi_python_generated.models.audio_space_response import AudioSpaceResponse
21
+ from twitter_openapi_python_generated.models.authenticate_periscope_response import AuthenticatePeriscopeResponse
22
+ from twitter_openapi_python_generated.models.broadcast_response import BroadcastResponse
23
+ from twitter_openapi_python_generated.models.creator_studio_tab_bar_item_query_response import CreatorStudioTabBarItemQueryResponse
24
+ from twitter_openapi_python_generated.models.data_saver_mode_response import DataSaverModeResponse
25
+ from twitter_openapi_python_generated.models.grok_account_jwt_response import GrokAccountJwtResponse
26
+ from twitter_openapi_python_generated.models.grok_home_response import GrokHomeResponse
27
+ from twitter_openapi_python_generated.models.pinned_timelines_response import PinnedTimelinesResponse
20
28
  from twitter_openapi_python_generated.models.profile_response import ProfileResponse
29
+ from twitter_openapi_python_generated.models.story_topic_response import StoryTopicResponse
21
30
  from twitter_openapi_python_generated.models.tweet_result_by_rest_id_response import TweetResultByRestIdResponse
22
31
 
23
32
  from twitter_openapi_python_generated.api_client import ApiClient, RequestSerialized
@@ -38,6 +47,2457 @@ class DefaultApi:
38
47
  self.api_client = api_client
39
48
 
40
49
 
50
+ @validate_call
51
+ def get_audio_space_by_id(
52
+ self,
53
+ path_query_id: StrictStr,
54
+ variables: StrictStr,
55
+ features: StrictStr,
56
+ _request_timeout: Union[
57
+ None,
58
+ Annotated[StrictFloat, Field(gt=0)],
59
+ Tuple[
60
+ Annotated[StrictFloat, Field(gt=0)],
61
+ Annotated[StrictFloat, Field(gt=0)]
62
+ ]
63
+ ] = None,
64
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
65
+ _content_type: Optional[StrictStr] = None,
66
+ _headers: Optional[Dict[StrictStr, Any]] = None,
67
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
68
+ ) -> AudioSpaceResponse:
69
+ """get_audio_space_by_id
70
+
71
+ a Space by id: metadata, participants and the announcing post
72
+
73
+ :param path_query_id: (required)
74
+ :type path_query_id: str
75
+ :param variables: (required)
76
+ :type variables: str
77
+ :param features: (required)
78
+ :type features: str
79
+ :param _request_timeout: timeout setting for this request. If one
80
+ number provided, it will be total request
81
+ timeout. It can also be a pair (tuple) of
82
+ (connection, read) timeouts.
83
+ :type _request_timeout: int, tuple(int, int), optional
84
+ :param _request_auth: set to override the auth_settings for an a single
85
+ request; this effectively ignores the
86
+ authentication in the spec for a single request.
87
+ :type _request_auth: dict, optional
88
+ :param _content_type: force content-type for the request.
89
+ :type _content_type: str, Optional
90
+ :param _headers: set to override the headers for a single
91
+ request; this effectively ignores the headers
92
+ in the spec for a single request.
93
+ :type _headers: dict, optional
94
+ :param _host_index: set to override the host_index for a single
95
+ request; this effectively ignores the host_index
96
+ in the spec for a single request.
97
+ :type _host_index: int, optional
98
+ :return: Returns the result object.
99
+ """ # noqa: E501
100
+
101
+ _param = self._get_audio_space_by_id_serialize(
102
+ path_query_id=path_query_id,
103
+ variables=variables,
104
+ features=features,
105
+ _request_auth=_request_auth,
106
+ _content_type=_content_type,
107
+ _headers=_headers,
108
+ _host_index=_host_index
109
+ )
110
+
111
+ _response_types_map: Dict[str, Optional[str]] = {
112
+ '200': "AudioSpaceResponse",
113
+ }
114
+ response_data = self.api_client.call_api(
115
+ *_param,
116
+ _request_timeout=_request_timeout
117
+ )
118
+ response_data.read()
119
+ return self.api_client.response_deserialize(
120
+ response_data=response_data,
121
+ response_types_map=_response_types_map,
122
+ ).data
123
+
124
+
125
+ @validate_call
126
+ def get_audio_space_by_id_with_http_info(
127
+ self,
128
+ path_query_id: StrictStr,
129
+ variables: StrictStr,
130
+ features: StrictStr,
131
+ _request_timeout: Union[
132
+ None,
133
+ Annotated[StrictFloat, Field(gt=0)],
134
+ Tuple[
135
+ Annotated[StrictFloat, Field(gt=0)],
136
+ Annotated[StrictFloat, Field(gt=0)]
137
+ ]
138
+ ] = None,
139
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
140
+ _content_type: Optional[StrictStr] = None,
141
+ _headers: Optional[Dict[StrictStr, Any]] = None,
142
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
143
+ ) -> ApiResponse[AudioSpaceResponse]:
144
+ """get_audio_space_by_id
145
+
146
+ a Space by id: metadata, participants and the announcing post
147
+
148
+ :param path_query_id: (required)
149
+ :type path_query_id: str
150
+ :param variables: (required)
151
+ :type variables: str
152
+ :param features: (required)
153
+ :type features: str
154
+ :param _request_timeout: timeout setting for this request. If one
155
+ number provided, it will be total request
156
+ timeout. It can also be a pair (tuple) of
157
+ (connection, read) timeouts.
158
+ :type _request_timeout: int, tuple(int, int), optional
159
+ :param _request_auth: set to override the auth_settings for an a single
160
+ request; this effectively ignores the
161
+ authentication in the spec for a single request.
162
+ :type _request_auth: dict, optional
163
+ :param _content_type: force content-type for the request.
164
+ :type _content_type: str, Optional
165
+ :param _headers: set to override the headers for a single
166
+ request; this effectively ignores the headers
167
+ in the spec for a single request.
168
+ :type _headers: dict, optional
169
+ :param _host_index: set to override the host_index for a single
170
+ request; this effectively ignores the host_index
171
+ in the spec for a single request.
172
+ :type _host_index: int, optional
173
+ :return: Returns the result object.
174
+ """ # noqa: E501
175
+
176
+ _param = self._get_audio_space_by_id_serialize(
177
+ path_query_id=path_query_id,
178
+ variables=variables,
179
+ features=features,
180
+ _request_auth=_request_auth,
181
+ _content_type=_content_type,
182
+ _headers=_headers,
183
+ _host_index=_host_index
184
+ )
185
+
186
+ _response_types_map: Dict[str, Optional[str]] = {
187
+ '200': "AudioSpaceResponse",
188
+ }
189
+ response_data = self.api_client.call_api(
190
+ *_param,
191
+ _request_timeout=_request_timeout
192
+ )
193
+ response_data.read()
194
+ return self.api_client.response_deserialize(
195
+ response_data=response_data,
196
+ response_types_map=_response_types_map,
197
+ )
198
+
199
+
200
+ @validate_call
201
+ def get_audio_space_by_id_without_preload_content(
202
+ self,
203
+ path_query_id: StrictStr,
204
+ variables: StrictStr,
205
+ features: StrictStr,
206
+ _request_timeout: Union[
207
+ None,
208
+ Annotated[StrictFloat, Field(gt=0)],
209
+ Tuple[
210
+ Annotated[StrictFloat, Field(gt=0)],
211
+ Annotated[StrictFloat, Field(gt=0)]
212
+ ]
213
+ ] = None,
214
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
215
+ _content_type: Optional[StrictStr] = None,
216
+ _headers: Optional[Dict[StrictStr, Any]] = None,
217
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
218
+ ) -> RESTResponseType:
219
+ """get_audio_space_by_id
220
+
221
+ a Space by id: metadata, participants and the announcing post
222
+
223
+ :param path_query_id: (required)
224
+ :type path_query_id: str
225
+ :param variables: (required)
226
+ :type variables: str
227
+ :param features: (required)
228
+ :type features: str
229
+ :param _request_timeout: timeout setting for this request. If one
230
+ number provided, it will be total request
231
+ timeout. It can also be a pair (tuple) of
232
+ (connection, read) timeouts.
233
+ :type _request_timeout: int, tuple(int, int), optional
234
+ :param _request_auth: set to override the auth_settings for an a single
235
+ request; this effectively ignores the
236
+ authentication in the spec for a single request.
237
+ :type _request_auth: dict, optional
238
+ :param _content_type: force content-type for the request.
239
+ :type _content_type: str, Optional
240
+ :param _headers: set to override the headers for a single
241
+ request; this effectively ignores the headers
242
+ in the spec for a single request.
243
+ :type _headers: dict, optional
244
+ :param _host_index: set to override the host_index for a single
245
+ request; this effectively ignores the host_index
246
+ in the spec for a single request.
247
+ :type _host_index: int, optional
248
+ :return: Returns the result object.
249
+ """ # noqa: E501
250
+
251
+ _param = self._get_audio_space_by_id_serialize(
252
+ path_query_id=path_query_id,
253
+ variables=variables,
254
+ features=features,
255
+ _request_auth=_request_auth,
256
+ _content_type=_content_type,
257
+ _headers=_headers,
258
+ _host_index=_host_index
259
+ )
260
+
261
+ _response_types_map: Dict[str, Optional[str]] = {
262
+ '200': "AudioSpaceResponse",
263
+ }
264
+ response_data = self.api_client.call_api(
265
+ *_param,
266
+ _request_timeout=_request_timeout
267
+ )
268
+ return response_data.response
269
+
270
+
271
+ def _get_audio_space_by_id_serialize(
272
+ self,
273
+ path_query_id,
274
+ variables,
275
+ features,
276
+ _request_auth,
277
+ _content_type,
278
+ _headers,
279
+ _host_index,
280
+ ) -> RequestSerialized:
281
+
282
+ _host = None
283
+
284
+ _collection_formats: Dict[str, str] = {
285
+ }
286
+
287
+ _path_params: Dict[str, str] = {}
288
+ _query_params: List[Tuple[str, str]] = []
289
+ _header_params: Dict[str, Optional[str]] = _headers or {}
290
+ _form_params: List[Tuple[str, str]] = []
291
+ _files: Dict[
292
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
293
+ ] = {}
294
+ _body_params: Optional[bytes] = None
295
+
296
+ # process the path parameters
297
+ if path_query_id is not None:
298
+ _path_params['pathQueryId'] = path_query_id
299
+ # process the query parameters
300
+ if variables is not None:
301
+
302
+ _query_params.append(('variables', variables))
303
+
304
+ if features is not None:
305
+
306
+ _query_params.append(('features', features))
307
+
308
+ # process the header parameters
309
+ # process the form parameters
310
+ # process the body parameter
311
+
312
+
313
+ # set the HTTP header `Accept`
314
+ if 'Accept' not in _header_params:
315
+ _header_params['Accept'] = self.api_client.select_header_accept(
316
+ [
317
+ 'application/json'
318
+ ]
319
+ )
320
+
321
+
322
+ # authentication setting
323
+ _auth_settings: List[str] = [
324
+ 'Accept',
325
+ 'ClientLanguage',
326
+ 'Priority',
327
+ 'Referer',
328
+ 'SecFetchDest',
329
+ 'SecChUaPlatform',
330
+ 'SecFetchMode',
331
+ 'CsrfToken',
332
+ 'ClientUuid',
333
+ 'BearerAuth',
334
+ 'GuestToken',
335
+ 'SecChUa',
336
+ 'CookieGt0',
337
+ 'ClientTransactionId',
338
+ 'ActiveUser',
339
+ 'CookieCt0',
340
+ 'UserAgent',
341
+ 'AcceptLanguage',
342
+ 'SecFetchSite',
343
+ 'AuthType',
344
+ 'CookieAuthToken',
345
+ 'SecChUaMobile',
346
+ 'AcceptEncoding'
347
+ ]
348
+
349
+ return self.api_client.param_serialize(
350
+ method='GET',
351
+ resource_path='/graphql/{pathQueryId}/AudioSpaceById',
352
+ path_params=_path_params,
353
+ query_params=_query_params,
354
+ header_params=_header_params,
355
+ body=_body_params,
356
+ post_params=_form_params,
357
+ files=_files,
358
+ auth_settings=_auth_settings,
359
+ collection_formats=_collection_formats,
360
+ _host=_host,
361
+ _request_auth=_request_auth
362
+ )
363
+
364
+
365
+
366
+
367
+ @validate_call
368
+ def get_authenticate_periscope(
369
+ self,
370
+ path_query_id: StrictStr,
371
+ variables: StrictStr,
372
+ _request_timeout: Union[
373
+ None,
374
+ Annotated[StrictFloat, Field(gt=0)],
375
+ Tuple[
376
+ Annotated[StrictFloat, Field(gt=0)],
377
+ Annotated[StrictFloat, Field(gt=0)]
378
+ ]
379
+ ] = None,
380
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
381
+ _content_type: Optional[StrictStr] = None,
382
+ _headers: Optional[Dict[StrictStr, Any]] = None,
383
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
384
+ ) -> AuthenticatePeriscopeResponse:
385
+ """get_authenticate_periscope
386
+
387
+ a Periscope (live video) token for the account
388
+
389
+ :param path_query_id: (required)
390
+ :type path_query_id: str
391
+ :param variables: (required)
392
+ :type variables: str
393
+ :param _request_timeout: timeout setting for this request. If one
394
+ number provided, it will be total request
395
+ timeout. It can also be a pair (tuple) of
396
+ (connection, read) timeouts.
397
+ :type _request_timeout: int, tuple(int, int), optional
398
+ :param _request_auth: set to override the auth_settings for an a single
399
+ request; this effectively ignores the
400
+ authentication in the spec for a single request.
401
+ :type _request_auth: dict, optional
402
+ :param _content_type: force content-type for the request.
403
+ :type _content_type: str, Optional
404
+ :param _headers: set to override the headers for a single
405
+ request; this effectively ignores the headers
406
+ in the spec for a single request.
407
+ :type _headers: dict, optional
408
+ :param _host_index: set to override the host_index for a single
409
+ request; this effectively ignores the host_index
410
+ in the spec for a single request.
411
+ :type _host_index: int, optional
412
+ :return: Returns the result object.
413
+ """ # noqa: E501
414
+
415
+ _param = self._get_authenticate_periscope_serialize(
416
+ path_query_id=path_query_id,
417
+ variables=variables,
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': "AuthenticatePeriscopeResponse",
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_authenticate_periscope_with_http_info(
440
+ self,
441
+ path_query_id: StrictStr,
442
+ variables: StrictStr,
443
+ _request_timeout: Union[
444
+ None,
445
+ Annotated[StrictFloat, Field(gt=0)],
446
+ Tuple[
447
+ Annotated[StrictFloat, Field(gt=0)],
448
+ Annotated[StrictFloat, Field(gt=0)]
449
+ ]
450
+ ] = None,
451
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
452
+ _content_type: Optional[StrictStr] = None,
453
+ _headers: Optional[Dict[StrictStr, Any]] = None,
454
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
455
+ ) -> ApiResponse[AuthenticatePeriscopeResponse]:
456
+ """get_authenticate_periscope
457
+
458
+ a Periscope (live video) token for the account
459
+
460
+ :param path_query_id: (required)
461
+ :type path_query_id: str
462
+ :param variables: (required)
463
+ :type variables: str
464
+ :param _request_timeout: timeout setting for this request. If one
465
+ number provided, it will be total request
466
+ timeout. It can also be a pair (tuple) of
467
+ (connection, read) timeouts.
468
+ :type _request_timeout: int, tuple(int, int), optional
469
+ :param _request_auth: set to override the auth_settings for an a single
470
+ request; this effectively ignores the
471
+ authentication in the spec for a single request.
472
+ :type _request_auth: dict, optional
473
+ :param _content_type: force content-type for the request.
474
+ :type _content_type: str, Optional
475
+ :param _headers: set to override the headers for a single
476
+ request; this effectively ignores the headers
477
+ in the spec for a single request.
478
+ :type _headers: dict, optional
479
+ :param _host_index: set to override the host_index for a single
480
+ request; this effectively ignores the host_index
481
+ in the spec for a single request.
482
+ :type _host_index: int, optional
483
+ :return: Returns the result object.
484
+ """ # noqa: E501
485
+
486
+ _param = self._get_authenticate_periscope_serialize(
487
+ path_query_id=path_query_id,
488
+ variables=variables,
489
+ _request_auth=_request_auth,
490
+ _content_type=_content_type,
491
+ _headers=_headers,
492
+ _host_index=_host_index
493
+ )
494
+
495
+ _response_types_map: Dict[str, Optional[str]] = {
496
+ '200': "AuthenticatePeriscopeResponse",
497
+ }
498
+ response_data = self.api_client.call_api(
499
+ *_param,
500
+ _request_timeout=_request_timeout
501
+ )
502
+ response_data.read()
503
+ return self.api_client.response_deserialize(
504
+ response_data=response_data,
505
+ response_types_map=_response_types_map,
506
+ )
507
+
508
+
509
+ @validate_call
510
+ def get_authenticate_periscope_without_preload_content(
511
+ self,
512
+ path_query_id: StrictStr,
513
+ variables: StrictStr,
514
+ _request_timeout: Union[
515
+ None,
516
+ Annotated[StrictFloat, Field(gt=0)],
517
+ Tuple[
518
+ Annotated[StrictFloat, Field(gt=0)],
519
+ Annotated[StrictFloat, Field(gt=0)]
520
+ ]
521
+ ] = None,
522
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
523
+ _content_type: Optional[StrictStr] = None,
524
+ _headers: Optional[Dict[StrictStr, Any]] = None,
525
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
526
+ ) -> RESTResponseType:
527
+ """get_authenticate_periscope
528
+
529
+ a Periscope (live video) token for the account
530
+
531
+ :param path_query_id: (required)
532
+ :type path_query_id: str
533
+ :param variables: (required)
534
+ :type variables: str
535
+ :param _request_timeout: timeout setting for this request. If one
536
+ number provided, it will be total request
537
+ timeout. It can also be a pair (tuple) of
538
+ (connection, read) timeouts.
539
+ :type _request_timeout: int, tuple(int, int), optional
540
+ :param _request_auth: set to override the auth_settings for an a single
541
+ request; this effectively ignores the
542
+ authentication in the spec for a single request.
543
+ :type _request_auth: dict, optional
544
+ :param _content_type: force content-type for the request.
545
+ :type _content_type: str, Optional
546
+ :param _headers: set to override the headers for a single
547
+ request; this effectively ignores the headers
548
+ in the spec for a single request.
549
+ :type _headers: dict, optional
550
+ :param _host_index: set to override the host_index for a single
551
+ request; this effectively ignores the host_index
552
+ in the spec for a single request.
553
+ :type _host_index: int, optional
554
+ :return: Returns the result object.
555
+ """ # noqa: E501
556
+
557
+ _param = self._get_authenticate_periscope_serialize(
558
+ path_query_id=path_query_id,
559
+ variables=variables,
560
+ _request_auth=_request_auth,
561
+ _content_type=_content_type,
562
+ _headers=_headers,
563
+ _host_index=_host_index
564
+ )
565
+
566
+ _response_types_map: Dict[str, Optional[str]] = {
567
+ '200': "AuthenticatePeriscopeResponse",
568
+ }
569
+ response_data = self.api_client.call_api(
570
+ *_param,
571
+ _request_timeout=_request_timeout
572
+ )
573
+ return response_data.response
574
+
575
+
576
+ def _get_authenticate_periscope_serialize(
577
+ self,
578
+ path_query_id,
579
+ variables,
580
+ _request_auth,
581
+ _content_type,
582
+ _headers,
583
+ _host_index,
584
+ ) -> RequestSerialized:
585
+
586
+ _host = None
587
+
588
+ _collection_formats: Dict[str, str] = {
589
+ }
590
+
591
+ _path_params: Dict[str, str] = {}
592
+ _query_params: List[Tuple[str, str]] = []
593
+ _header_params: Dict[str, Optional[str]] = _headers or {}
594
+ _form_params: List[Tuple[str, str]] = []
595
+ _files: Dict[
596
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
597
+ ] = {}
598
+ _body_params: Optional[bytes] = None
599
+
600
+ # process the path parameters
601
+ if path_query_id is not None:
602
+ _path_params['pathQueryId'] = path_query_id
603
+ # process the query parameters
604
+ if variables is not None:
605
+
606
+ _query_params.append(('variables', variables))
607
+
608
+ # process the header parameters
609
+ # process the form parameters
610
+ # process the body parameter
611
+
612
+
613
+ # set the HTTP header `Accept`
614
+ if 'Accept' not in _header_params:
615
+ _header_params['Accept'] = self.api_client.select_header_accept(
616
+ [
617
+ 'application/json'
618
+ ]
619
+ )
620
+
621
+
622
+ # authentication setting
623
+ _auth_settings: List[str] = [
624
+ 'Accept',
625
+ 'ClientLanguage',
626
+ 'Priority',
627
+ 'Referer',
628
+ 'SecFetchDest',
629
+ 'SecChUaPlatform',
630
+ 'SecFetchMode',
631
+ 'CsrfToken',
632
+ 'ClientUuid',
633
+ 'BearerAuth',
634
+ 'GuestToken',
635
+ 'SecChUa',
636
+ 'CookieGt0',
637
+ 'ClientTransactionId',
638
+ 'ActiveUser',
639
+ 'CookieCt0',
640
+ 'UserAgent',
641
+ 'AcceptLanguage',
642
+ 'SecFetchSite',
643
+ 'AuthType',
644
+ 'CookieAuthToken',
645
+ 'SecChUaMobile',
646
+ 'AcceptEncoding'
647
+ ]
648
+
649
+ return self.api_client.param_serialize(
650
+ method='GET',
651
+ resource_path='/graphql/{pathQueryId}/AuthenticatePeriscope',
652
+ path_params=_path_params,
653
+ query_params=_query_params,
654
+ header_params=_header_params,
655
+ body=_body_params,
656
+ post_params=_form_params,
657
+ files=_files,
658
+ auth_settings=_auth_settings,
659
+ collection_formats=_collection_formats,
660
+ _host=_host,
661
+ _request_auth=_request_auth
662
+ )
663
+
664
+
665
+
666
+
667
+ @validate_call
668
+ def get_broadcast_query(
669
+ self,
670
+ path_query_id: StrictStr,
671
+ variables: StrictStr,
672
+ features: StrictStr,
673
+ _request_timeout: Union[
674
+ None,
675
+ Annotated[StrictFloat, Field(gt=0)],
676
+ Tuple[
677
+ Annotated[StrictFloat, Field(gt=0)],
678
+ Annotated[StrictFloat, Field(gt=0)]
679
+ ]
680
+ ] = None,
681
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
682
+ _content_type: Optional[StrictStr] = None,
683
+ _headers: Optional[Dict[StrictStr, Any]] = None,
684
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
685
+ ) -> BroadcastResponse:
686
+ """get_broadcast_query
687
+
688
+ a live video broadcast by id
689
+
690
+ :param path_query_id: (required)
691
+ :type path_query_id: str
692
+ :param variables: (required)
693
+ :type variables: str
694
+ :param features: (required)
695
+ :type features: str
696
+ :param _request_timeout: timeout setting for this request. If one
697
+ number provided, it will be total request
698
+ timeout. It can also be a pair (tuple) of
699
+ (connection, read) timeouts.
700
+ :type _request_timeout: int, tuple(int, int), optional
701
+ :param _request_auth: set to override the auth_settings for an a single
702
+ request; this effectively ignores the
703
+ authentication in the spec for a single request.
704
+ :type _request_auth: dict, optional
705
+ :param _content_type: force content-type for the request.
706
+ :type _content_type: str, Optional
707
+ :param _headers: set to override the headers for a single
708
+ request; this effectively ignores the headers
709
+ in the spec for a single request.
710
+ :type _headers: dict, optional
711
+ :param _host_index: set to override the host_index for a single
712
+ request; this effectively ignores the host_index
713
+ in the spec for a single request.
714
+ :type _host_index: int, optional
715
+ :return: Returns the result object.
716
+ """ # noqa: E501
717
+
718
+ _param = self._get_broadcast_query_serialize(
719
+ path_query_id=path_query_id,
720
+ variables=variables,
721
+ features=features,
722
+ _request_auth=_request_auth,
723
+ _content_type=_content_type,
724
+ _headers=_headers,
725
+ _host_index=_host_index
726
+ )
727
+
728
+ _response_types_map: Dict[str, Optional[str]] = {
729
+ '200': "BroadcastResponse",
730
+ }
731
+ response_data = self.api_client.call_api(
732
+ *_param,
733
+ _request_timeout=_request_timeout
734
+ )
735
+ response_data.read()
736
+ return self.api_client.response_deserialize(
737
+ response_data=response_data,
738
+ response_types_map=_response_types_map,
739
+ ).data
740
+
741
+
742
+ @validate_call
743
+ def get_broadcast_query_with_http_info(
744
+ self,
745
+ path_query_id: StrictStr,
746
+ variables: StrictStr,
747
+ features: StrictStr,
748
+ _request_timeout: Union[
749
+ None,
750
+ Annotated[StrictFloat, Field(gt=0)],
751
+ Tuple[
752
+ Annotated[StrictFloat, Field(gt=0)],
753
+ Annotated[StrictFloat, Field(gt=0)]
754
+ ]
755
+ ] = None,
756
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
757
+ _content_type: Optional[StrictStr] = None,
758
+ _headers: Optional[Dict[StrictStr, Any]] = None,
759
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
760
+ ) -> ApiResponse[BroadcastResponse]:
761
+ """get_broadcast_query
762
+
763
+ a live video broadcast by id
764
+
765
+ :param path_query_id: (required)
766
+ :type path_query_id: str
767
+ :param variables: (required)
768
+ :type variables: str
769
+ :param features: (required)
770
+ :type features: str
771
+ :param _request_timeout: timeout setting for this request. If one
772
+ number provided, it will be total request
773
+ timeout. It can also be a pair (tuple) of
774
+ (connection, read) timeouts.
775
+ :type _request_timeout: int, tuple(int, int), optional
776
+ :param _request_auth: set to override the auth_settings for an a single
777
+ request; this effectively ignores the
778
+ authentication in the spec for a single request.
779
+ :type _request_auth: dict, optional
780
+ :param _content_type: force content-type for the request.
781
+ :type _content_type: str, Optional
782
+ :param _headers: set to override the headers for a single
783
+ request; this effectively ignores the headers
784
+ in the spec for a single request.
785
+ :type _headers: dict, optional
786
+ :param _host_index: set to override the host_index for a single
787
+ request; this effectively ignores the host_index
788
+ in the spec for a single request.
789
+ :type _host_index: int, optional
790
+ :return: Returns the result object.
791
+ """ # noqa: E501
792
+
793
+ _param = self._get_broadcast_query_serialize(
794
+ path_query_id=path_query_id,
795
+ variables=variables,
796
+ features=features,
797
+ _request_auth=_request_auth,
798
+ _content_type=_content_type,
799
+ _headers=_headers,
800
+ _host_index=_host_index
801
+ )
802
+
803
+ _response_types_map: Dict[str, Optional[str]] = {
804
+ '200': "BroadcastResponse",
805
+ }
806
+ response_data = self.api_client.call_api(
807
+ *_param,
808
+ _request_timeout=_request_timeout
809
+ )
810
+ response_data.read()
811
+ return self.api_client.response_deserialize(
812
+ response_data=response_data,
813
+ response_types_map=_response_types_map,
814
+ )
815
+
816
+
817
+ @validate_call
818
+ def get_broadcast_query_without_preload_content(
819
+ self,
820
+ path_query_id: StrictStr,
821
+ variables: StrictStr,
822
+ features: StrictStr,
823
+ _request_timeout: Union[
824
+ None,
825
+ Annotated[StrictFloat, Field(gt=0)],
826
+ Tuple[
827
+ Annotated[StrictFloat, Field(gt=0)],
828
+ Annotated[StrictFloat, Field(gt=0)]
829
+ ]
830
+ ] = None,
831
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
832
+ _content_type: Optional[StrictStr] = None,
833
+ _headers: Optional[Dict[StrictStr, Any]] = None,
834
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
835
+ ) -> RESTResponseType:
836
+ """get_broadcast_query
837
+
838
+ a live video broadcast by id
839
+
840
+ :param path_query_id: (required)
841
+ :type path_query_id: str
842
+ :param variables: (required)
843
+ :type variables: str
844
+ :param features: (required)
845
+ :type features: str
846
+ :param _request_timeout: timeout setting for this request. If one
847
+ number provided, it will be total request
848
+ timeout. It can also be a pair (tuple) of
849
+ (connection, read) timeouts.
850
+ :type _request_timeout: int, tuple(int, int), optional
851
+ :param _request_auth: set to override the auth_settings for an a single
852
+ request; this effectively ignores the
853
+ authentication in the spec for a single request.
854
+ :type _request_auth: dict, optional
855
+ :param _content_type: force content-type for the request.
856
+ :type _content_type: str, Optional
857
+ :param _headers: set to override the headers for a single
858
+ request; this effectively ignores the headers
859
+ in the spec for a single request.
860
+ :type _headers: dict, optional
861
+ :param _host_index: set to override the host_index for a single
862
+ request; this effectively ignores the host_index
863
+ in the spec for a single request.
864
+ :type _host_index: int, optional
865
+ :return: Returns the result object.
866
+ """ # noqa: E501
867
+
868
+ _param = self._get_broadcast_query_serialize(
869
+ path_query_id=path_query_id,
870
+ variables=variables,
871
+ features=features,
872
+ _request_auth=_request_auth,
873
+ _content_type=_content_type,
874
+ _headers=_headers,
875
+ _host_index=_host_index
876
+ )
877
+
878
+ _response_types_map: Dict[str, Optional[str]] = {
879
+ '200': "BroadcastResponse",
880
+ }
881
+ response_data = self.api_client.call_api(
882
+ *_param,
883
+ _request_timeout=_request_timeout
884
+ )
885
+ return response_data.response
886
+
887
+
888
+ def _get_broadcast_query_serialize(
889
+ self,
890
+ path_query_id,
891
+ variables,
892
+ features,
893
+ _request_auth,
894
+ _content_type,
895
+ _headers,
896
+ _host_index,
897
+ ) -> RequestSerialized:
898
+
899
+ _host = None
900
+
901
+ _collection_formats: Dict[str, str] = {
902
+ }
903
+
904
+ _path_params: Dict[str, str] = {}
905
+ _query_params: List[Tuple[str, str]] = []
906
+ _header_params: Dict[str, Optional[str]] = _headers or {}
907
+ _form_params: List[Tuple[str, str]] = []
908
+ _files: Dict[
909
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
910
+ ] = {}
911
+ _body_params: Optional[bytes] = None
912
+
913
+ # process the path parameters
914
+ if path_query_id is not None:
915
+ _path_params['pathQueryId'] = path_query_id
916
+ # process the query parameters
917
+ if variables is not None:
918
+
919
+ _query_params.append(('variables', variables))
920
+
921
+ if features is not None:
922
+
923
+ _query_params.append(('features', features))
924
+
925
+ # process the header parameters
926
+ # process the form parameters
927
+ # process the body parameter
928
+
929
+
930
+ # set the HTTP header `Accept`
931
+ if 'Accept' not in _header_params:
932
+ _header_params['Accept'] = self.api_client.select_header_accept(
933
+ [
934
+ 'application/json'
935
+ ]
936
+ )
937
+
938
+
939
+ # authentication setting
940
+ _auth_settings: List[str] = [
941
+ 'Accept',
942
+ 'ClientLanguage',
943
+ 'Priority',
944
+ 'Referer',
945
+ 'SecFetchDest',
946
+ 'SecChUaPlatform',
947
+ 'SecFetchMode',
948
+ 'CsrfToken',
949
+ 'ClientUuid',
950
+ 'BearerAuth',
951
+ 'GuestToken',
952
+ 'SecChUa',
953
+ 'CookieGt0',
954
+ 'ClientTransactionId',
955
+ 'ActiveUser',
956
+ 'CookieCt0',
957
+ 'UserAgent',
958
+ 'AcceptLanguage',
959
+ 'SecFetchSite',
960
+ 'AuthType',
961
+ 'CookieAuthToken',
962
+ 'SecChUaMobile',
963
+ 'AcceptEncoding'
964
+ ]
965
+
966
+ return self.api_client.param_serialize(
967
+ method='GET',
968
+ resource_path='/graphql/{pathQueryId}/BroadcastQuery',
969
+ path_params=_path_params,
970
+ query_params=_query_params,
971
+ header_params=_header_params,
972
+ body=_body_params,
973
+ post_params=_form_params,
974
+ files=_files,
975
+ auth_settings=_auth_settings,
976
+ collection_formats=_collection_formats,
977
+ _host=_host,
978
+ _request_auth=_request_auth
979
+ )
980
+
981
+
982
+
983
+
984
+ @validate_call
985
+ def get_creator_studio_tab_bar_item_query(
986
+ self,
987
+ path_query_id: StrictStr,
988
+ variables: StrictStr,
989
+ _request_timeout: Union[
990
+ None,
991
+ Annotated[StrictFloat, Field(gt=0)],
992
+ Tuple[
993
+ Annotated[StrictFloat, Field(gt=0)],
994
+ Annotated[StrictFloat, Field(gt=0)]
995
+ ]
996
+ ] = None,
997
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
998
+ _content_type: Optional[StrictStr] = None,
999
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1000
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1001
+ ) -> CreatorStudioTabBarItemQueryResponse:
1002
+ """get_creator_studio_tab_bar_item_query
1003
+
1004
+ audience rewards tasks shown in Creator Studio
1005
+
1006
+ :param path_query_id: (required)
1007
+ :type path_query_id: str
1008
+ :param variables: (required)
1009
+ :type variables: str
1010
+ :param _request_timeout: timeout setting for this request. If one
1011
+ number provided, it will be total request
1012
+ timeout. It can also be a pair (tuple) of
1013
+ (connection, read) timeouts.
1014
+ :type _request_timeout: int, tuple(int, int), optional
1015
+ :param _request_auth: set to override the auth_settings for an a single
1016
+ request; this effectively ignores the
1017
+ authentication in the spec for a single request.
1018
+ :type _request_auth: dict, optional
1019
+ :param _content_type: force content-type for the request.
1020
+ :type _content_type: str, Optional
1021
+ :param _headers: set to override the headers for a single
1022
+ request; this effectively ignores the headers
1023
+ in the spec for a single request.
1024
+ :type _headers: dict, optional
1025
+ :param _host_index: set to override the host_index for a single
1026
+ request; this effectively ignores the host_index
1027
+ in the spec for a single request.
1028
+ :type _host_index: int, optional
1029
+ :return: Returns the result object.
1030
+ """ # noqa: E501
1031
+
1032
+ _param = self._get_creator_studio_tab_bar_item_query_serialize(
1033
+ path_query_id=path_query_id,
1034
+ variables=variables,
1035
+ _request_auth=_request_auth,
1036
+ _content_type=_content_type,
1037
+ _headers=_headers,
1038
+ _host_index=_host_index
1039
+ )
1040
+
1041
+ _response_types_map: Dict[str, Optional[str]] = {
1042
+ '200': "CreatorStudioTabBarItemQueryResponse",
1043
+ }
1044
+ response_data = self.api_client.call_api(
1045
+ *_param,
1046
+ _request_timeout=_request_timeout
1047
+ )
1048
+ response_data.read()
1049
+ return self.api_client.response_deserialize(
1050
+ response_data=response_data,
1051
+ response_types_map=_response_types_map,
1052
+ ).data
1053
+
1054
+
1055
+ @validate_call
1056
+ def get_creator_studio_tab_bar_item_query_with_http_info(
1057
+ self,
1058
+ path_query_id: StrictStr,
1059
+ variables: StrictStr,
1060
+ _request_timeout: Union[
1061
+ None,
1062
+ Annotated[StrictFloat, Field(gt=0)],
1063
+ Tuple[
1064
+ Annotated[StrictFloat, Field(gt=0)],
1065
+ Annotated[StrictFloat, Field(gt=0)]
1066
+ ]
1067
+ ] = None,
1068
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1069
+ _content_type: Optional[StrictStr] = None,
1070
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1071
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1072
+ ) -> ApiResponse[CreatorStudioTabBarItemQueryResponse]:
1073
+ """get_creator_studio_tab_bar_item_query
1074
+
1075
+ audience rewards tasks shown in Creator Studio
1076
+
1077
+ :param path_query_id: (required)
1078
+ :type path_query_id: str
1079
+ :param variables: (required)
1080
+ :type variables: str
1081
+ :param _request_timeout: timeout setting for this request. If one
1082
+ number provided, it will be total request
1083
+ timeout. It can also be a pair (tuple) of
1084
+ (connection, read) timeouts.
1085
+ :type _request_timeout: int, tuple(int, int), optional
1086
+ :param _request_auth: set to override the auth_settings for an a single
1087
+ request; this effectively ignores the
1088
+ authentication in the spec for a single request.
1089
+ :type _request_auth: dict, optional
1090
+ :param _content_type: force content-type for the request.
1091
+ :type _content_type: str, Optional
1092
+ :param _headers: set to override the headers for a single
1093
+ request; this effectively ignores the headers
1094
+ in the spec for a single request.
1095
+ :type _headers: dict, optional
1096
+ :param _host_index: set to override the host_index for a single
1097
+ request; this effectively ignores the host_index
1098
+ in the spec for a single request.
1099
+ :type _host_index: int, optional
1100
+ :return: Returns the result object.
1101
+ """ # noqa: E501
1102
+
1103
+ _param = self._get_creator_studio_tab_bar_item_query_serialize(
1104
+ path_query_id=path_query_id,
1105
+ variables=variables,
1106
+ _request_auth=_request_auth,
1107
+ _content_type=_content_type,
1108
+ _headers=_headers,
1109
+ _host_index=_host_index
1110
+ )
1111
+
1112
+ _response_types_map: Dict[str, Optional[str]] = {
1113
+ '200': "CreatorStudioTabBarItemQueryResponse",
1114
+ }
1115
+ response_data = self.api_client.call_api(
1116
+ *_param,
1117
+ _request_timeout=_request_timeout
1118
+ )
1119
+ response_data.read()
1120
+ return self.api_client.response_deserialize(
1121
+ response_data=response_data,
1122
+ response_types_map=_response_types_map,
1123
+ )
1124
+
1125
+
1126
+ @validate_call
1127
+ def get_creator_studio_tab_bar_item_query_without_preload_content(
1128
+ self,
1129
+ path_query_id: StrictStr,
1130
+ variables: StrictStr,
1131
+ _request_timeout: Union[
1132
+ None,
1133
+ Annotated[StrictFloat, Field(gt=0)],
1134
+ Tuple[
1135
+ Annotated[StrictFloat, Field(gt=0)],
1136
+ Annotated[StrictFloat, Field(gt=0)]
1137
+ ]
1138
+ ] = None,
1139
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1140
+ _content_type: Optional[StrictStr] = None,
1141
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1142
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1143
+ ) -> RESTResponseType:
1144
+ """get_creator_studio_tab_bar_item_query
1145
+
1146
+ audience rewards tasks shown in Creator Studio
1147
+
1148
+ :param path_query_id: (required)
1149
+ :type path_query_id: str
1150
+ :param variables: (required)
1151
+ :type variables: str
1152
+ :param _request_timeout: timeout setting for this request. If one
1153
+ number provided, it will be total request
1154
+ timeout. It can also be a pair (tuple) of
1155
+ (connection, read) timeouts.
1156
+ :type _request_timeout: int, tuple(int, int), optional
1157
+ :param _request_auth: set to override the auth_settings for an a single
1158
+ request; this effectively ignores the
1159
+ authentication in the spec for a single request.
1160
+ :type _request_auth: dict, optional
1161
+ :param _content_type: force content-type for the request.
1162
+ :type _content_type: str, Optional
1163
+ :param _headers: set to override the headers for a single
1164
+ request; this effectively ignores the headers
1165
+ in the spec for a single request.
1166
+ :type _headers: dict, optional
1167
+ :param _host_index: set to override the host_index for a single
1168
+ request; this effectively ignores the host_index
1169
+ in the spec for a single request.
1170
+ :type _host_index: int, optional
1171
+ :return: Returns the result object.
1172
+ """ # noqa: E501
1173
+
1174
+ _param = self._get_creator_studio_tab_bar_item_query_serialize(
1175
+ path_query_id=path_query_id,
1176
+ variables=variables,
1177
+ _request_auth=_request_auth,
1178
+ _content_type=_content_type,
1179
+ _headers=_headers,
1180
+ _host_index=_host_index
1181
+ )
1182
+
1183
+ _response_types_map: Dict[str, Optional[str]] = {
1184
+ '200': "CreatorStudioTabBarItemQueryResponse",
1185
+ }
1186
+ response_data = self.api_client.call_api(
1187
+ *_param,
1188
+ _request_timeout=_request_timeout
1189
+ )
1190
+ return response_data.response
1191
+
1192
+
1193
+ def _get_creator_studio_tab_bar_item_query_serialize(
1194
+ self,
1195
+ path_query_id,
1196
+ variables,
1197
+ _request_auth,
1198
+ _content_type,
1199
+ _headers,
1200
+ _host_index,
1201
+ ) -> RequestSerialized:
1202
+
1203
+ _host = None
1204
+
1205
+ _collection_formats: Dict[str, str] = {
1206
+ }
1207
+
1208
+ _path_params: Dict[str, str] = {}
1209
+ _query_params: List[Tuple[str, str]] = []
1210
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1211
+ _form_params: List[Tuple[str, str]] = []
1212
+ _files: Dict[
1213
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1214
+ ] = {}
1215
+ _body_params: Optional[bytes] = None
1216
+
1217
+ # process the path parameters
1218
+ if path_query_id is not None:
1219
+ _path_params['pathQueryId'] = path_query_id
1220
+ # process the query parameters
1221
+ if variables is not None:
1222
+
1223
+ _query_params.append(('variables', variables))
1224
+
1225
+ # process the header parameters
1226
+ # process the form parameters
1227
+ # process the body parameter
1228
+
1229
+
1230
+ # set the HTTP header `Accept`
1231
+ if 'Accept' not in _header_params:
1232
+ _header_params['Accept'] = self.api_client.select_header_accept(
1233
+ [
1234
+ 'application/json'
1235
+ ]
1236
+ )
1237
+
1238
+
1239
+ # authentication setting
1240
+ _auth_settings: List[str] = [
1241
+ 'Accept',
1242
+ 'ClientLanguage',
1243
+ 'Priority',
1244
+ 'Referer',
1245
+ 'SecFetchDest',
1246
+ 'SecChUaPlatform',
1247
+ 'SecFetchMode',
1248
+ 'CsrfToken',
1249
+ 'ClientUuid',
1250
+ 'BearerAuth',
1251
+ 'GuestToken',
1252
+ 'SecChUa',
1253
+ 'CookieGt0',
1254
+ 'ClientTransactionId',
1255
+ 'ActiveUser',
1256
+ 'CookieCt0',
1257
+ 'UserAgent',
1258
+ 'AcceptLanguage',
1259
+ 'SecFetchSite',
1260
+ 'AuthType',
1261
+ 'CookieAuthToken',
1262
+ 'SecChUaMobile',
1263
+ 'AcceptEncoding'
1264
+ ]
1265
+
1266
+ return self.api_client.param_serialize(
1267
+ method='GET',
1268
+ resource_path='/graphql/{pathQueryId}/CreatorStudioTabBarItemQuery',
1269
+ path_params=_path_params,
1270
+ query_params=_query_params,
1271
+ header_params=_header_params,
1272
+ body=_body_params,
1273
+ post_params=_form_params,
1274
+ files=_files,
1275
+ auth_settings=_auth_settings,
1276
+ collection_formats=_collection_formats,
1277
+ _host=_host,
1278
+ _request_auth=_request_auth
1279
+ )
1280
+
1281
+
1282
+
1283
+
1284
+ @validate_call
1285
+ def get_data_saver_mode(
1286
+ self,
1287
+ path_query_id: StrictStr,
1288
+ variables: StrictStr,
1289
+ _request_timeout: Union[
1290
+ None,
1291
+ Annotated[StrictFloat, Field(gt=0)],
1292
+ Tuple[
1293
+ Annotated[StrictFloat, Field(gt=0)],
1294
+ Annotated[StrictFloat, Field(gt=0)]
1295
+ ]
1296
+ ] = None,
1297
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1298
+ _content_type: Optional[StrictStr] = None,
1299
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1300
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1301
+ ) -> DataSaverModeResponse:
1302
+ """get_data_saver_mode
1303
+
1304
+ data saver setting of the account
1305
+
1306
+ :param path_query_id: (required)
1307
+ :type path_query_id: str
1308
+ :param variables: (required)
1309
+ :type variables: str
1310
+ :param _request_timeout: timeout setting for this request. If one
1311
+ number provided, it will be total request
1312
+ timeout. It can also be a pair (tuple) of
1313
+ (connection, read) timeouts.
1314
+ :type _request_timeout: int, tuple(int, int), optional
1315
+ :param _request_auth: set to override the auth_settings for an a single
1316
+ request; this effectively ignores the
1317
+ authentication in the spec for a single request.
1318
+ :type _request_auth: dict, optional
1319
+ :param _content_type: force content-type for the request.
1320
+ :type _content_type: str, Optional
1321
+ :param _headers: set to override the headers for a single
1322
+ request; this effectively ignores the headers
1323
+ in the spec for a single request.
1324
+ :type _headers: dict, optional
1325
+ :param _host_index: set to override the host_index for a single
1326
+ request; this effectively ignores the host_index
1327
+ in the spec for a single request.
1328
+ :type _host_index: int, optional
1329
+ :return: Returns the result object.
1330
+ """ # noqa: E501
1331
+
1332
+ _param = self._get_data_saver_mode_serialize(
1333
+ path_query_id=path_query_id,
1334
+ variables=variables,
1335
+ _request_auth=_request_auth,
1336
+ _content_type=_content_type,
1337
+ _headers=_headers,
1338
+ _host_index=_host_index
1339
+ )
1340
+
1341
+ _response_types_map: Dict[str, Optional[str]] = {
1342
+ '200': "DataSaverModeResponse",
1343
+ }
1344
+ response_data = self.api_client.call_api(
1345
+ *_param,
1346
+ _request_timeout=_request_timeout
1347
+ )
1348
+ response_data.read()
1349
+ return self.api_client.response_deserialize(
1350
+ response_data=response_data,
1351
+ response_types_map=_response_types_map,
1352
+ ).data
1353
+
1354
+
1355
+ @validate_call
1356
+ def get_data_saver_mode_with_http_info(
1357
+ self,
1358
+ path_query_id: StrictStr,
1359
+ variables: StrictStr,
1360
+ _request_timeout: Union[
1361
+ None,
1362
+ Annotated[StrictFloat, Field(gt=0)],
1363
+ Tuple[
1364
+ Annotated[StrictFloat, Field(gt=0)],
1365
+ Annotated[StrictFloat, Field(gt=0)]
1366
+ ]
1367
+ ] = None,
1368
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1369
+ _content_type: Optional[StrictStr] = None,
1370
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1371
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1372
+ ) -> ApiResponse[DataSaverModeResponse]:
1373
+ """get_data_saver_mode
1374
+
1375
+ data saver setting of the account
1376
+
1377
+ :param path_query_id: (required)
1378
+ :type path_query_id: str
1379
+ :param variables: (required)
1380
+ :type variables: str
1381
+ :param _request_timeout: timeout setting for this request. If one
1382
+ number provided, it will be total request
1383
+ timeout. It can also be a pair (tuple) of
1384
+ (connection, read) timeouts.
1385
+ :type _request_timeout: int, tuple(int, int), optional
1386
+ :param _request_auth: set to override the auth_settings for an a single
1387
+ request; this effectively ignores the
1388
+ authentication in the spec for a single request.
1389
+ :type _request_auth: dict, optional
1390
+ :param _content_type: force content-type for the request.
1391
+ :type _content_type: str, Optional
1392
+ :param _headers: set to override the headers for a single
1393
+ request; this effectively ignores the headers
1394
+ in the spec for a single request.
1395
+ :type _headers: dict, optional
1396
+ :param _host_index: set to override the host_index for a single
1397
+ request; this effectively ignores the host_index
1398
+ in the spec for a single request.
1399
+ :type _host_index: int, optional
1400
+ :return: Returns the result object.
1401
+ """ # noqa: E501
1402
+
1403
+ _param = self._get_data_saver_mode_serialize(
1404
+ path_query_id=path_query_id,
1405
+ variables=variables,
1406
+ _request_auth=_request_auth,
1407
+ _content_type=_content_type,
1408
+ _headers=_headers,
1409
+ _host_index=_host_index
1410
+ )
1411
+
1412
+ _response_types_map: Dict[str, Optional[str]] = {
1413
+ '200': "DataSaverModeResponse",
1414
+ }
1415
+ response_data = self.api_client.call_api(
1416
+ *_param,
1417
+ _request_timeout=_request_timeout
1418
+ )
1419
+ response_data.read()
1420
+ return self.api_client.response_deserialize(
1421
+ response_data=response_data,
1422
+ response_types_map=_response_types_map,
1423
+ )
1424
+
1425
+
1426
+ @validate_call
1427
+ def get_data_saver_mode_without_preload_content(
1428
+ self,
1429
+ path_query_id: StrictStr,
1430
+ variables: StrictStr,
1431
+ _request_timeout: Union[
1432
+ None,
1433
+ Annotated[StrictFloat, Field(gt=0)],
1434
+ Tuple[
1435
+ Annotated[StrictFloat, Field(gt=0)],
1436
+ Annotated[StrictFloat, Field(gt=0)]
1437
+ ]
1438
+ ] = None,
1439
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1440
+ _content_type: Optional[StrictStr] = None,
1441
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1442
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1443
+ ) -> RESTResponseType:
1444
+ """get_data_saver_mode
1445
+
1446
+ data saver setting of the account
1447
+
1448
+ :param path_query_id: (required)
1449
+ :type path_query_id: str
1450
+ :param variables: (required)
1451
+ :type variables: str
1452
+ :param _request_timeout: timeout setting for this request. If one
1453
+ number provided, it will be total request
1454
+ timeout. It can also be a pair (tuple) of
1455
+ (connection, read) timeouts.
1456
+ :type _request_timeout: int, tuple(int, int), optional
1457
+ :param _request_auth: set to override the auth_settings for an a single
1458
+ request; this effectively ignores the
1459
+ authentication in the spec for a single request.
1460
+ :type _request_auth: dict, optional
1461
+ :param _content_type: force content-type for the request.
1462
+ :type _content_type: str, Optional
1463
+ :param _headers: set to override the headers for a single
1464
+ request; this effectively ignores the headers
1465
+ in the spec for a single request.
1466
+ :type _headers: dict, optional
1467
+ :param _host_index: set to override the host_index for a single
1468
+ request; this effectively ignores the host_index
1469
+ in the spec for a single request.
1470
+ :type _host_index: int, optional
1471
+ :return: Returns the result object.
1472
+ """ # noqa: E501
1473
+
1474
+ _param = self._get_data_saver_mode_serialize(
1475
+ path_query_id=path_query_id,
1476
+ variables=variables,
1477
+ _request_auth=_request_auth,
1478
+ _content_type=_content_type,
1479
+ _headers=_headers,
1480
+ _host_index=_host_index
1481
+ )
1482
+
1483
+ _response_types_map: Dict[str, Optional[str]] = {
1484
+ '200': "DataSaverModeResponse",
1485
+ }
1486
+ response_data = self.api_client.call_api(
1487
+ *_param,
1488
+ _request_timeout=_request_timeout
1489
+ )
1490
+ return response_data.response
1491
+
1492
+
1493
+ def _get_data_saver_mode_serialize(
1494
+ self,
1495
+ path_query_id,
1496
+ variables,
1497
+ _request_auth,
1498
+ _content_type,
1499
+ _headers,
1500
+ _host_index,
1501
+ ) -> RequestSerialized:
1502
+
1503
+ _host = None
1504
+
1505
+ _collection_formats: Dict[str, str] = {
1506
+ }
1507
+
1508
+ _path_params: Dict[str, str] = {}
1509
+ _query_params: List[Tuple[str, str]] = []
1510
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1511
+ _form_params: List[Tuple[str, str]] = []
1512
+ _files: Dict[
1513
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1514
+ ] = {}
1515
+ _body_params: Optional[bytes] = None
1516
+
1517
+ # process the path parameters
1518
+ if path_query_id is not None:
1519
+ _path_params['pathQueryId'] = path_query_id
1520
+ # process the query parameters
1521
+ if variables is not None:
1522
+
1523
+ _query_params.append(('variables', variables))
1524
+
1525
+ # process the header parameters
1526
+ # process the form parameters
1527
+ # process the body parameter
1528
+
1529
+
1530
+ # set the HTTP header `Accept`
1531
+ if 'Accept' not in _header_params:
1532
+ _header_params['Accept'] = self.api_client.select_header_accept(
1533
+ [
1534
+ 'application/json'
1535
+ ]
1536
+ )
1537
+
1538
+
1539
+ # authentication setting
1540
+ _auth_settings: List[str] = [
1541
+ 'Accept',
1542
+ 'ClientLanguage',
1543
+ 'Priority',
1544
+ 'Referer',
1545
+ 'SecFetchDest',
1546
+ 'SecChUaPlatform',
1547
+ 'SecFetchMode',
1548
+ 'CsrfToken',
1549
+ 'ClientUuid',
1550
+ 'BearerAuth',
1551
+ 'GuestToken',
1552
+ 'SecChUa',
1553
+ 'CookieGt0',
1554
+ 'ClientTransactionId',
1555
+ 'ActiveUser',
1556
+ 'CookieCt0',
1557
+ 'UserAgent',
1558
+ 'AcceptLanguage',
1559
+ 'SecFetchSite',
1560
+ 'AuthType',
1561
+ 'CookieAuthToken',
1562
+ 'SecChUaMobile',
1563
+ 'AcceptEncoding'
1564
+ ]
1565
+
1566
+ return self.api_client.param_serialize(
1567
+ method='GET',
1568
+ resource_path='/graphql/{pathQueryId}/DataSaverMode',
1569
+ path_params=_path_params,
1570
+ query_params=_query_params,
1571
+ header_params=_header_params,
1572
+ body=_body_params,
1573
+ post_params=_form_params,
1574
+ files=_files,
1575
+ auth_settings=_auth_settings,
1576
+ collection_formats=_collection_formats,
1577
+ _host=_host,
1578
+ _request_auth=_request_auth
1579
+ )
1580
+
1581
+
1582
+
1583
+
1584
+ @validate_call
1585
+ def get_grok_account_jwt_query(
1586
+ self,
1587
+ path_query_id: StrictStr,
1588
+ variables: StrictStr,
1589
+ _request_timeout: Union[
1590
+ None,
1591
+ Annotated[StrictFloat, Field(gt=0)],
1592
+ Tuple[
1593
+ Annotated[StrictFloat, Field(gt=0)],
1594
+ Annotated[StrictFloat, Field(gt=0)]
1595
+ ]
1596
+ ] = None,
1597
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1598
+ _content_type: Optional[StrictStr] = None,
1599
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1600
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1601
+ ) -> GrokAccountJwtResponse:
1602
+ """get_grok_account_jwt_query
1603
+
1604
+ whether the account is linked to a Grok account
1605
+
1606
+ :param path_query_id: (required)
1607
+ :type path_query_id: str
1608
+ :param variables: (required)
1609
+ :type variables: str
1610
+ :param _request_timeout: timeout setting for this request. If one
1611
+ number provided, it will be total request
1612
+ timeout. It can also be a pair (tuple) of
1613
+ (connection, read) timeouts.
1614
+ :type _request_timeout: int, tuple(int, int), optional
1615
+ :param _request_auth: set to override the auth_settings for an a single
1616
+ request; this effectively ignores the
1617
+ authentication in the spec for a single request.
1618
+ :type _request_auth: dict, optional
1619
+ :param _content_type: force content-type for the request.
1620
+ :type _content_type: str, Optional
1621
+ :param _headers: set to override the headers for a single
1622
+ request; this effectively ignores the headers
1623
+ in the spec for a single request.
1624
+ :type _headers: dict, optional
1625
+ :param _host_index: set to override the host_index for a single
1626
+ request; this effectively ignores the host_index
1627
+ in the spec for a single request.
1628
+ :type _host_index: int, optional
1629
+ :return: Returns the result object.
1630
+ """ # noqa: E501
1631
+
1632
+ _param = self._get_grok_account_jwt_query_serialize(
1633
+ path_query_id=path_query_id,
1634
+ variables=variables,
1635
+ _request_auth=_request_auth,
1636
+ _content_type=_content_type,
1637
+ _headers=_headers,
1638
+ _host_index=_host_index
1639
+ )
1640
+
1641
+ _response_types_map: Dict[str, Optional[str]] = {
1642
+ '200': "GrokAccountJwtResponse",
1643
+ }
1644
+ response_data = self.api_client.call_api(
1645
+ *_param,
1646
+ _request_timeout=_request_timeout
1647
+ )
1648
+ response_data.read()
1649
+ return self.api_client.response_deserialize(
1650
+ response_data=response_data,
1651
+ response_types_map=_response_types_map,
1652
+ ).data
1653
+
1654
+
1655
+ @validate_call
1656
+ def get_grok_account_jwt_query_with_http_info(
1657
+ self,
1658
+ path_query_id: StrictStr,
1659
+ variables: StrictStr,
1660
+ _request_timeout: Union[
1661
+ None,
1662
+ Annotated[StrictFloat, Field(gt=0)],
1663
+ Tuple[
1664
+ Annotated[StrictFloat, Field(gt=0)],
1665
+ Annotated[StrictFloat, Field(gt=0)]
1666
+ ]
1667
+ ] = None,
1668
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1669
+ _content_type: Optional[StrictStr] = None,
1670
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1671
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1672
+ ) -> ApiResponse[GrokAccountJwtResponse]:
1673
+ """get_grok_account_jwt_query
1674
+
1675
+ whether the account is linked to a Grok account
1676
+
1677
+ :param path_query_id: (required)
1678
+ :type path_query_id: str
1679
+ :param variables: (required)
1680
+ :type variables: str
1681
+ :param _request_timeout: timeout setting for this request. If one
1682
+ number provided, it will be total request
1683
+ timeout. It can also be a pair (tuple) of
1684
+ (connection, read) timeouts.
1685
+ :type _request_timeout: int, tuple(int, int), optional
1686
+ :param _request_auth: set to override the auth_settings for an a single
1687
+ request; this effectively ignores the
1688
+ authentication in the spec for a single request.
1689
+ :type _request_auth: dict, optional
1690
+ :param _content_type: force content-type for the request.
1691
+ :type _content_type: str, Optional
1692
+ :param _headers: set to override the headers for a single
1693
+ request; this effectively ignores the headers
1694
+ in the spec for a single request.
1695
+ :type _headers: dict, optional
1696
+ :param _host_index: set to override the host_index for a single
1697
+ request; this effectively ignores the host_index
1698
+ in the spec for a single request.
1699
+ :type _host_index: int, optional
1700
+ :return: Returns the result object.
1701
+ """ # noqa: E501
1702
+
1703
+ _param = self._get_grok_account_jwt_query_serialize(
1704
+ path_query_id=path_query_id,
1705
+ variables=variables,
1706
+ _request_auth=_request_auth,
1707
+ _content_type=_content_type,
1708
+ _headers=_headers,
1709
+ _host_index=_host_index
1710
+ )
1711
+
1712
+ _response_types_map: Dict[str, Optional[str]] = {
1713
+ '200': "GrokAccountJwtResponse",
1714
+ }
1715
+ response_data = self.api_client.call_api(
1716
+ *_param,
1717
+ _request_timeout=_request_timeout
1718
+ )
1719
+ response_data.read()
1720
+ return self.api_client.response_deserialize(
1721
+ response_data=response_data,
1722
+ response_types_map=_response_types_map,
1723
+ )
1724
+
1725
+
1726
+ @validate_call
1727
+ def get_grok_account_jwt_query_without_preload_content(
1728
+ self,
1729
+ path_query_id: StrictStr,
1730
+ variables: StrictStr,
1731
+ _request_timeout: Union[
1732
+ None,
1733
+ Annotated[StrictFloat, Field(gt=0)],
1734
+ Tuple[
1735
+ Annotated[StrictFloat, Field(gt=0)],
1736
+ Annotated[StrictFloat, Field(gt=0)]
1737
+ ]
1738
+ ] = None,
1739
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1740
+ _content_type: Optional[StrictStr] = None,
1741
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1742
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1743
+ ) -> RESTResponseType:
1744
+ """get_grok_account_jwt_query
1745
+
1746
+ whether the account is linked to a Grok account
1747
+
1748
+ :param path_query_id: (required)
1749
+ :type path_query_id: str
1750
+ :param variables: (required)
1751
+ :type variables: str
1752
+ :param _request_timeout: timeout setting for this request. If one
1753
+ number provided, it will be total request
1754
+ timeout. It can also be a pair (tuple) of
1755
+ (connection, read) timeouts.
1756
+ :type _request_timeout: int, tuple(int, int), optional
1757
+ :param _request_auth: set to override the auth_settings for an a single
1758
+ request; this effectively ignores the
1759
+ authentication in the spec for a single request.
1760
+ :type _request_auth: dict, optional
1761
+ :param _content_type: force content-type for the request.
1762
+ :type _content_type: str, Optional
1763
+ :param _headers: set to override the headers for a single
1764
+ request; this effectively ignores the headers
1765
+ in the spec for a single request.
1766
+ :type _headers: dict, optional
1767
+ :param _host_index: set to override the host_index for a single
1768
+ request; this effectively ignores the host_index
1769
+ in the spec for a single request.
1770
+ :type _host_index: int, optional
1771
+ :return: Returns the result object.
1772
+ """ # noqa: E501
1773
+
1774
+ _param = self._get_grok_account_jwt_query_serialize(
1775
+ path_query_id=path_query_id,
1776
+ variables=variables,
1777
+ _request_auth=_request_auth,
1778
+ _content_type=_content_type,
1779
+ _headers=_headers,
1780
+ _host_index=_host_index
1781
+ )
1782
+
1783
+ _response_types_map: Dict[str, Optional[str]] = {
1784
+ '200': "GrokAccountJwtResponse",
1785
+ }
1786
+ response_data = self.api_client.call_api(
1787
+ *_param,
1788
+ _request_timeout=_request_timeout
1789
+ )
1790
+ return response_data.response
1791
+
1792
+
1793
+ def _get_grok_account_jwt_query_serialize(
1794
+ self,
1795
+ path_query_id,
1796
+ variables,
1797
+ _request_auth,
1798
+ _content_type,
1799
+ _headers,
1800
+ _host_index,
1801
+ ) -> RequestSerialized:
1802
+
1803
+ _host = None
1804
+
1805
+ _collection_formats: Dict[str, str] = {
1806
+ }
1807
+
1808
+ _path_params: Dict[str, str] = {}
1809
+ _query_params: List[Tuple[str, str]] = []
1810
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1811
+ _form_params: List[Tuple[str, str]] = []
1812
+ _files: Dict[
1813
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1814
+ ] = {}
1815
+ _body_params: Optional[bytes] = None
1816
+
1817
+ # process the path parameters
1818
+ if path_query_id is not None:
1819
+ _path_params['pathQueryId'] = path_query_id
1820
+ # process the query parameters
1821
+ if variables is not None:
1822
+
1823
+ _query_params.append(('variables', variables))
1824
+
1825
+ # process the header parameters
1826
+ # process the form parameters
1827
+ # process the body parameter
1828
+
1829
+
1830
+ # set the HTTP header `Accept`
1831
+ if 'Accept' not in _header_params:
1832
+ _header_params['Accept'] = self.api_client.select_header_accept(
1833
+ [
1834
+ 'application/json'
1835
+ ]
1836
+ )
1837
+
1838
+
1839
+ # authentication setting
1840
+ _auth_settings: List[str] = [
1841
+ 'Accept',
1842
+ 'ClientLanguage',
1843
+ 'Priority',
1844
+ 'Referer',
1845
+ 'SecFetchDest',
1846
+ 'SecChUaPlatform',
1847
+ 'SecFetchMode',
1848
+ 'CsrfToken',
1849
+ 'ClientUuid',
1850
+ 'BearerAuth',
1851
+ 'GuestToken',
1852
+ 'SecChUa',
1853
+ 'CookieGt0',
1854
+ 'ClientTransactionId',
1855
+ 'ActiveUser',
1856
+ 'CookieCt0',
1857
+ 'UserAgent',
1858
+ 'AcceptLanguage',
1859
+ 'SecFetchSite',
1860
+ 'AuthType',
1861
+ 'CookieAuthToken',
1862
+ 'SecChUaMobile',
1863
+ 'AcceptEncoding'
1864
+ ]
1865
+
1866
+ return self.api_client.param_serialize(
1867
+ method='GET',
1868
+ resource_path='/graphql/{pathQueryId}/grokAccountJwtQuery',
1869
+ path_params=_path_params,
1870
+ query_params=_query_params,
1871
+ header_params=_header_params,
1872
+ body=_body_params,
1873
+ post_params=_form_params,
1874
+ files=_files,
1875
+ auth_settings=_auth_settings,
1876
+ collection_formats=_collection_formats,
1877
+ _host=_host,
1878
+ _request_auth=_request_auth
1879
+ )
1880
+
1881
+
1882
+
1883
+
1884
+ @validate_call
1885
+ def get_grok_home(
1886
+ self,
1887
+ path_query_id: StrictStr,
1888
+ variables: StrictStr,
1889
+ _request_timeout: Union[
1890
+ None,
1891
+ Annotated[StrictFloat, Field(gt=0)],
1892
+ Tuple[
1893
+ Annotated[StrictFloat, Field(gt=0)],
1894
+ Annotated[StrictFloat, Field(gt=0)]
1895
+ ]
1896
+ ] = None,
1897
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1898
+ _content_type: Optional[StrictStr] = None,
1899
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1900
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1901
+ ) -> GrokHomeResponse:
1902
+ """get_grok_home
1903
+
1904
+ Grok home: model options, prompts and eligibility
1905
+
1906
+ :param path_query_id: (required)
1907
+ :type path_query_id: str
1908
+ :param variables: (required)
1909
+ :type variables: str
1910
+ :param _request_timeout: timeout setting for this request. If one
1911
+ number provided, it will be total request
1912
+ timeout. It can also be a pair (tuple) of
1913
+ (connection, read) timeouts.
1914
+ :type _request_timeout: int, tuple(int, int), optional
1915
+ :param _request_auth: set to override the auth_settings for an a single
1916
+ request; this effectively ignores the
1917
+ authentication in the spec for a single request.
1918
+ :type _request_auth: dict, optional
1919
+ :param _content_type: force content-type for the request.
1920
+ :type _content_type: str, Optional
1921
+ :param _headers: set to override the headers for a single
1922
+ request; this effectively ignores the headers
1923
+ in the spec for a single request.
1924
+ :type _headers: dict, optional
1925
+ :param _host_index: set to override the host_index for a single
1926
+ request; this effectively ignores the host_index
1927
+ in the spec for a single request.
1928
+ :type _host_index: int, optional
1929
+ :return: Returns the result object.
1930
+ """ # noqa: E501
1931
+
1932
+ _param = self._get_grok_home_serialize(
1933
+ path_query_id=path_query_id,
1934
+ variables=variables,
1935
+ _request_auth=_request_auth,
1936
+ _content_type=_content_type,
1937
+ _headers=_headers,
1938
+ _host_index=_host_index
1939
+ )
1940
+
1941
+ _response_types_map: Dict[str, Optional[str]] = {
1942
+ '200': "GrokHomeResponse",
1943
+ }
1944
+ response_data = self.api_client.call_api(
1945
+ *_param,
1946
+ _request_timeout=_request_timeout
1947
+ )
1948
+ response_data.read()
1949
+ return self.api_client.response_deserialize(
1950
+ response_data=response_data,
1951
+ response_types_map=_response_types_map,
1952
+ ).data
1953
+
1954
+
1955
+ @validate_call
1956
+ def get_grok_home_with_http_info(
1957
+ self,
1958
+ path_query_id: StrictStr,
1959
+ variables: StrictStr,
1960
+ _request_timeout: Union[
1961
+ None,
1962
+ Annotated[StrictFloat, Field(gt=0)],
1963
+ Tuple[
1964
+ Annotated[StrictFloat, Field(gt=0)],
1965
+ Annotated[StrictFloat, Field(gt=0)]
1966
+ ]
1967
+ ] = None,
1968
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1969
+ _content_type: Optional[StrictStr] = None,
1970
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1971
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1972
+ ) -> ApiResponse[GrokHomeResponse]:
1973
+ """get_grok_home
1974
+
1975
+ Grok home: model options, prompts and eligibility
1976
+
1977
+ :param path_query_id: (required)
1978
+ :type path_query_id: str
1979
+ :param variables: (required)
1980
+ :type variables: str
1981
+ :param _request_timeout: timeout setting for this request. If one
1982
+ number provided, it will be total request
1983
+ timeout. It can also be a pair (tuple) of
1984
+ (connection, read) timeouts.
1985
+ :type _request_timeout: int, tuple(int, int), optional
1986
+ :param _request_auth: set to override the auth_settings for an a single
1987
+ request; this effectively ignores the
1988
+ authentication in the spec for a single request.
1989
+ :type _request_auth: dict, optional
1990
+ :param _content_type: force content-type for the request.
1991
+ :type _content_type: str, Optional
1992
+ :param _headers: set to override the headers for a single
1993
+ request; this effectively ignores the headers
1994
+ in the spec for a single request.
1995
+ :type _headers: dict, optional
1996
+ :param _host_index: set to override the host_index for a single
1997
+ request; this effectively ignores the host_index
1998
+ in the spec for a single request.
1999
+ :type _host_index: int, optional
2000
+ :return: Returns the result object.
2001
+ """ # noqa: E501
2002
+
2003
+ _param = self._get_grok_home_serialize(
2004
+ path_query_id=path_query_id,
2005
+ variables=variables,
2006
+ _request_auth=_request_auth,
2007
+ _content_type=_content_type,
2008
+ _headers=_headers,
2009
+ _host_index=_host_index
2010
+ )
2011
+
2012
+ _response_types_map: Dict[str, Optional[str]] = {
2013
+ '200': "GrokHomeResponse",
2014
+ }
2015
+ response_data = self.api_client.call_api(
2016
+ *_param,
2017
+ _request_timeout=_request_timeout
2018
+ )
2019
+ response_data.read()
2020
+ return self.api_client.response_deserialize(
2021
+ response_data=response_data,
2022
+ response_types_map=_response_types_map,
2023
+ )
2024
+
2025
+
2026
+ @validate_call
2027
+ def get_grok_home_without_preload_content(
2028
+ self,
2029
+ path_query_id: StrictStr,
2030
+ variables: StrictStr,
2031
+ _request_timeout: Union[
2032
+ None,
2033
+ Annotated[StrictFloat, Field(gt=0)],
2034
+ Tuple[
2035
+ Annotated[StrictFloat, Field(gt=0)],
2036
+ Annotated[StrictFloat, Field(gt=0)]
2037
+ ]
2038
+ ] = None,
2039
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2040
+ _content_type: Optional[StrictStr] = None,
2041
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2042
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2043
+ ) -> RESTResponseType:
2044
+ """get_grok_home
2045
+
2046
+ Grok home: model options, prompts and eligibility
2047
+
2048
+ :param path_query_id: (required)
2049
+ :type path_query_id: str
2050
+ :param variables: (required)
2051
+ :type variables: str
2052
+ :param _request_timeout: timeout setting for this request. If one
2053
+ number provided, it will be total request
2054
+ timeout. It can also be a pair (tuple) of
2055
+ (connection, read) timeouts.
2056
+ :type _request_timeout: int, tuple(int, int), optional
2057
+ :param _request_auth: set to override the auth_settings for an a single
2058
+ request; this effectively ignores the
2059
+ authentication in the spec for a single request.
2060
+ :type _request_auth: dict, optional
2061
+ :param _content_type: force content-type for the request.
2062
+ :type _content_type: str, Optional
2063
+ :param _headers: set to override the headers for a single
2064
+ request; this effectively ignores the headers
2065
+ in the spec for a single request.
2066
+ :type _headers: dict, optional
2067
+ :param _host_index: set to override the host_index for a single
2068
+ request; this effectively ignores the host_index
2069
+ in the spec for a single request.
2070
+ :type _host_index: int, optional
2071
+ :return: Returns the result object.
2072
+ """ # noqa: E501
2073
+
2074
+ _param = self._get_grok_home_serialize(
2075
+ path_query_id=path_query_id,
2076
+ variables=variables,
2077
+ _request_auth=_request_auth,
2078
+ _content_type=_content_type,
2079
+ _headers=_headers,
2080
+ _host_index=_host_index
2081
+ )
2082
+
2083
+ _response_types_map: Dict[str, Optional[str]] = {
2084
+ '200': "GrokHomeResponse",
2085
+ }
2086
+ response_data = self.api_client.call_api(
2087
+ *_param,
2088
+ _request_timeout=_request_timeout
2089
+ )
2090
+ return response_data.response
2091
+
2092
+
2093
+ def _get_grok_home_serialize(
2094
+ self,
2095
+ path_query_id,
2096
+ variables,
2097
+ _request_auth,
2098
+ _content_type,
2099
+ _headers,
2100
+ _host_index,
2101
+ ) -> RequestSerialized:
2102
+
2103
+ _host = None
2104
+
2105
+ _collection_formats: Dict[str, str] = {
2106
+ }
2107
+
2108
+ _path_params: Dict[str, str] = {}
2109
+ _query_params: List[Tuple[str, str]] = []
2110
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2111
+ _form_params: List[Tuple[str, str]] = []
2112
+ _files: Dict[
2113
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2114
+ ] = {}
2115
+ _body_params: Optional[bytes] = None
2116
+
2117
+ # process the path parameters
2118
+ if path_query_id is not None:
2119
+ _path_params['pathQueryId'] = path_query_id
2120
+ # process the query parameters
2121
+ if variables is not None:
2122
+
2123
+ _query_params.append(('variables', variables))
2124
+
2125
+ # process the header parameters
2126
+ # process the form parameters
2127
+ # process the body parameter
2128
+
2129
+
2130
+ # set the HTTP header `Accept`
2131
+ if 'Accept' not in _header_params:
2132
+ _header_params['Accept'] = self.api_client.select_header_accept(
2133
+ [
2134
+ 'application/json'
2135
+ ]
2136
+ )
2137
+
2138
+
2139
+ # authentication setting
2140
+ _auth_settings: List[str] = [
2141
+ 'Accept',
2142
+ 'ClientLanguage',
2143
+ 'Priority',
2144
+ 'Referer',
2145
+ 'SecFetchDest',
2146
+ 'SecChUaPlatform',
2147
+ 'SecFetchMode',
2148
+ 'CsrfToken',
2149
+ 'ClientUuid',
2150
+ 'BearerAuth',
2151
+ 'GuestToken',
2152
+ 'SecChUa',
2153
+ 'CookieGt0',
2154
+ 'ClientTransactionId',
2155
+ 'ActiveUser',
2156
+ 'CookieCt0',
2157
+ 'UserAgent',
2158
+ 'AcceptLanguage',
2159
+ 'SecFetchSite',
2160
+ 'AuthType',
2161
+ 'CookieAuthToken',
2162
+ 'SecChUaMobile',
2163
+ 'AcceptEncoding'
2164
+ ]
2165
+
2166
+ return self.api_client.param_serialize(
2167
+ method='GET',
2168
+ resource_path='/graphql/{pathQueryId}/GrokHome',
2169
+ path_params=_path_params,
2170
+ query_params=_query_params,
2171
+ header_params=_header_params,
2172
+ body=_body_params,
2173
+ post_params=_form_params,
2174
+ files=_files,
2175
+ auth_settings=_auth_settings,
2176
+ collection_formats=_collection_formats,
2177
+ _host=_host,
2178
+ _request_auth=_request_auth
2179
+ )
2180
+
2181
+
2182
+
2183
+
2184
+ @validate_call
2185
+ def get_pinned_timelines(
2186
+ self,
2187
+ path_query_id: StrictStr,
2188
+ features: StrictStr,
2189
+ variables: StrictStr,
2190
+ _request_timeout: Union[
2191
+ None,
2192
+ Annotated[StrictFloat, Field(gt=0)],
2193
+ Tuple[
2194
+ Annotated[StrictFloat, Field(gt=0)],
2195
+ Annotated[StrictFloat, Field(gt=0)]
2196
+ ]
2197
+ ] = None,
2198
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2199
+ _content_type: Optional[StrictStr] = None,
2200
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2201
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2202
+ ) -> PinnedTimelinesResponse:
2203
+ """get_pinned_timelines
2204
+
2205
+ the account's pinned timelines
2206
+
2207
+ :param path_query_id: (required)
2208
+ :type path_query_id: str
2209
+ :param features: (required)
2210
+ :type features: str
2211
+ :param variables: (required)
2212
+ :type variables: str
2213
+ :param _request_timeout: timeout setting for this request. If one
2214
+ number provided, it will be total request
2215
+ timeout. It can also be a pair (tuple) of
2216
+ (connection, read) timeouts.
2217
+ :type _request_timeout: int, tuple(int, int), optional
2218
+ :param _request_auth: set to override the auth_settings for an a single
2219
+ request; this effectively ignores the
2220
+ authentication in the spec for a single request.
2221
+ :type _request_auth: dict, optional
2222
+ :param _content_type: force content-type for the request.
2223
+ :type _content_type: str, Optional
2224
+ :param _headers: set to override the headers for a single
2225
+ request; this effectively ignores the headers
2226
+ in the spec for a single request.
2227
+ :type _headers: dict, optional
2228
+ :param _host_index: set to override the host_index for a single
2229
+ request; this effectively ignores the host_index
2230
+ in the spec for a single request.
2231
+ :type _host_index: int, optional
2232
+ :return: Returns the result object.
2233
+ """ # noqa: E501
2234
+
2235
+ _param = self._get_pinned_timelines_serialize(
2236
+ path_query_id=path_query_id,
2237
+ features=features,
2238
+ variables=variables,
2239
+ _request_auth=_request_auth,
2240
+ _content_type=_content_type,
2241
+ _headers=_headers,
2242
+ _host_index=_host_index
2243
+ )
2244
+
2245
+ _response_types_map: Dict[str, Optional[str]] = {
2246
+ '200': "PinnedTimelinesResponse",
2247
+ }
2248
+ response_data = self.api_client.call_api(
2249
+ *_param,
2250
+ _request_timeout=_request_timeout
2251
+ )
2252
+ response_data.read()
2253
+ return self.api_client.response_deserialize(
2254
+ response_data=response_data,
2255
+ response_types_map=_response_types_map,
2256
+ ).data
2257
+
2258
+
2259
+ @validate_call
2260
+ def get_pinned_timelines_with_http_info(
2261
+ self,
2262
+ path_query_id: StrictStr,
2263
+ features: StrictStr,
2264
+ variables: StrictStr,
2265
+ _request_timeout: Union[
2266
+ None,
2267
+ Annotated[StrictFloat, Field(gt=0)],
2268
+ Tuple[
2269
+ Annotated[StrictFloat, Field(gt=0)],
2270
+ Annotated[StrictFloat, Field(gt=0)]
2271
+ ]
2272
+ ] = None,
2273
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2274
+ _content_type: Optional[StrictStr] = None,
2275
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2276
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2277
+ ) -> ApiResponse[PinnedTimelinesResponse]:
2278
+ """get_pinned_timelines
2279
+
2280
+ the account's pinned timelines
2281
+
2282
+ :param path_query_id: (required)
2283
+ :type path_query_id: str
2284
+ :param features: (required)
2285
+ :type features: str
2286
+ :param variables: (required)
2287
+ :type variables: str
2288
+ :param _request_timeout: timeout setting for this request. If one
2289
+ number provided, it will be total request
2290
+ timeout. It can also be a pair (tuple) of
2291
+ (connection, read) timeouts.
2292
+ :type _request_timeout: int, tuple(int, int), optional
2293
+ :param _request_auth: set to override the auth_settings for an a single
2294
+ request; this effectively ignores the
2295
+ authentication in the spec for a single request.
2296
+ :type _request_auth: dict, optional
2297
+ :param _content_type: force content-type for the request.
2298
+ :type _content_type: str, Optional
2299
+ :param _headers: set to override the headers for a single
2300
+ request; this effectively ignores the headers
2301
+ in the spec for a single request.
2302
+ :type _headers: dict, optional
2303
+ :param _host_index: set to override the host_index for a single
2304
+ request; this effectively ignores the host_index
2305
+ in the spec for a single request.
2306
+ :type _host_index: int, optional
2307
+ :return: Returns the result object.
2308
+ """ # noqa: E501
2309
+
2310
+ _param = self._get_pinned_timelines_serialize(
2311
+ path_query_id=path_query_id,
2312
+ features=features,
2313
+ variables=variables,
2314
+ _request_auth=_request_auth,
2315
+ _content_type=_content_type,
2316
+ _headers=_headers,
2317
+ _host_index=_host_index
2318
+ )
2319
+
2320
+ _response_types_map: Dict[str, Optional[str]] = {
2321
+ '200': "PinnedTimelinesResponse",
2322
+ }
2323
+ response_data = self.api_client.call_api(
2324
+ *_param,
2325
+ _request_timeout=_request_timeout
2326
+ )
2327
+ response_data.read()
2328
+ return self.api_client.response_deserialize(
2329
+ response_data=response_data,
2330
+ response_types_map=_response_types_map,
2331
+ )
2332
+
2333
+
2334
+ @validate_call
2335
+ def get_pinned_timelines_without_preload_content(
2336
+ self,
2337
+ path_query_id: StrictStr,
2338
+ features: StrictStr,
2339
+ variables: StrictStr,
2340
+ _request_timeout: Union[
2341
+ None,
2342
+ Annotated[StrictFloat, Field(gt=0)],
2343
+ Tuple[
2344
+ Annotated[StrictFloat, Field(gt=0)],
2345
+ Annotated[StrictFloat, Field(gt=0)]
2346
+ ]
2347
+ ] = None,
2348
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2349
+ _content_type: Optional[StrictStr] = None,
2350
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2351
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2352
+ ) -> RESTResponseType:
2353
+ """get_pinned_timelines
2354
+
2355
+ the account's pinned timelines
2356
+
2357
+ :param path_query_id: (required)
2358
+ :type path_query_id: str
2359
+ :param features: (required)
2360
+ :type features: str
2361
+ :param variables: (required)
2362
+ :type variables: str
2363
+ :param _request_timeout: timeout setting for this request. If one
2364
+ number provided, it will be total request
2365
+ timeout. It can also be a pair (tuple) of
2366
+ (connection, read) timeouts.
2367
+ :type _request_timeout: int, tuple(int, int), optional
2368
+ :param _request_auth: set to override the auth_settings for an a single
2369
+ request; this effectively ignores the
2370
+ authentication in the spec for a single request.
2371
+ :type _request_auth: dict, optional
2372
+ :param _content_type: force content-type for the request.
2373
+ :type _content_type: str, Optional
2374
+ :param _headers: set to override the headers for a single
2375
+ request; this effectively ignores the headers
2376
+ in the spec for a single request.
2377
+ :type _headers: dict, optional
2378
+ :param _host_index: set to override the host_index for a single
2379
+ request; this effectively ignores the host_index
2380
+ in the spec for a single request.
2381
+ :type _host_index: int, optional
2382
+ :return: Returns the result object.
2383
+ """ # noqa: E501
2384
+
2385
+ _param = self._get_pinned_timelines_serialize(
2386
+ path_query_id=path_query_id,
2387
+ features=features,
2388
+ variables=variables,
2389
+ _request_auth=_request_auth,
2390
+ _content_type=_content_type,
2391
+ _headers=_headers,
2392
+ _host_index=_host_index
2393
+ )
2394
+
2395
+ _response_types_map: Dict[str, Optional[str]] = {
2396
+ '200': "PinnedTimelinesResponse",
2397
+ }
2398
+ response_data = self.api_client.call_api(
2399
+ *_param,
2400
+ _request_timeout=_request_timeout
2401
+ )
2402
+ return response_data.response
2403
+
2404
+
2405
+ def _get_pinned_timelines_serialize(
2406
+ self,
2407
+ path_query_id,
2408
+ features,
2409
+ variables,
2410
+ _request_auth,
2411
+ _content_type,
2412
+ _headers,
2413
+ _host_index,
2414
+ ) -> RequestSerialized:
2415
+
2416
+ _host = None
2417
+
2418
+ _collection_formats: Dict[str, str] = {
2419
+ }
2420
+
2421
+ _path_params: Dict[str, str] = {}
2422
+ _query_params: List[Tuple[str, str]] = []
2423
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2424
+ _form_params: List[Tuple[str, str]] = []
2425
+ _files: Dict[
2426
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2427
+ ] = {}
2428
+ _body_params: Optional[bytes] = None
2429
+
2430
+ # process the path parameters
2431
+ if path_query_id is not None:
2432
+ _path_params['pathQueryId'] = path_query_id
2433
+ # process the query parameters
2434
+ if features is not None:
2435
+
2436
+ _query_params.append(('features', features))
2437
+
2438
+ if variables is not None:
2439
+
2440
+ _query_params.append(('variables', variables))
2441
+
2442
+ # process the header parameters
2443
+ # process the form parameters
2444
+ # process the body parameter
2445
+
2446
+
2447
+ # set the HTTP header `Accept`
2448
+ if 'Accept' not in _header_params:
2449
+ _header_params['Accept'] = self.api_client.select_header_accept(
2450
+ [
2451
+ 'application/json'
2452
+ ]
2453
+ )
2454
+
2455
+
2456
+ # authentication setting
2457
+ _auth_settings: List[str] = [
2458
+ 'Accept',
2459
+ 'ClientLanguage',
2460
+ 'Priority',
2461
+ 'Referer',
2462
+ 'SecFetchDest',
2463
+ 'SecChUaPlatform',
2464
+ 'SecFetchMode',
2465
+ 'CsrfToken',
2466
+ 'ClientUuid',
2467
+ 'BearerAuth',
2468
+ 'GuestToken',
2469
+ 'SecChUa',
2470
+ 'CookieGt0',
2471
+ 'ClientTransactionId',
2472
+ 'ActiveUser',
2473
+ 'CookieCt0',
2474
+ 'UserAgent',
2475
+ 'AcceptLanguage',
2476
+ 'SecFetchSite',
2477
+ 'AuthType',
2478
+ 'CookieAuthToken',
2479
+ 'SecChUaMobile',
2480
+ 'AcceptEncoding'
2481
+ ]
2482
+
2483
+ return self.api_client.param_serialize(
2484
+ method='GET',
2485
+ resource_path='/graphql/{pathQueryId}/PinnedTimelines',
2486
+ path_params=_path_params,
2487
+ query_params=_query_params,
2488
+ header_params=_header_params,
2489
+ body=_body_params,
2490
+ post_params=_form_params,
2491
+ files=_files,
2492
+ auth_settings=_auth_settings,
2493
+ collection_formats=_collection_formats,
2494
+ _host=_host,
2495
+ _request_auth=_request_auth
2496
+ )
2497
+
2498
+
2499
+
2500
+
41
2501
  @validate_call
42
2502
  def get_profile_spotlights_query(
43
2503
  self,
@@ -56,10 +2516,328 @@ class DefaultApi:
56
2516
  _content_type: Optional[StrictStr] = None,
57
2517
  _headers: Optional[Dict[StrictStr, Any]] = None,
58
2518
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
59
- ) -> ProfileResponse:
60
- """get_profile_spotlights_query
2519
+ ) -> ProfileResponse:
2520
+ """get_profile_spotlights_query
2521
+
2522
+ get user by screen name
2523
+
2524
+ :param path_query_id: (required)
2525
+ :type path_query_id: str
2526
+ :param variables: (required)
2527
+ :type variables: str
2528
+ :param features: (required)
2529
+ :type features: str
2530
+ :param _request_timeout: timeout setting for this request. If one
2531
+ number provided, it will be total request
2532
+ timeout. It can also be a pair (tuple) of
2533
+ (connection, read) timeouts.
2534
+ :type _request_timeout: int, tuple(int, int), optional
2535
+ :param _request_auth: set to override the auth_settings for an a single
2536
+ request; this effectively ignores the
2537
+ authentication in the spec for a single request.
2538
+ :type _request_auth: dict, optional
2539
+ :param _content_type: force content-type for the request.
2540
+ :type _content_type: str, Optional
2541
+ :param _headers: set to override the headers for a single
2542
+ request; this effectively ignores the headers
2543
+ in the spec for a single request.
2544
+ :type _headers: dict, optional
2545
+ :param _host_index: set to override the host_index for a single
2546
+ request; this effectively ignores the host_index
2547
+ in the spec for a single request.
2548
+ :type _host_index: int, optional
2549
+ :return: Returns the result object.
2550
+ """ # noqa: E501
2551
+
2552
+ _param = self._get_profile_spotlights_query_serialize(
2553
+ path_query_id=path_query_id,
2554
+ variables=variables,
2555
+ features=features,
2556
+ _request_auth=_request_auth,
2557
+ _content_type=_content_type,
2558
+ _headers=_headers,
2559
+ _host_index=_host_index
2560
+ )
2561
+
2562
+ _response_types_map: Dict[str, Optional[str]] = {
2563
+ '200': "ProfileResponse",
2564
+ }
2565
+ response_data = self.api_client.call_api(
2566
+ *_param,
2567
+ _request_timeout=_request_timeout
2568
+ )
2569
+ response_data.read()
2570
+ return self.api_client.response_deserialize(
2571
+ response_data=response_data,
2572
+ response_types_map=_response_types_map,
2573
+ ).data
2574
+
2575
+
2576
+ @validate_call
2577
+ def get_profile_spotlights_query_with_http_info(
2578
+ self,
2579
+ path_query_id: StrictStr,
2580
+ variables: StrictStr,
2581
+ features: StrictStr,
2582
+ _request_timeout: Union[
2583
+ None,
2584
+ Annotated[StrictFloat, Field(gt=0)],
2585
+ Tuple[
2586
+ Annotated[StrictFloat, Field(gt=0)],
2587
+ Annotated[StrictFloat, Field(gt=0)]
2588
+ ]
2589
+ ] = None,
2590
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2591
+ _content_type: Optional[StrictStr] = None,
2592
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2593
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2594
+ ) -> ApiResponse[ProfileResponse]:
2595
+ """get_profile_spotlights_query
2596
+
2597
+ get user by screen name
2598
+
2599
+ :param path_query_id: (required)
2600
+ :type path_query_id: str
2601
+ :param variables: (required)
2602
+ :type variables: str
2603
+ :param features: (required)
2604
+ :type features: str
2605
+ :param _request_timeout: timeout setting for this request. If one
2606
+ number provided, it will be total request
2607
+ timeout. It can also be a pair (tuple) of
2608
+ (connection, read) timeouts.
2609
+ :type _request_timeout: int, tuple(int, int), optional
2610
+ :param _request_auth: set to override the auth_settings for an a single
2611
+ request; this effectively ignores the
2612
+ authentication in the spec for a single request.
2613
+ :type _request_auth: dict, optional
2614
+ :param _content_type: force content-type for the request.
2615
+ :type _content_type: str, Optional
2616
+ :param _headers: set to override the headers for a single
2617
+ request; this effectively ignores the headers
2618
+ in the spec for a single request.
2619
+ :type _headers: dict, optional
2620
+ :param _host_index: set to override the host_index for a single
2621
+ request; this effectively ignores the host_index
2622
+ in the spec for a single request.
2623
+ :type _host_index: int, optional
2624
+ :return: Returns the result object.
2625
+ """ # noqa: E501
2626
+
2627
+ _param = self._get_profile_spotlights_query_serialize(
2628
+ path_query_id=path_query_id,
2629
+ variables=variables,
2630
+ features=features,
2631
+ _request_auth=_request_auth,
2632
+ _content_type=_content_type,
2633
+ _headers=_headers,
2634
+ _host_index=_host_index
2635
+ )
2636
+
2637
+ _response_types_map: Dict[str, Optional[str]] = {
2638
+ '200': "ProfileResponse",
2639
+ }
2640
+ response_data = self.api_client.call_api(
2641
+ *_param,
2642
+ _request_timeout=_request_timeout
2643
+ )
2644
+ response_data.read()
2645
+ return self.api_client.response_deserialize(
2646
+ response_data=response_data,
2647
+ response_types_map=_response_types_map,
2648
+ )
2649
+
2650
+
2651
+ @validate_call
2652
+ def get_profile_spotlights_query_without_preload_content(
2653
+ self,
2654
+ path_query_id: StrictStr,
2655
+ variables: StrictStr,
2656
+ features: StrictStr,
2657
+ _request_timeout: Union[
2658
+ None,
2659
+ Annotated[StrictFloat, Field(gt=0)],
2660
+ Tuple[
2661
+ Annotated[StrictFloat, Field(gt=0)],
2662
+ Annotated[StrictFloat, Field(gt=0)]
2663
+ ]
2664
+ ] = None,
2665
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2666
+ _content_type: Optional[StrictStr] = None,
2667
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2668
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2669
+ ) -> RESTResponseType:
2670
+ """get_profile_spotlights_query
2671
+
2672
+ get user by screen name
2673
+
2674
+ :param path_query_id: (required)
2675
+ :type path_query_id: str
2676
+ :param variables: (required)
2677
+ :type variables: str
2678
+ :param features: (required)
2679
+ :type features: str
2680
+ :param _request_timeout: timeout setting for this request. If one
2681
+ number provided, it will be total request
2682
+ timeout. It can also be a pair (tuple) of
2683
+ (connection, read) timeouts.
2684
+ :type _request_timeout: int, tuple(int, int), optional
2685
+ :param _request_auth: set to override the auth_settings for an a single
2686
+ request; this effectively ignores the
2687
+ authentication in the spec for a single request.
2688
+ :type _request_auth: dict, optional
2689
+ :param _content_type: force content-type for the request.
2690
+ :type _content_type: str, Optional
2691
+ :param _headers: set to override the headers for a single
2692
+ request; this effectively ignores the headers
2693
+ in the spec for a single request.
2694
+ :type _headers: dict, optional
2695
+ :param _host_index: set to override the host_index for a single
2696
+ request; this effectively ignores the host_index
2697
+ in the spec for a single request.
2698
+ :type _host_index: int, optional
2699
+ :return: Returns the result object.
2700
+ """ # noqa: E501
2701
+
2702
+ _param = self._get_profile_spotlights_query_serialize(
2703
+ path_query_id=path_query_id,
2704
+ variables=variables,
2705
+ features=features,
2706
+ _request_auth=_request_auth,
2707
+ _content_type=_content_type,
2708
+ _headers=_headers,
2709
+ _host_index=_host_index
2710
+ )
2711
+
2712
+ _response_types_map: Dict[str, Optional[str]] = {
2713
+ '200': "ProfileResponse",
2714
+ }
2715
+ response_data = self.api_client.call_api(
2716
+ *_param,
2717
+ _request_timeout=_request_timeout
2718
+ )
2719
+ return response_data.response
2720
+
2721
+
2722
+ def _get_profile_spotlights_query_serialize(
2723
+ self,
2724
+ path_query_id,
2725
+ variables,
2726
+ features,
2727
+ _request_auth,
2728
+ _content_type,
2729
+ _headers,
2730
+ _host_index,
2731
+ ) -> RequestSerialized:
2732
+
2733
+ _host = None
2734
+
2735
+ _collection_formats: Dict[str, str] = {
2736
+ }
2737
+
2738
+ _path_params: Dict[str, str] = {}
2739
+ _query_params: List[Tuple[str, str]] = []
2740
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2741
+ _form_params: List[Tuple[str, str]] = []
2742
+ _files: Dict[
2743
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2744
+ ] = {}
2745
+ _body_params: Optional[bytes] = None
2746
+
2747
+ # process the path parameters
2748
+ if path_query_id is not None:
2749
+ _path_params['pathQueryId'] = path_query_id
2750
+ # process the query parameters
2751
+ if variables is not None:
2752
+
2753
+ _query_params.append(('variables', variables))
2754
+
2755
+ if features is not None:
2756
+
2757
+ _query_params.append(('features', features))
2758
+
2759
+ # process the header parameters
2760
+ # process the form parameters
2761
+ # process the body parameter
2762
+
2763
+
2764
+ # set the HTTP header `Accept`
2765
+ if 'Accept' not in _header_params:
2766
+ _header_params['Accept'] = self.api_client.select_header_accept(
2767
+ [
2768
+ 'application/json'
2769
+ ]
2770
+ )
2771
+
2772
+
2773
+ # authentication setting
2774
+ _auth_settings: List[str] = [
2775
+ 'Accept',
2776
+ 'ClientLanguage',
2777
+ 'Priority',
2778
+ 'Referer',
2779
+ 'SecFetchDest',
2780
+ 'SecChUaPlatform',
2781
+ 'SecFetchMode',
2782
+ 'CsrfToken',
2783
+ 'ClientUuid',
2784
+ 'BearerAuth',
2785
+ 'GuestToken',
2786
+ 'SecChUa',
2787
+ 'CookieGt0',
2788
+ 'ClientTransactionId',
2789
+ 'ActiveUser',
2790
+ 'CookieCt0',
2791
+ 'UserAgent',
2792
+ 'AcceptLanguage',
2793
+ 'SecFetchSite',
2794
+ 'AuthType',
2795
+ 'CookieAuthToken',
2796
+ 'SecChUaMobile',
2797
+ 'AcceptEncoding'
2798
+ ]
2799
+
2800
+ return self.api_client.param_serialize(
2801
+ method='GET',
2802
+ resource_path='/graphql/{pathQueryId}/ProfileSpotlightsQuery',
2803
+ path_params=_path_params,
2804
+ query_params=_query_params,
2805
+ header_params=_header_params,
2806
+ body=_body_params,
2807
+ post_params=_form_params,
2808
+ files=_files,
2809
+ auth_settings=_auth_settings,
2810
+ collection_formats=_collection_formats,
2811
+ _host=_host,
2812
+ _request_auth=_request_auth
2813
+ )
2814
+
2815
+
2816
+
2817
+
2818
+ @validate_call
2819
+ def get_tweet_result_by_rest_id(
2820
+ self,
2821
+ path_query_id: StrictStr,
2822
+ variables: StrictStr,
2823
+ features: StrictStr,
2824
+ field_toggles: StrictStr,
2825
+ _request_timeout: Union[
2826
+ None,
2827
+ Annotated[StrictFloat, Field(gt=0)],
2828
+ Tuple[
2829
+ Annotated[StrictFloat, Field(gt=0)],
2830
+ Annotated[StrictFloat, Field(gt=0)]
2831
+ ]
2832
+ ] = None,
2833
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2834
+ _content_type: Optional[StrictStr] = None,
2835
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2836
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2837
+ ) -> TweetResultByRestIdResponse:
2838
+ """get_tweet_result_by_rest_id
61
2839
 
62
- get user by screen name
2840
+ get TweetResultByRestId
63
2841
 
64
2842
  :param path_query_id: (required)
65
2843
  :type path_query_id: str
@@ -67,6 +2845,8 @@ class DefaultApi:
67
2845
  :type variables: str
68
2846
  :param features: (required)
69
2847
  :type features: str
2848
+ :param field_toggles: (required)
2849
+ :type field_toggles: str
70
2850
  :param _request_timeout: timeout setting for this request. If one
71
2851
  number provided, it will be total request
72
2852
  timeout. It can also be a pair (tuple) of
@@ -89,10 +2869,11 @@ class DefaultApi:
89
2869
  :return: Returns the result object.
90
2870
  """ # noqa: E501
91
2871
 
92
- _param = self._get_profile_spotlights_query_serialize(
2872
+ _param = self._get_tweet_result_by_rest_id_serialize(
93
2873
  path_query_id=path_query_id,
94
2874
  variables=variables,
95
2875
  features=features,
2876
+ field_toggles=field_toggles,
96
2877
  _request_auth=_request_auth,
97
2878
  _content_type=_content_type,
98
2879
  _headers=_headers,
@@ -100,7 +2881,7 @@ class DefaultApi:
100
2881
  )
101
2882
 
102
2883
  _response_types_map: Dict[str, Optional[str]] = {
103
- '200': "ProfileResponse",
2884
+ '200': "TweetResultByRestIdResponse",
104
2885
  }
105
2886
  response_data = self.api_client.call_api(
106
2887
  *_param,
@@ -114,11 +2895,12 @@ class DefaultApi:
114
2895
 
115
2896
 
116
2897
  @validate_call
117
- def get_profile_spotlights_query_with_http_info(
2898
+ def get_tweet_result_by_rest_id_with_http_info(
118
2899
  self,
119
2900
  path_query_id: StrictStr,
120
2901
  variables: StrictStr,
121
2902
  features: StrictStr,
2903
+ field_toggles: StrictStr,
122
2904
  _request_timeout: Union[
123
2905
  None,
124
2906
  Annotated[StrictFloat, Field(gt=0)],
@@ -131,10 +2913,10 @@ class DefaultApi:
131
2913
  _content_type: Optional[StrictStr] = None,
132
2914
  _headers: Optional[Dict[StrictStr, Any]] = None,
133
2915
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
134
- ) -> ApiResponse[ProfileResponse]:
135
- """get_profile_spotlights_query
2916
+ ) -> ApiResponse[TweetResultByRestIdResponse]:
2917
+ """get_tweet_result_by_rest_id
136
2918
 
137
- get user by screen name
2919
+ get TweetResultByRestId
138
2920
 
139
2921
  :param path_query_id: (required)
140
2922
  :type path_query_id: str
@@ -142,6 +2924,8 @@ class DefaultApi:
142
2924
  :type variables: str
143
2925
  :param features: (required)
144
2926
  :type features: str
2927
+ :param field_toggles: (required)
2928
+ :type field_toggles: str
145
2929
  :param _request_timeout: timeout setting for this request. If one
146
2930
  number provided, it will be total request
147
2931
  timeout. It can also be a pair (tuple) of
@@ -164,10 +2948,11 @@ class DefaultApi:
164
2948
  :return: Returns the result object.
165
2949
  """ # noqa: E501
166
2950
 
167
- _param = self._get_profile_spotlights_query_serialize(
2951
+ _param = self._get_tweet_result_by_rest_id_serialize(
168
2952
  path_query_id=path_query_id,
169
2953
  variables=variables,
170
2954
  features=features,
2955
+ field_toggles=field_toggles,
171
2956
  _request_auth=_request_auth,
172
2957
  _content_type=_content_type,
173
2958
  _headers=_headers,
@@ -175,7 +2960,7 @@ class DefaultApi:
175
2960
  )
176
2961
 
177
2962
  _response_types_map: Dict[str, Optional[str]] = {
178
- '200': "ProfileResponse",
2963
+ '200': "TweetResultByRestIdResponse",
179
2964
  }
180
2965
  response_data = self.api_client.call_api(
181
2966
  *_param,
@@ -189,11 +2974,12 @@ class DefaultApi:
189
2974
 
190
2975
 
191
2976
  @validate_call
192
- def get_profile_spotlights_query_without_preload_content(
2977
+ def get_tweet_result_by_rest_id_without_preload_content(
193
2978
  self,
194
2979
  path_query_id: StrictStr,
195
2980
  variables: StrictStr,
196
2981
  features: StrictStr,
2982
+ field_toggles: StrictStr,
197
2983
  _request_timeout: Union[
198
2984
  None,
199
2985
  Annotated[StrictFloat, Field(gt=0)],
@@ -207,9 +2993,9 @@ class DefaultApi:
207
2993
  _headers: Optional[Dict[StrictStr, Any]] = None,
208
2994
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
209
2995
  ) -> RESTResponseType:
210
- """get_profile_spotlights_query
2996
+ """get_tweet_result_by_rest_id
211
2997
 
212
- get user by screen name
2998
+ get TweetResultByRestId
213
2999
 
214
3000
  :param path_query_id: (required)
215
3001
  :type path_query_id: str
@@ -217,6 +3003,8 @@ class DefaultApi:
217
3003
  :type variables: str
218
3004
  :param features: (required)
219
3005
  :type features: str
3006
+ :param field_toggles: (required)
3007
+ :type field_toggles: str
220
3008
  :param _request_timeout: timeout setting for this request. If one
221
3009
  number provided, it will be total request
222
3010
  timeout. It can also be a pair (tuple) of
@@ -239,10 +3027,11 @@ class DefaultApi:
239
3027
  :return: Returns the result object.
240
3028
  """ # noqa: E501
241
3029
 
242
- _param = self._get_profile_spotlights_query_serialize(
3030
+ _param = self._get_tweet_result_by_rest_id_serialize(
243
3031
  path_query_id=path_query_id,
244
3032
  variables=variables,
245
3033
  features=features,
3034
+ field_toggles=field_toggles,
246
3035
  _request_auth=_request_auth,
247
3036
  _content_type=_content_type,
248
3037
  _headers=_headers,
@@ -250,7 +3039,7 @@ class DefaultApi:
250
3039
  )
251
3040
 
252
3041
  _response_types_map: Dict[str, Optional[str]] = {
253
- '200': "ProfileResponse",
3042
+ '200': "TweetResultByRestIdResponse",
254
3043
  }
255
3044
  response_data = self.api_client.call_api(
256
3045
  *_param,
@@ -259,11 +3048,12 @@ class DefaultApi:
259
3048
  return response_data.response
260
3049
 
261
3050
 
262
- def _get_profile_spotlights_query_serialize(
3051
+ def _get_tweet_result_by_rest_id_serialize(
263
3052
  self,
264
3053
  path_query_id,
265
3054
  variables,
266
3055
  features,
3056
+ field_toggles,
267
3057
  _request_auth,
268
3058
  _content_type,
269
3059
  _headers,
@@ -296,6 +3086,10 @@ class DefaultApi:
296
3086
 
297
3087
  _query_params.append(('features', features))
298
3088
 
3089
+ if field_toggles is not None:
3090
+
3091
+ _query_params.append(('fieldToggles', field_toggles))
3092
+
299
3093
  # process the header parameters
300
3094
  # process the form parameters
301
3095
  # process the body parameter
@@ -339,7 +3133,7 @@ class DefaultApi:
339
3133
 
340
3134
  return self.api_client.param_serialize(
341
3135
  method='GET',
342
- resource_path='/graphql/{pathQueryId}/ProfileSpotlightsQuery',
3136
+ resource_path='/graphql/{pathQueryId}/TweetResultByRestId',
343
3137
  path_params=_path_params,
344
3138
  query_params=_query_params,
345
3139
  header_params=_header_params,
@@ -356,12 +3150,10 @@ class DefaultApi:
356
3150
 
357
3151
 
358
3152
  @validate_call
359
- def get_tweet_result_by_rest_id(
3153
+ def get_use_story_topic_query(
360
3154
  self,
361
3155
  path_query_id: StrictStr,
362
3156
  variables: StrictStr,
363
- features: StrictStr,
364
- field_toggles: StrictStr,
365
3157
  _request_timeout: Union[
366
3158
  None,
367
3159
  Annotated[StrictFloat, Field(gt=0)],
@@ -374,19 +3166,15 @@ class DefaultApi:
374
3166
  _content_type: Optional[StrictStr] = None,
375
3167
  _headers: Optional[Dict[StrictStr, Any]] = None,
376
3168
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
377
- ) -> TweetResultByRestIdResponse:
378
- """get_tweet_result_by_rest_id
3169
+ ) -> StoryTopicResponse:
3170
+ """get_use_story_topic_query
379
3171
 
380
- get TweetResultByRestId
3172
+ AI-written stories of an explore topic (rest_id: For You)
381
3173
 
382
3174
  :param path_query_id: (required)
383
3175
  :type path_query_id: str
384
3176
  :param variables: (required)
385
3177
  :type variables: str
386
- :param features: (required)
387
- :type features: str
388
- :param field_toggles: (required)
389
- :type field_toggles: str
390
3178
  :param _request_timeout: timeout setting for this request. If one
391
3179
  number provided, it will be total request
392
3180
  timeout. It can also be a pair (tuple) of
@@ -409,11 +3197,9 @@ class DefaultApi:
409
3197
  :return: Returns the result object.
410
3198
  """ # noqa: E501
411
3199
 
412
- _param = self._get_tweet_result_by_rest_id_serialize(
3200
+ _param = self._get_use_story_topic_query_serialize(
413
3201
  path_query_id=path_query_id,
414
3202
  variables=variables,
415
- features=features,
416
- field_toggles=field_toggles,
417
3203
  _request_auth=_request_auth,
418
3204
  _content_type=_content_type,
419
3205
  _headers=_headers,
@@ -421,7 +3207,7 @@ class DefaultApi:
421
3207
  )
422
3208
 
423
3209
  _response_types_map: Dict[str, Optional[str]] = {
424
- '200': "TweetResultByRestIdResponse",
3210
+ '200': "StoryTopicResponse",
425
3211
  }
426
3212
  response_data = self.api_client.call_api(
427
3213
  *_param,
@@ -435,12 +3221,10 @@ class DefaultApi:
435
3221
 
436
3222
 
437
3223
  @validate_call
438
- def get_tweet_result_by_rest_id_with_http_info(
3224
+ def get_use_story_topic_query_with_http_info(
439
3225
  self,
440
3226
  path_query_id: StrictStr,
441
3227
  variables: StrictStr,
442
- features: StrictStr,
443
- field_toggles: StrictStr,
444
3228
  _request_timeout: Union[
445
3229
  None,
446
3230
  Annotated[StrictFloat, Field(gt=0)],
@@ -453,19 +3237,15 @@ class DefaultApi:
453
3237
  _content_type: Optional[StrictStr] = None,
454
3238
  _headers: Optional[Dict[StrictStr, Any]] = None,
455
3239
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
456
- ) -> ApiResponse[TweetResultByRestIdResponse]:
457
- """get_tweet_result_by_rest_id
3240
+ ) -> ApiResponse[StoryTopicResponse]:
3241
+ """get_use_story_topic_query
458
3242
 
459
- get TweetResultByRestId
3243
+ AI-written stories of an explore topic (rest_id: For You)
460
3244
 
461
3245
  :param path_query_id: (required)
462
3246
  :type path_query_id: str
463
3247
  :param variables: (required)
464
3248
  :type variables: str
465
- :param features: (required)
466
- :type features: str
467
- :param field_toggles: (required)
468
- :type field_toggles: str
469
3249
  :param _request_timeout: timeout setting for this request. If one
470
3250
  number provided, it will be total request
471
3251
  timeout. It can also be a pair (tuple) of
@@ -488,11 +3268,9 @@ class DefaultApi:
488
3268
  :return: Returns the result object.
489
3269
  """ # noqa: E501
490
3270
 
491
- _param = self._get_tweet_result_by_rest_id_serialize(
3271
+ _param = self._get_use_story_topic_query_serialize(
492
3272
  path_query_id=path_query_id,
493
3273
  variables=variables,
494
- features=features,
495
- field_toggles=field_toggles,
496
3274
  _request_auth=_request_auth,
497
3275
  _content_type=_content_type,
498
3276
  _headers=_headers,
@@ -500,7 +3278,7 @@ class DefaultApi:
500
3278
  )
501
3279
 
502
3280
  _response_types_map: Dict[str, Optional[str]] = {
503
- '200': "TweetResultByRestIdResponse",
3281
+ '200': "StoryTopicResponse",
504
3282
  }
505
3283
  response_data = self.api_client.call_api(
506
3284
  *_param,
@@ -514,12 +3292,10 @@ class DefaultApi:
514
3292
 
515
3293
 
516
3294
  @validate_call
517
- def get_tweet_result_by_rest_id_without_preload_content(
3295
+ def get_use_story_topic_query_without_preload_content(
518
3296
  self,
519
3297
  path_query_id: StrictStr,
520
3298
  variables: StrictStr,
521
- features: StrictStr,
522
- field_toggles: StrictStr,
523
3299
  _request_timeout: Union[
524
3300
  None,
525
3301
  Annotated[StrictFloat, Field(gt=0)],
@@ -533,18 +3309,14 @@ class DefaultApi:
533
3309
  _headers: Optional[Dict[StrictStr, Any]] = None,
534
3310
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
535
3311
  ) -> RESTResponseType:
536
- """get_tweet_result_by_rest_id
3312
+ """get_use_story_topic_query
537
3313
 
538
- get TweetResultByRestId
3314
+ AI-written stories of an explore topic (rest_id: For You)
539
3315
 
540
3316
  :param path_query_id: (required)
541
3317
  :type path_query_id: str
542
3318
  :param variables: (required)
543
3319
  :type variables: str
544
- :param features: (required)
545
- :type features: str
546
- :param field_toggles: (required)
547
- :type field_toggles: str
548
3320
  :param _request_timeout: timeout setting for this request. If one
549
3321
  number provided, it will be total request
550
3322
  timeout. It can also be a pair (tuple) of
@@ -567,11 +3339,9 @@ class DefaultApi:
567
3339
  :return: Returns the result object.
568
3340
  """ # noqa: E501
569
3341
 
570
- _param = self._get_tweet_result_by_rest_id_serialize(
3342
+ _param = self._get_use_story_topic_query_serialize(
571
3343
  path_query_id=path_query_id,
572
3344
  variables=variables,
573
- features=features,
574
- field_toggles=field_toggles,
575
3345
  _request_auth=_request_auth,
576
3346
  _content_type=_content_type,
577
3347
  _headers=_headers,
@@ -579,7 +3349,7 @@ class DefaultApi:
579
3349
  )
580
3350
 
581
3351
  _response_types_map: Dict[str, Optional[str]] = {
582
- '200': "TweetResultByRestIdResponse",
3352
+ '200': "StoryTopicResponse",
583
3353
  }
584
3354
  response_data = self.api_client.call_api(
585
3355
  *_param,
@@ -588,12 +3358,10 @@ class DefaultApi:
588
3358
  return response_data.response
589
3359
 
590
3360
 
591
- def _get_tweet_result_by_rest_id_serialize(
3361
+ def _get_use_story_topic_query_serialize(
592
3362
  self,
593
3363
  path_query_id,
594
3364
  variables,
595
- features,
596
- field_toggles,
597
3365
  _request_auth,
598
3366
  _content_type,
599
3367
  _headers,
@@ -622,14 +3390,6 @@ class DefaultApi:
622
3390
 
623
3391
  _query_params.append(('variables', variables))
624
3392
 
625
- if features is not None:
626
-
627
- _query_params.append(('features', features))
628
-
629
- if field_toggles is not None:
630
-
631
- _query_params.append(('fieldToggles', field_toggles))
632
-
633
3393
  # process the header parameters
634
3394
  # process the form parameters
635
3395
  # process the body parameter
@@ -673,7 +3433,7 @@ class DefaultApi:
673
3433
 
674
3434
  return self.api_client.param_serialize(
675
3435
  method='GET',
676
- resource_path='/graphql/{pathQueryId}/TweetResultByRestId',
3436
+ resource_path='/graphql/{pathQueryId}/useStoryTopicQuery',
677
3437
  path_params=_path_params,
678
3438
  query_params=_query_params,
679
3439
  header_params=_header_params,