twitter-openapi-python-generated 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- twitter_openapi_python_generated/__init__.py +235 -1
- twitter_openapi_python_generated/api/__init__.py +2 -0
- twitter_openapi_python_generated/api/birdwatch_api.py +1609 -0
- twitter_openapi_python_generated/api/community_api.py +1910 -0
- twitter_openapi_python_generated/api/default_api.py +1522 -0
- twitter_openapi_python_generated/api/tweet_api.py +778 -142
- twitter_openapi_python_generated/api/user_list_api.py +1145 -192
- twitter_openapi_python_generated/api/users_api.py +318 -0
- twitter_openapi_python_generated/api_client.py +1 -1
- twitter_openapi_python_generated/configuration.py +1 -1
- twitter_openapi_python_generated/models/__init__.py +115 -0
- twitter_openapi_python_generated/models/ad_metadata_container.py +5 -3
- twitter_openapi_python_generated/models/authenticate_periscope_response.py +102 -0
- twitter_openapi_python_generated/models/authenticate_periscope_response_data.py +89 -0
- twitter_openapi_python_generated/models/birdwatch_alias_self_select_status.py +91 -0
- twitter_openapi_python_generated/models/birdwatch_fetch_alias_self_select_status_response.py +102 -0
- twitter_openapi_python_generated/models/birdwatch_fetch_alias_self_select_status_response_data.py +93 -0
- twitter_openapi_python_generated/models/birdwatch_fetch_authenticated_user_profile_response.py +102 -0
- twitter_openapi_python_generated/models/birdwatch_fetch_authenticated_user_profile_response_data.py +93 -0
- twitter_openapi_python_generated/models/birdwatch_fetch_birdwatch_profile_response.py +102 -0
- twitter_openapi_python_generated/models/birdwatch_fetch_birdwatch_profile_response_data.py +93 -0
- twitter_openapi_python_generated/models/birdwatch_fetch_global_timeline_response.py +102 -0
- twitter_openapi_python_generated/models/birdwatch_fetch_global_timeline_response_data.py +93 -0
- twitter_openapi_python_generated/models/birdwatch_fetch_public_data_response.py +102 -0
- twitter_openapi_python_generated/models/birdwatch_fetch_public_data_response_data.py +93 -0
- twitter_openapi_python_generated/models/birdwatch_home_page.py +101 -0
- twitter_openapi_python_generated/models/birdwatch_home_page_body.py +104 -0
- twitter_openapi_python_generated/models/birdwatch_home_timeline.py +97 -0
- twitter_openapi_python_generated/models/birdwatch_profile.py +89 -0
- twitter_openapi_python_generated/models/birdwatch_public_data_file.py +91 -0
- twitter_openapi_python_generated/models/birdwatch_public_data_file_bundle.py +113 -0
- twitter_openapi_python_generated/models/birdwatch_viewer.py +93 -0
- twitter_openapi_python_generated/models/bookmark_search.py +93 -0
- twitter_openapi_python_generated/models/bookmark_search_timeline_response.py +102 -0
- twitter_openapi_python_generated/models/bookmark_search_timeline_response_data.py +93 -0
- twitter_openapi_python_generated/models/client_event_info_details.py +8 -2
- twitter_openapi_python_generated/models/communities_fetch_one_query_response.py +102 -0
- twitter_openapi_python_generated/models/communities_fetch_one_query_response_data.py +93 -0
- twitter_openapi_python_generated/models/communities_search_query_response.py +102 -0
- twitter_openapi_python_generated/models/communities_search_query_response_data.py +93 -0
- twitter_openapi_python_generated/models/communities_search_slice.py +102 -0
- twitter_openapi_python_generated/models/community.py +3 -1
- twitter_openapi_python_generated/models/community_facepile_user.py +98 -0
- twitter_openapi_python_generated/models/community_facepile_user_results.py +95 -0
- twitter_openapi_python_generated/models/community_hashtag.py +91 -0
- twitter_openapi_python_generated/models/community_hashtag_slice.py +99 -0
- twitter_openapi_python_generated/models/community_id_user_results.py +95 -0
- twitter_openapi_python_generated/models/community_list_members_action_result.py +90 -0
- twitter_openapi_python_generated/models/community_page_actions.py +113 -0
- twitter_openapi_python_generated/models/community_page_community.py +187 -0
- twitter_openapi_python_generated/models/community_page_delete_action_result.py +94 -0
- twitter_openapi_python_generated/models/community_page_invites_result.py +96 -0
- twitter_openapi_python_generated/models/community_page_join_action_result.py +92 -0
- twitter_openapi_python_generated/models/community_page_leave_action_result.py +96 -0
- twitter_openapi_python_generated/models/community_page_pin_action_result.py +92 -0
- twitter_openapi_python_generated/models/community_page_results.py +95 -0
- twitter_openapi_python_generated/models/community_primary_topic_name.py +89 -0
- twitter_openapi_python_generated/models/community_query_response.py +102 -0
- twitter_openapi_python_generated/models/community_query_response_data.py +93 -0
- twitter_openapi_python_generated/models/community_relay_rule.py +103 -0
- twitter_openapi_python_generated/models/community_search_community.py +134 -0
- twitter_openapi_python_generated/models/community_search_results.py +95 -0
- twitter_openapi_python_generated/models/community_settings_actions.py +101 -0
- twitter_openapi_python_generated/models/community_settings_community.py +183 -0
- twitter_openapi_python_generated/models/community_settings_creator.py +106 -0
- twitter_openapi_python_generated/models/community_settings_creator_core.py +89 -0
- twitter_openapi_python_generated/models/community_settings_creator_results.py +95 -0
- twitter_openapi_python_generated/models/community_settings_creator_verification.py +89 -0
- twitter_openapi_python_generated/models/community_settings_invites_result.py +90 -0
- twitter_openapi_python_generated/models/community_settings_results.py +95 -0
- twitter_openapi_python_generated/models/community_subtopic.py +99 -0
- twitter_openapi_python_generated/models/community_topic.py +108 -0
- twitter_openapi_python_generated/models/community_topic_results.py +96 -0
- twitter_openapi_python_generated/models/content_item_type.py +1 -0
- twitter_openapi_python_generated/models/creator_studio_tab_bar_item_query_response.py +102 -0
- twitter_openapi_python_generated/models/creator_studio_tab_bar_item_query_response_data.py +89 -0
- twitter_openapi_python_generated/models/data_saver_mode_response.py +102 -0
- twitter_openapi_python_generated/models/data_saver_mode_response_data.py +89 -0
- twitter_openapi_python_generated/models/error_extensions.py +1 -1
- twitter_openapi_python_generated/models/error_response.py +1 -1
- twitter_openapi_python_generated/models/event_summary_ad_metadata_container.py +91 -0
- twitter_openapi_python_generated/models/event_summary_event.py +97 -0
- twitter_openapi_python_generated/models/event_summary_media.py +99 -0
- twitter_openapi_python_generated/models/event_summary_media_entity.py +95 -0
- twitter_openapi_python_generated/models/event_summary_media_key.py +91 -0
- twitter_openapi_python_generated/models/event_summary_promoted_metadata.py +117 -0
- twitter_openapi_python_generated/models/explore_sidebar_response.py +102 -0
- twitter_openapi_python_generated/models/explore_sidebar_response_data.py +93 -0
- twitter_openapi_python_generated/models/feedback_action.py +0 -7
- twitter_openapi_python_generated/models/global_communities_latest_post_search.py +93 -0
- twitter_openapi_python_generated/models/global_communities_latest_post_search_timeline_response.py +102 -0
- twitter_openapi_python_generated/models/global_communities_latest_post_search_timeline_response_data.py +93 -0
- twitter_openapi_python_generated/models/global_communities_post_search.py +93 -0
- twitter_openapi_python_generated/models/global_communities_post_search_timeline_response.py +102 -0
- twitter_openapi_python_generated/models/global_communities_post_search_timeline_response_data.py +93 -0
- twitter_openapi_python_generated/models/grok_home.py +114 -0
- twitter_openapi_python_generated/models/grok_home_layout.py +98 -0
- twitter_openapi_python_generated/models/grok_home_layout_section.py +98 -0
- twitter_openapi_python_generated/models/grok_home_prompt.py +99 -0
- twitter_openapi_python_generated/models/grok_home_response.py +102 -0
- twitter_openapi_python_generated/models/grok_home_response_data.py +93 -0
- twitter_openapi_python_generated/models/grok_model_option.py +103 -0
- twitter_openapi_python_generated/models/grouped_trend.py +95 -0
- twitter_openapi_python_generated/models/item_content_union.py +27 -8
- twitter_openapi_python_generated/models/list_search.py +93 -0
- twitter_openapi_python_generated/models/list_search_timeline_response.py +102 -0
- twitter_openapi_python_generated/models/list_search_timeline_response_data.py +93 -0
- twitter_openapi_python_generated/models/lists_management_page_timeline_response.py +102 -0
- twitter_openapi_python_generated/models/lists_management_page_timeline_response_data.py +93 -0
- twitter_openapi_python_generated/models/lists_management_viewer.py +93 -0
- twitter_openapi_python_generated/models/module_footer.py +1 -8
- twitter_openapi_python_generated/models/notification_details.py +91 -0
- twitter_openapi_python_generated/models/pinned_timelines.py +89 -0
- twitter_openapi_python_generated/models/pinned_timelines_response.py +102 -0
- twitter_openapi_python_generated/models/pinned_timelines_response_data.py +93 -0
- twitter_openapi_python_generated/models/promoted_trend.py +97 -0
- twitter_openapi_python_generated/models/rich_message.py +10 -1
- twitter_openapi_python_generated/models/rich_message_entity.py +97 -0
- twitter_openapi_python_generated/models/rich_message_entity_ref.py +117 -0
- twitter_openapi_python_generated/models/search_timeline.py +2 -2
- twitter_openapi_python_generated/models/slice_info.py +89 -0
- twitter_openapi_python_generated/models/timeline_community.py +13 -17
- twitter_openapi_python_generated/models/timeline_event_summary.py +121 -0
- twitter_openapi_python_generated/models/timeline_message_prompt.py +13 -17
- twitter_openapi_python_generated/models/timeline_message_prompt_button.py +95 -0
- twitter_openapi_python_generated/models/timeline_message_prompt_button_action.py +91 -0
- twitter_openapi_python_generated/models/timeline_message_prompt_content.py +112 -0
- twitter_openapi_python_generated/models/timeline_message_prompt_rich_text.py +98 -0
- twitter_openapi_python_generated/models/timeline_message_prompt_rich_text_entity.py +97 -0
- twitter_openapi_python_generated/models/timeline_message_prompt_rich_text_entity_ref.py +107 -0
- twitter_openapi_python_generated/models/timeline_prompt.py +19 -17
- twitter_openapi_python_generated/models/timeline_prompt_callback.py +89 -0
- twitter_openapi_python_generated/models/timeline_prompt_content.py +124 -0
- twitter_openapi_python_generated/models/timeline_trend.py +18 -1
- twitter_openapi_python_generated/models/topic_carousel_query_response.py +102 -0
- twitter_openapi_python_generated/models/topic_carousel_query_response_data.py +93 -0
- twitter_openapi_python_generated/models/trend_metadata.py +3 -1
- twitter_openapi_python_generated/models/trend_promoted_metadata.py +111 -0
- twitter_openapi_python_generated/models/type_name.py +3 -0
- twitter_openapi_python_generated/models/users_verified_avatars_response.py +102 -0
- twitter_openapi_python_generated/models/users_verified_avatars_response_data.py +96 -0
- twitter_openapi_python_generated/models/verified_avatar_user.py +112 -0
- twitter_openapi_python_generated/models/verified_avatar_user_results.py +93 -0
- {twitter_openapi_python_generated-0.1.0.dist-info → twitter_openapi_python_generated-0.1.2.dist-info}/METADATA +145 -9
- {twitter_openapi_python_generated-0.1.0.dist-info → twitter_openapi_python_generated-0.1.2.dist-info}/RECORD +149 -32
- {twitter_openapi_python_generated-0.1.0.dist-info → twitter_openapi_python_generated-0.1.2.dist-info}/WHEEL +0 -0
- {twitter_openapi_python_generated-0.1.0.dist-info → twitter_openapi_python_generated-0.1.2.dist-info}/licenses/LICENSE +0 -0
- {twitter_openapi_python_generated-0.1.0.dist-info → twitter_openapi_python_generated-0.1.2.dist-info}/licenses/LICENSE.AGPL +0 -0
- {twitter_openapi_python_generated-0.1.0.dist-info → twitter_openapi_python_generated-0.1.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,1910 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Twitter OpenAPI
|
|
3
|
+
|
|
4
|
+
Twitter OpenAPI(Swagger) specification
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.0.1
|
|
7
|
+
Contact: yuki@yuki0311.com
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
""" # noqa: E501
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import StrictStr
|
|
20
|
+
from twitter_openapi_python_generated.models.communities_fetch_one_query_response import CommunitiesFetchOneQueryResponse
|
|
21
|
+
from twitter_openapi_python_generated.models.communities_search_query_response import CommunitiesSearchQueryResponse
|
|
22
|
+
from twitter_openapi_python_generated.models.community_query_response import CommunityQueryResponse
|
|
23
|
+
from twitter_openapi_python_generated.models.global_communities_latest_post_search_timeline_response import GlobalCommunitiesLatestPostSearchTimelineResponse
|
|
24
|
+
from twitter_openapi_python_generated.models.global_communities_post_search_timeline_response import GlobalCommunitiesPostSearchTimelineResponse
|
|
25
|
+
from twitter_openapi_python_generated.models.topic_carousel_query_response import TopicCarouselQueryResponse
|
|
26
|
+
|
|
27
|
+
from twitter_openapi_python_generated.api_client import ApiClient, RequestSerialized
|
|
28
|
+
from twitter_openapi_python_generated.api_response import ApiResponse
|
|
29
|
+
from twitter_openapi_python_generated.rest import RESTResponseType
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class CommunityApi:
|
|
33
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
34
|
+
Ref: https://openapi-generator.tech
|
|
35
|
+
|
|
36
|
+
Do not edit the class manually.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
def __init__(self, api_client=None) -> None:
|
|
40
|
+
if api_client is None:
|
|
41
|
+
api_client = ApiClient.get_default()
|
|
42
|
+
self.api_client = api_client
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
@validate_call
|
|
46
|
+
def get_communities_fetch_one_query(
|
|
47
|
+
self,
|
|
48
|
+
path_query_id: StrictStr,
|
|
49
|
+
features: StrictStr,
|
|
50
|
+
variables: StrictStr,
|
|
51
|
+
_request_timeout: Union[
|
|
52
|
+
None,
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
54
|
+
Tuple[
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
57
|
+
]
|
|
58
|
+
] = None,
|
|
59
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
60
|
+
_content_type: Optional[StrictStr] = None,
|
|
61
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
63
|
+
) -> CommunitiesFetchOneQueryResponse:
|
|
64
|
+
"""get_communities_fetch_one_query
|
|
65
|
+
|
|
66
|
+
a community by id (community page)
|
|
67
|
+
|
|
68
|
+
:param path_query_id: (required)
|
|
69
|
+
:type path_query_id: str
|
|
70
|
+
:param features: (required)
|
|
71
|
+
:type features: str
|
|
72
|
+
:param variables: (required)
|
|
73
|
+
:type variables: str
|
|
74
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
75
|
+
number provided, it will be total request
|
|
76
|
+
timeout. It can also be a pair (tuple) of
|
|
77
|
+
(connection, read) timeouts.
|
|
78
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
79
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
80
|
+
request; this effectively ignores the
|
|
81
|
+
authentication in the spec for a single request.
|
|
82
|
+
:type _request_auth: dict, optional
|
|
83
|
+
:param _content_type: force content-type for the request.
|
|
84
|
+
:type _content_type: str, Optional
|
|
85
|
+
:param _headers: set to override the headers for a single
|
|
86
|
+
request; this effectively ignores the headers
|
|
87
|
+
in the spec for a single request.
|
|
88
|
+
:type _headers: dict, optional
|
|
89
|
+
:param _host_index: set to override the host_index for a single
|
|
90
|
+
request; this effectively ignores the host_index
|
|
91
|
+
in the spec for a single request.
|
|
92
|
+
:type _host_index: int, optional
|
|
93
|
+
:return: Returns the result object.
|
|
94
|
+
""" # noqa: E501
|
|
95
|
+
|
|
96
|
+
_param = self._get_communities_fetch_one_query_serialize(
|
|
97
|
+
path_query_id=path_query_id,
|
|
98
|
+
features=features,
|
|
99
|
+
variables=variables,
|
|
100
|
+
_request_auth=_request_auth,
|
|
101
|
+
_content_type=_content_type,
|
|
102
|
+
_headers=_headers,
|
|
103
|
+
_host_index=_host_index
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
107
|
+
'200': "CommunitiesFetchOneQueryResponse",
|
|
108
|
+
}
|
|
109
|
+
response_data = self.api_client.call_api(
|
|
110
|
+
*_param,
|
|
111
|
+
_request_timeout=_request_timeout
|
|
112
|
+
)
|
|
113
|
+
response_data.read()
|
|
114
|
+
return self.api_client.response_deserialize(
|
|
115
|
+
response_data=response_data,
|
|
116
|
+
response_types_map=_response_types_map,
|
|
117
|
+
).data
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@validate_call
|
|
121
|
+
def get_communities_fetch_one_query_with_http_info(
|
|
122
|
+
self,
|
|
123
|
+
path_query_id: StrictStr,
|
|
124
|
+
features: StrictStr,
|
|
125
|
+
variables: StrictStr,
|
|
126
|
+
_request_timeout: Union[
|
|
127
|
+
None,
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
129
|
+
Tuple[
|
|
130
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
131
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
132
|
+
]
|
|
133
|
+
] = None,
|
|
134
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
+
_content_type: Optional[StrictStr] = None,
|
|
136
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
137
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
138
|
+
) -> ApiResponse[CommunitiesFetchOneQueryResponse]:
|
|
139
|
+
"""get_communities_fetch_one_query
|
|
140
|
+
|
|
141
|
+
a community by id (community page)
|
|
142
|
+
|
|
143
|
+
:param path_query_id: (required)
|
|
144
|
+
:type path_query_id: str
|
|
145
|
+
:param features: (required)
|
|
146
|
+
:type features: str
|
|
147
|
+
:param variables: (required)
|
|
148
|
+
:type variables: str
|
|
149
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
150
|
+
number provided, it will be total request
|
|
151
|
+
timeout. It can also be a pair (tuple) of
|
|
152
|
+
(connection, read) timeouts.
|
|
153
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
154
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
155
|
+
request; this effectively ignores the
|
|
156
|
+
authentication in the spec for a single request.
|
|
157
|
+
:type _request_auth: dict, optional
|
|
158
|
+
:param _content_type: force content-type for the request.
|
|
159
|
+
:type _content_type: str, Optional
|
|
160
|
+
:param _headers: set to override the headers for a single
|
|
161
|
+
request; this effectively ignores the headers
|
|
162
|
+
in the spec for a single request.
|
|
163
|
+
:type _headers: dict, optional
|
|
164
|
+
:param _host_index: set to override the host_index for a single
|
|
165
|
+
request; this effectively ignores the host_index
|
|
166
|
+
in the spec for a single request.
|
|
167
|
+
:type _host_index: int, optional
|
|
168
|
+
:return: Returns the result object.
|
|
169
|
+
""" # noqa: E501
|
|
170
|
+
|
|
171
|
+
_param = self._get_communities_fetch_one_query_serialize(
|
|
172
|
+
path_query_id=path_query_id,
|
|
173
|
+
features=features,
|
|
174
|
+
variables=variables,
|
|
175
|
+
_request_auth=_request_auth,
|
|
176
|
+
_content_type=_content_type,
|
|
177
|
+
_headers=_headers,
|
|
178
|
+
_host_index=_host_index
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
182
|
+
'200': "CommunitiesFetchOneQueryResponse",
|
|
183
|
+
}
|
|
184
|
+
response_data = self.api_client.call_api(
|
|
185
|
+
*_param,
|
|
186
|
+
_request_timeout=_request_timeout
|
|
187
|
+
)
|
|
188
|
+
response_data.read()
|
|
189
|
+
return self.api_client.response_deserialize(
|
|
190
|
+
response_data=response_data,
|
|
191
|
+
response_types_map=_response_types_map,
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
@validate_call
|
|
196
|
+
def get_communities_fetch_one_query_without_preload_content(
|
|
197
|
+
self,
|
|
198
|
+
path_query_id: StrictStr,
|
|
199
|
+
features: StrictStr,
|
|
200
|
+
variables: StrictStr,
|
|
201
|
+
_request_timeout: Union[
|
|
202
|
+
None,
|
|
203
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
204
|
+
Tuple[
|
|
205
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
206
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
207
|
+
]
|
|
208
|
+
] = None,
|
|
209
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
210
|
+
_content_type: Optional[StrictStr] = None,
|
|
211
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
212
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
213
|
+
) -> RESTResponseType:
|
|
214
|
+
"""get_communities_fetch_one_query
|
|
215
|
+
|
|
216
|
+
a community by id (community page)
|
|
217
|
+
|
|
218
|
+
:param path_query_id: (required)
|
|
219
|
+
:type path_query_id: str
|
|
220
|
+
:param features: (required)
|
|
221
|
+
:type features: str
|
|
222
|
+
:param variables: (required)
|
|
223
|
+
:type variables: str
|
|
224
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
225
|
+
number provided, it will be total request
|
|
226
|
+
timeout. It can also be a pair (tuple) of
|
|
227
|
+
(connection, read) timeouts.
|
|
228
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
229
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
230
|
+
request; this effectively ignores the
|
|
231
|
+
authentication in the spec for a single request.
|
|
232
|
+
:type _request_auth: dict, optional
|
|
233
|
+
:param _content_type: force content-type for the request.
|
|
234
|
+
:type _content_type: str, Optional
|
|
235
|
+
:param _headers: set to override the headers for a single
|
|
236
|
+
request; this effectively ignores the headers
|
|
237
|
+
in the spec for a single request.
|
|
238
|
+
:type _headers: dict, optional
|
|
239
|
+
:param _host_index: set to override the host_index for a single
|
|
240
|
+
request; this effectively ignores the host_index
|
|
241
|
+
in the spec for a single request.
|
|
242
|
+
:type _host_index: int, optional
|
|
243
|
+
:return: Returns the result object.
|
|
244
|
+
""" # noqa: E501
|
|
245
|
+
|
|
246
|
+
_param = self._get_communities_fetch_one_query_serialize(
|
|
247
|
+
path_query_id=path_query_id,
|
|
248
|
+
features=features,
|
|
249
|
+
variables=variables,
|
|
250
|
+
_request_auth=_request_auth,
|
|
251
|
+
_content_type=_content_type,
|
|
252
|
+
_headers=_headers,
|
|
253
|
+
_host_index=_host_index
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
257
|
+
'200': "CommunitiesFetchOneQueryResponse",
|
|
258
|
+
}
|
|
259
|
+
response_data = self.api_client.call_api(
|
|
260
|
+
*_param,
|
|
261
|
+
_request_timeout=_request_timeout
|
|
262
|
+
)
|
|
263
|
+
return response_data.response
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
def _get_communities_fetch_one_query_serialize(
|
|
267
|
+
self,
|
|
268
|
+
path_query_id,
|
|
269
|
+
features,
|
|
270
|
+
variables,
|
|
271
|
+
_request_auth,
|
|
272
|
+
_content_type,
|
|
273
|
+
_headers,
|
|
274
|
+
_host_index,
|
|
275
|
+
) -> RequestSerialized:
|
|
276
|
+
|
|
277
|
+
_host = None
|
|
278
|
+
|
|
279
|
+
_collection_formats: Dict[str, str] = {
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
_path_params: Dict[str, str] = {}
|
|
283
|
+
_query_params: List[Tuple[str, str]] = []
|
|
284
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
285
|
+
_form_params: List[Tuple[str, str]] = []
|
|
286
|
+
_files: Dict[
|
|
287
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
288
|
+
] = {}
|
|
289
|
+
_body_params: Optional[bytes] = None
|
|
290
|
+
|
|
291
|
+
# process the path parameters
|
|
292
|
+
if path_query_id is not None:
|
|
293
|
+
_path_params['pathQueryId'] = path_query_id
|
|
294
|
+
# process the query parameters
|
|
295
|
+
if features is not None:
|
|
296
|
+
|
|
297
|
+
_query_params.append(('features', features))
|
|
298
|
+
|
|
299
|
+
if variables is not None:
|
|
300
|
+
|
|
301
|
+
_query_params.append(('variables', variables))
|
|
302
|
+
|
|
303
|
+
# process the header parameters
|
|
304
|
+
# process the form parameters
|
|
305
|
+
# process the body parameter
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
# set the HTTP header `Accept`
|
|
309
|
+
if 'Accept' not in _header_params:
|
|
310
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
311
|
+
[
|
|
312
|
+
'application/json'
|
|
313
|
+
]
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
# authentication setting
|
|
318
|
+
_auth_settings: List[str] = [
|
|
319
|
+
'Accept',
|
|
320
|
+
'ClientLanguage',
|
|
321
|
+
'Priority',
|
|
322
|
+
'Referer',
|
|
323
|
+
'SecFetchDest',
|
|
324
|
+
'SecChUaPlatform',
|
|
325
|
+
'SecFetchMode',
|
|
326
|
+
'CsrfToken',
|
|
327
|
+
'ClientUuid',
|
|
328
|
+
'BearerAuth',
|
|
329
|
+
'GuestToken',
|
|
330
|
+
'SecChUa',
|
|
331
|
+
'CookieGt0',
|
|
332
|
+
'ClientTransactionId',
|
|
333
|
+
'ActiveUser',
|
|
334
|
+
'CookieCt0',
|
|
335
|
+
'UserAgent',
|
|
336
|
+
'AcceptLanguage',
|
|
337
|
+
'SecFetchSite',
|
|
338
|
+
'AuthType',
|
|
339
|
+
'CookieAuthToken',
|
|
340
|
+
'SecChUaMobile',
|
|
341
|
+
'AcceptEncoding'
|
|
342
|
+
]
|
|
343
|
+
|
|
344
|
+
return self.api_client.param_serialize(
|
|
345
|
+
method='GET',
|
|
346
|
+
resource_path='/graphql/{pathQueryId}/CommunitiesFetchOneQuery',
|
|
347
|
+
path_params=_path_params,
|
|
348
|
+
query_params=_query_params,
|
|
349
|
+
header_params=_header_params,
|
|
350
|
+
body=_body_params,
|
|
351
|
+
post_params=_form_params,
|
|
352
|
+
files=_files,
|
|
353
|
+
auth_settings=_auth_settings,
|
|
354
|
+
collection_formats=_collection_formats,
|
|
355
|
+
_host=_host,
|
|
356
|
+
_request_auth=_request_auth
|
|
357
|
+
)
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
@validate_call
|
|
363
|
+
def get_communities_search_query(
|
|
364
|
+
self,
|
|
365
|
+
path_query_id: StrictStr,
|
|
366
|
+
variables: StrictStr,
|
|
367
|
+
_request_timeout: Union[
|
|
368
|
+
None,
|
|
369
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
370
|
+
Tuple[
|
|
371
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
372
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
373
|
+
]
|
|
374
|
+
] = None,
|
|
375
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
376
|
+
_content_type: Optional[StrictStr] = None,
|
|
377
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
378
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
379
|
+
) -> CommunitiesSearchQueryResponse:
|
|
380
|
+
"""get_communities_search_query
|
|
381
|
+
|
|
382
|
+
search communities. cursor:[slice_info.next_cursor]
|
|
383
|
+
|
|
384
|
+
:param path_query_id: (required)
|
|
385
|
+
:type path_query_id: str
|
|
386
|
+
:param variables: (required)
|
|
387
|
+
:type variables: str
|
|
388
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
389
|
+
number provided, it will be total request
|
|
390
|
+
timeout. It can also be a pair (tuple) of
|
|
391
|
+
(connection, read) timeouts.
|
|
392
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
393
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
394
|
+
request; this effectively ignores the
|
|
395
|
+
authentication in the spec for a single request.
|
|
396
|
+
:type _request_auth: dict, optional
|
|
397
|
+
:param _content_type: force content-type for the request.
|
|
398
|
+
:type _content_type: str, Optional
|
|
399
|
+
:param _headers: set to override the headers for a single
|
|
400
|
+
request; this effectively ignores the headers
|
|
401
|
+
in the spec for a single request.
|
|
402
|
+
:type _headers: dict, optional
|
|
403
|
+
:param _host_index: set to override the host_index for a single
|
|
404
|
+
request; this effectively ignores the host_index
|
|
405
|
+
in the spec for a single request.
|
|
406
|
+
:type _host_index: int, optional
|
|
407
|
+
:return: Returns the result object.
|
|
408
|
+
""" # noqa: E501
|
|
409
|
+
|
|
410
|
+
_param = self._get_communities_search_query_serialize(
|
|
411
|
+
path_query_id=path_query_id,
|
|
412
|
+
variables=variables,
|
|
413
|
+
_request_auth=_request_auth,
|
|
414
|
+
_content_type=_content_type,
|
|
415
|
+
_headers=_headers,
|
|
416
|
+
_host_index=_host_index
|
|
417
|
+
)
|
|
418
|
+
|
|
419
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
420
|
+
'200': "CommunitiesSearchQueryResponse",
|
|
421
|
+
}
|
|
422
|
+
response_data = self.api_client.call_api(
|
|
423
|
+
*_param,
|
|
424
|
+
_request_timeout=_request_timeout
|
|
425
|
+
)
|
|
426
|
+
response_data.read()
|
|
427
|
+
return self.api_client.response_deserialize(
|
|
428
|
+
response_data=response_data,
|
|
429
|
+
response_types_map=_response_types_map,
|
|
430
|
+
).data
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
@validate_call
|
|
434
|
+
def get_communities_search_query_with_http_info(
|
|
435
|
+
self,
|
|
436
|
+
path_query_id: StrictStr,
|
|
437
|
+
variables: StrictStr,
|
|
438
|
+
_request_timeout: Union[
|
|
439
|
+
None,
|
|
440
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
441
|
+
Tuple[
|
|
442
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
443
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
444
|
+
]
|
|
445
|
+
] = None,
|
|
446
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
447
|
+
_content_type: Optional[StrictStr] = None,
|
|
448
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
449
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
450
|
+
) -> ApiResponse[CommunitiesSearchQueryResponse]:
|
|
451
|
+
"""get_communities_search_query
|
|
452
|
+
|
|
453
|
+
search communities. cursor:[slice_info.next_cursor]
|
|
454
|
+
|
|
455
|
+
:param path_query_id: (required)
|
|
456
|
+
:type path_query_id: str
|
|
457
|
+
:param variables: (required)
|
|
458
|
+
:type variables: str
|
|
459
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
460
|
+
number provided, it will be total request
|
|
461
|
+
timeout. It can also be a pair (tuple) of
|
|
462
|
+
(connection, read) timeouts.
|
|
463
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
464
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
465
|
+
request; this effectively ignores the
|
|
466
|
+
authentication in the spec for a single request.
|
|
467
|
+
:type _request_auth: dict, optional
|
|
468
|
+
:param _content_type: force content-type for the request.
|
|
469
|
+
:type _content_type: str, Optional
|
|
470
|
+
:param _headers: set to override the headers for a single
|
|
471
|
+
request; this effectively ignores the headers
|
|
472
|
+
in the spec for a single request.
|
|
473
|
+
:type _headers: dict, optional
|
|
474
|
+
:param _host_index: set to override the host_index for a single
|
|
475
|
+
request; this effectively ignores the host_index
|
|
476
|
+
in the spec for a single request.
|
|
477
|
+
:type _host_index: int, optional
|
|
478
|
+
:return: Returns the result object.
|
|
479
|
+
""" # noqa: E501
|
|
480
|
+
|
|
481
|
+
_param = self._get_communities_search_query_serialize(
|
|
482
|
+
path_query_id=path_query_id,
|
|
483
|
+
variables=variables,
|
|
484
|
+
_request_auth=_request_auth,
|
|
485
|
+
_content_type=_content_type,
|
|
486
|
+
_headers=_headers,
|
|
487
|
+
_host_index=_host_index
|
|
488
|
+
)
|
|
489
|
+
|
|
490
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
491
|
+
'200': "CommunitiesSearchQueryResponse",
|
|
492
|
+
}
|
|
493
|
+
response_data = self.api_client.call_api(
|
|
494
|
+
*_param,
|
|
495
|
+
_request_timeout=_request_timeout
|
|
496
|
+
)
|
|
497
|
+
response_data.read()
|
|
498
|
+
return self.api_client.response_deserialize(
|
|
499
|
+
response_data=response_data,
|
|
500
|
+
response_types_map=_response_types_map,
|
|
501
|
+
)
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
@validate_call
|
|
505
|
+
def get_communities_search_query_without_preload_content(
|
|
506
|
+
self,
|
|
507
|
+
path_query_id: StrictStr,
|
|
508
|
+
variables: StrictStr,
|
|
509
|
+
_request_timeout: Union[
|
|
510
|
+
None,
|
|
511
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
512
|
+
Tuple[
|
|
513
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
514
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
515
|
+
]
|
|
516
|
+
] = None,
|
|
517
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
518
|
+
_content_type: Optional[StrictStr] = None,
|
|
519
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
520
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
521
|
+
) -> RESTResponseType:
|
|
522
|
+
"""get_communities_search_query
|
|
523
|
+
|
|
524
|
+
search communities. cursor:[slice_info.next_cursor]
|
|
525
|
+
|
|
526
|
+
:param path_query_id: (required)
|
|
527
|
+
:type path_query_id: str
|
|
528
|
+
:param variables: (required)
|
|
529
|
+
:type variables: str
|
|
530
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
531
|
+
number provided, it will be total request
|
|
532
|
+
timeout. It can also be a pair (tuple) of
|
|
533
|
+
(connection, read) timeouts.
|
|
534
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
535
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
536
|
+
request; this effectively ignores the
|
|
537
|
+
authentication in the spec for a single request.
|
|
538
|
+
:type _request_auth: dict, optional
|
|
539
|
+
:param _content_type: force content-type for the request.
|
|
540
|
+
:type _content_type: str, Optional
|
|
541
|
+
:param _headers: set to override the headers for a single
|
|
542
|
+
request; this effectively ignores the headers
|
|
543
|
+
in the spec for a single request.
|
|
544
|
+
:type _headers: dict, optional
|
|
545
|
+
:param _host_index: set to override the host_index for a single
|
|
546
|
+
request; this effectively ignores the host_index
|
|
547
|
+
in the spec for a single request.
|
|
548
|
+
:type _host_index: int, optional
|
|
549
|
+
:return: Returns the result object.
|
|
550
|
+
""" # noqa: E501
|
|
551
|
+
|
|
552
|
+
_param = self._get_communities_search_query_serialize(
|
|
553
|
+
path_query_id=path_query_id,
|
|
554
|
+
variables=variables,
|
|
555
|
+
_request_auth=_request_auth,
|
|
556
|
+
_content_type=_content_type,
|
|
557
|
+
_headers=_headers,
|
|
558
|
+
_host_index=_host_index
|
|
559
|
+
)
|
|
560
|
+
|
|
561
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
562
|
+
'200': "CommunitiesSearchQueryResponse",
|
|
563
|
+
}
|
|
564
|
+
response_data = self.api_client.call_api(
|
|
565
|
+
*_param,
|
|
566
|
+
_request_timeout=_request_timeout
|
|
567
|
+
)
|
|
568
|
+
return response_data.response
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
def _get_communities_search_query_serialize(
|
|
572
|
+
self,
|
|
573
|
+
path_query_id,
|
|
574
|
+
variables,
|
|
575
|
+
_request_auth,
|
|
576
|
+
_content_type,
|
|
577
|
+
_headers,
|
|
578
|
+
_host_index,
|
|
579
|
+
) -> RequestSerialized:
|
|
580
|
+
|
|
581
|
+
_host = None
|
|
582
|
+
|
|
583
|
+
_collection_formats: Dict[str, str] = {
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
_path_params: Dict[str, str] = {}
|
|
587
|
+
_query_params: List[Tuple[str, str]] = []
|
|
588
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
589
|
+
_form_params: List[Tuple[str, str]] = []
|
|
590
|
+
_files: Dict[
|
|
591
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
592
|
+
] = {}
|
|
593
|
+
_body_params: Optional[bytes] = None
|
|
594
|
+
|
|
595
|
+
# process the path parameters
|
|
596
|
+
if path_query_id is not None:
|
|
597
|
+
_path_params['pathQueryId'] = path_query_id
|
|
598
|
+
# process the query parameters
|
|
599
|
+
if variables is not None:
|
|
600
|
+
|
|
601
|
+
_query_params.append(('variables', variables))
|
|
602
|
+
|
|
603
|
+
# process the header parameters
|
|
604
|
+
# process the form parameters
|
|
605
|
+
# process the body parameter
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
# set the HTTP header `Accept`
|
|
609
|
+
if 'Accept' not in _header_params:
|
|
610
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
611
|
+
[
|
|
612
|
+
'application/json'
|
|
613
|
+
]
|
|
614
|
+
)
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
# authentication setting
|
|
618
|
+
_auth_settings: List[str] = [
|
|
619
|
+
'Accept',
|
|
620
|
+
'ClientLanguage',
|
|
621
|
+
'Priority',
|
|
622
|
+
'Referer',
|
|
623
|
+
'SecFetchDest',
|
|
624
|
+
'SecChUaPlatform',
|
|
625
|
+
'SecFetchMode',
|
|
626
|
+
'CsrfToken',
|
|
627
|
+
'ClientUuid',
|
|
628
|
+
'BearerAuth',
|
|
629
|
+
'GuestToken',
|
|
630
|
+
'SecChUa',
|
|
631
|
+
'CookieGt0',
|
|
632
|
+
'ClientTransactionId',
|
|
633
|
+
'ActiveUser',
|
|
634
|
+
'CookieCt0',
|
|
635
|
+
'UserAgent',
|
|
636
|
+
'AcceptLanguage',
|
|
637
|
+
'SecFetchSite',
|
|
638
|
+
'AuthType',
|
|
639
|
+
'CookieAuthToken',
|
|
640
|
+
'SecChUaMobile',
|
|
641
|
+
'AcceptEncoding'
|
|
642
|
+
]
|
|
643
|
+
|
|
644
|
+
return self.api_client.param_serialize(
|
|
645
|
+
method='GET',
|
|
646
|
+
resource_path='/graphql/{pathQueryId}/CommunitiesSearchQuery',
|
|
647
|
+
path_params=_path_params,
|
|
648
|
+
query_params=_query_params,
|
|
649
|
+
header_params=_header_params,
|
|
650
|
+
body=_body_params,
|
|
651
|
+
post_params=_form_params,
|
|
652
|
+
files=_files,
|
|
653
|
+
auth_settings=_auth_settings,
|
|
654
|
+
collection_formats=_collection_formats,
|
|
655
|
+
_host=_host,
|
|
656
|
+
_request_auth=_request_auth
|
|
657
|
+
)
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
@validate_call
|
|
663
|
+
def get_community_query(
|
|
664
|
+
self,
|
|
665
|
+
path_query_id: StrictStr,
|
|
666
|
+
features: StrictStr,
|
|
667
|
+
variables: StrictStr,
|
|
668
|
+
_request_timeout: Union[
|
|
669
|
+
None,
|
|
670
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
671
|
+
Tuple[
|
|
672
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
673
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
674
|
+
]
|
|
675
|
+
] = None,
|
|
676
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
677
|
+
_content_type: Optional[StrictStr] = None,
|
|
678
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
679
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
680
|
+
) -> CommunityQueryResponse:
|
|
681
|
+
"""get_community_query
|
|
682
|
+
|
|
683
|
+
a community by id (community settings and moderation pages)
|
|
684
|
+
|
|
685
|
+
:param path_query_id: (required)
|
|
686
|
+
:type path_query_id: str
|
|
687
|
+
:param features: (required)
|
|
688
|
+
:type features: str
|
|
689
|
+
:param variables: (required)
|
|
690
|
+
:type variables: str
|
|
691
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
692
|
+
number provided, it will be total request
|
|
693
|
+
timeout. It can also be a pair (tuple) of
|
|
694
|
+
(connection, read) timeouts.
|
|
695
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
696
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
697
|
+
request; this effectively ignores the
|
|
698
|
+
authentication in the spec for a single request.
|
|
699
|
+
:type _request_auth: dict, optional
|
|
700
|
+
:param _content_type: force content-type for the request.
|
|
701
|
+
:type _content_type: str, Optional
|
|
702
|
+
:param _headers: set to override the headers for a single
|
|
703
|
+
request; this effectively ignores the headers
|
|
704
|
+
in the spec for a single request.
|
|
705
|
+
:type _headers: dict, optional
|
|
706
|
+
:param _host_index: set to override the host_index for a single
|
|
707
|
+
request; this effectively ignores the host_index
|
|
708
|
+
in the spec for a single request.
|
|
709
|
+
:type _host_index: int, optional
|
|
710
|
+
:return: Returns the result object.
|
|
711
|
+
""" # noqa: E501
|
|
712
|
+
|
|
713
|
+
_param = self._get_community_query_serialize(
|
|
714
|
+
path_query_id=path_query_id,
|
|
715
|
+
features=features,
|
|
716
|
+
variables=variables,
|
|
717
|
+
_request_auth=_request_auth,
|
|
718
|
+
_content_type=_content_type,
|
|
719
|
+
_headers=_headers,
|
|
720
|
+
_host_index=_host_index
|
|
721
|
+
)
|
|
722
|
+
|
|
723
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
724
|
+
'200': "CommunityQueryResponse",
|
|
725
|
+
}
|
|
726
|
+
response_data = self.api_client.call_api(
|
|
727
|
+
*_param,
|
|
728
|
+
_request_timeout=_request_timeout
|
|
729
|
+
)
|
|
730
|
+
response_data.read()
|
|
731
|
+
return self.api_client.response_deserialize(
|
|
732
|
+
response_data=response_data,
|
|
733
|
+
response_types_map=_response_types_map,
|
|
734
|
+
).data
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
@validate_call
|
|
738
|
+
def get_community_query_with_http_info(
|
|
739
|
+
self,
|
|
740
|
+
path_query_id: StrictStr,
|
|
741
|
+
features: StrictStr,
|
|
742
|
+
variables: StrictStr,
|
|
743
|
+
_request_timeout: Union[
|
|
744
|
+
None,
|
|
745
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
746
|
+
Tuple[
|
|
747
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
748
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
749
|
+
]
|
|
750
|
+
] = None,
|
|
751
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
752
|
+
_content_type: Optional[StrictStr] = None,
|
|
753
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
754
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
755
|
+
) -> ApiResponse[CommunityQueryResponse]:
|
|
756
|
+
"""get_community_query
|
|
757
|
+
|
|
758
|
+
a community by id (community settings and moderation pages)
|
|
759
|
+
|
|
760
|
+
:param path_query_id: (required)
|
|
761
|
+
:type path_query_id: str
|
|
762
|
+
:param features: (required)
|
|
763
|
+
:type features: str
|
|
764
|
+
:param variables: (required)
|
|
765
|
+
:type variables: str
|
|
766
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
767
|
+
number provided, it will be total request
|
|
768
|
+
timeout. It can also be a pair (tuple) of
|
|
769
|
+
(connection, read) timeouts.
|
|
770
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
771
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
772
|
+
request; this effectively ignores the
|
|
773
|
+
authentication in the spec for a single request.
|
|
774
|
+
:type _request_auth: dict, optional
|
|
775
|
+
:param _content_type: force content-type for the request.
|
|
776
|
+
:type _content_type: str, Optional
|
|
777
|
+
:param _headers: set to override the headers for a single
|
|
778
|
+
request; this effectively ignores the headers
|
|
779
|
+
in the spec for a single request.
|
|
780
|
+
:type _headers: dict, optional
|
|
781
|
+
:param _host_index: set to override the host_index for a single
|
|
782
|
+
request; this effectively ignores the host_index
|
|
783
|
+
in the spec for a single request.
|
|
784
|
+
:type _host_index: int, optional
|
|
785
|
+
:return: Returns the result object.
|
|
786
|
+
""" # noqa: E501
|
|
787
|
+
|
|
788
|
+
_param = self._get_community_query_serialize(
|
|
789
|
+
path_query_id=path_query_id,
|
|
790
|
+
features=features,
|
|
791
|
+
variables=variables,
|
|
792
|
+
_request_auth=_request_auth,
|
|
793
|
+
_content_type=_content_type,
|
|
794
|
+
_headers=_headers,
|
|
795
|
+
_host_index=_host_index
|
|
796
|
+
)
|
|
797
|
+
|
|
798
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
799
|
+
'200': "CommunityQueryResponse",
|
|
800
|
+
}
|
|
801
|
+
response_data = self.api_client.call_api(
|
|
802
|
+
*_param,
|
|
803
|
+
_request_timeout=_request_timeout
|
|
804
|
+
)
|
|
805
|
+
response_data.read()
|
|
806
|
+
return self.api_client.response_deserialize(
|
|
807
|
+
response_data=response_data,
|
|
808
|
+
response_types_map=_response_types_map,
|
|
809
|
+
)
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
@validate_call
|
|
813
|
+
def get_community_query_without_preload_content(
|
|
814
|
+
self,
|
|
815
|
+
path_query_id: StrictStr,
|
|
816
|
+
features: StrictStr,
|
|
817
|
+
variables: StrictStr,
|
|
818
|
+
_request_timeout: Union[
|
|
819
|
+
None,
|
|
820
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
821
|
+
Tuple[
|
|
822
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
823
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
824
|
+
]
|
|
825
|
+
] = None,
|
|
826
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
827
|
+
_content_type: Optional[StrictStr] = None,
|
|
828
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
829
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
830
|
+
) -> RESTResponseType:
|
|
831
|
+
"""get_community_query
|
|
832
|
+
|
|
833
|
+
a community by id (community settings and moderation pages)
|
|
834
|
+
|
|
835
|
+
:param path_query_id: (required)
|
|
836
|
+
:type path_query_id: str
|
|
837
|
+
:param features: (required)
|
|
838
|
+
:type features: str
|
|
839
|
+
:param variables: (required)
|
|
840
|
+
:type variables: str
|
|
841
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
842
|
+
number provided, it will be total request
|
|
843
|
+
timeout. It can also be a pair (tuple) of
|
|
844
|
+
(connection, read) timeouts.
|
|
845
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
846
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
847
|
+
request; this effectively ignores the
|
|
848
|
+
authentication in the spec for a single request.
|
|
849
|
+
:type _request_auth: dict, optional
|
|
850
|
+
:param _content_type: force content-type for the request.
|
|
851
|
+
:type _content_type: str, Optional
|
|
852
|
+
:param _headers: set to override the headers for a single
|
|
853
|
+
request; this effectively ignores the headers
|
|
854
|
+
in the spec for a single request.
|
|
855
|
+
:type _headers: dict, optional
|
|
856
|
+
:param _host_index: set to override the host_index for a single
|
|
857
|
+
request; this effectively ignores the host_index
|
|
858
|
+
in the spec for a single request.
|
|
859
|
+
:type _host_index: int, optional
|
|
860
|
+
:return: Returns the result object.
|
|
861
|
+
""" # noqa: E501
|
|
862
|
+
|
|
863
|
+
_param = self._get_community_query_serialize(
|
|
864
|
+
path_query_id=path_query_id,
|
|
865
|
+
features=features,
|
|
866
|
+
variables=variables,
|
|
867
|
+
_request_auth=_request_auth,
|
|
868
|
+
_content_type=_content_type,
|
|
869
|
+
_headers=_headers,
|
|
870
|
+
_host_index=_host_index
|
|
871
|
+
)
|
|
872
|
+
|
|
873
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
874
|
+
'200': "CommunityQueryResponse",
|
|
875
|
+
}
|
|
876
|
+
response_data = self.api_client.call_api(
|
|
877
|
+
*_param,
|
|
878
|
+
_request_timeout=_request_timeout
|
|
879
|
+
)
|
|
880
|
+
return response_data.response
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
def _get_community_query_serialize(
|
|
884
|
+
self,
|
|
885
|
+
path_query_id,
|
|
886
|
+
features,
|
|
887
|
+
variables,
|
|
888
|
+
_request_auth,
|
|
889
|
+
_content_type,
|
|
890
|
+
_headers,
|
|
891
|
+
_host_index,
|
|
892
|
+
) -> RequestSerialized:
|
|
893
|
+
|
|
894
|
+
_host = None
|
|
895
|
+
|
|
896
|
+
_collection_formats: Dict[str, str] = {
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
_path_params: Dict[str, str] = {}
|
|
900
|
+
_query_params: List[Tuple[str, str]] = []
|
|
901
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
902
|
+
_form_params: List[Tuple[str, str]] = []
|
|
903
|
+
_files: Dict[
|
|
904
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
905
|
+
] = {}
|
|
906
|
+
_body_params: Optional[bytes] = None
|
|
907
|
+
|
|
908
|
+
# process the path parameters
|
|
909
|
+
if path_query_id is not None:
|
|
910
|
+
_path_params['pathQueryId'] = path_query_id
|
|
911
|
+
# process the query parameters
|
|
912
|
+
if features is not None:
|
|
913
|
+
|
|
914
|
+
_query_params.append(('features', features))
|
|
915
|
+
|
|
916
|
+
if variables is not None:
|
|
917
|
+
|
|
918
|
+
_query_params.append(('variables', variables))
|
|
919
|
+
|
|
920
|
+
# process the header parameters
|
|
921
|
+
# process the form parameters
|
|
922
|
+
# process the body parameter
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
# set the HTTP header `Accept`
|
|
926
|
+
if 'Accept' not in _header_params:
|
|
927
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
928
|
+
[
|
|
929
|
+
'application/json'
|
|
930
|
+
]
|
|
931
|
+
)
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
# authentication setting
|
|
935
|
+
_auth_settings: List[str] = [
|
|
936
|
+
'Accept',
|
|
937
|
+
'ClientLanguage',
|
|
938
|
+
'Priority',
|
|
939
|
+
'Referer',
|
|
940
|
+
'SecFetchDest',
|
|
941
|
+
'SecChUaPlatform',
|
|
942
|
+
'SecFetchMode',
|
|
943
|
+
'CsrfToken',
|
|
944
|
+
'ClientUuid',
|
|
945
|
+
'BearerAuth',
|
|
946
|
+
'GuestToken',
|
|
947
|
+
'SecChUa',
|
|
948
|
+
'CookieGt0',
|
|
949
|
+
'ClientTransactionId',
|
|
950
|
+
'ActiveUser',
|
|
951
|
+
'CookieCt0',
|
|
952
|
+
'UserAgent',
|
|
953
|
+
'AcceptLanguage',
|
|
954
|
+
'SecFetchSite',
|
|
955
|
+
'AuthType',
|
|
956
|
+
'CookieAuthToken',
|
|
957
|
+
'SecChUaMobile',
|
|
958
|
+
'AcceptEncoding'
|
|
959
|
+
]
|
|
960
|
+
|
|
961
|
+
return self.api_client.param_serialize(
|
|
962
|
+
method='GET',
|
|
963
|
+
resource_path='/graphql/{pathQueryId}/CommunityQuery',
|
|
964
|
+
path_params=_path_params,
|
|
965
|
+
query_params=_query_params,
|
|
966
|
+
header_params=_header_params,
|
|
967
|
+
body=_body_params,
|
|
968
|
+
post_params=_form_params,
|
|
969
|
+
files=_files,
|
|
970
|
+
auth_settings=_auth_settings,
|
|
971
|
+
collection_formats=_collection_formats,
|
|
972
|
+
_host=_host,
|
|
973
|
+
_request_auth=_request_auth
|
|
974
|
+
)
|
|
975
|
+
|
|
976
|
+
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
@validate_call
|
|
980
|
+
def get_global_communities_latest_post_search_timeline(
|
|
981
|
+
self,
|
|
982
|
+
path_query_id: StrictStr,
|
|
983
|
+
features: StrictStr,
|
|
984
|
+
variables: StrictStr,
|
|
985
|
+
_request_timeout: Union[
|
|
986
|
+
None,
|
|
987
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
988
|
+
Tuple[
|
|
989
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
990
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
991
|
+
]
|
|
992
|
+
] = None,
|
|
993
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
994
|
+
_content_type: Optional[StrictStr] = None,
|
|
995
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
996
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
997
|
+
) -> GlobalCommunitiesLatestPostSearchTimelineResponse:
|
|
998
|
+
"""get_global_communities_latest_post_search_timeline
|
|
999
|
+
|
|
1000
|
+
search posts across communities (Latest)
|
|
1001
|
+
|
|
1002
|
+
:param path_query_id: (required)
|
|
1003
|
+
:type path_query_id: str
|
|
1004
|
+
:param features: (required)
|
|
1005
|
+
:type features: str
|
|
1006
|
+
:param variables: (required)
|
|
1007
|
+
:type variables: str
|
|
1008
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1009
|
+
number provided, it will be total request
|
|
1010
|
+
timeout. It can also be a pair (tuple) of
|
|
1011
|
+
(connection, read) timeouts.
|
|
1012
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1013
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1014
|
+
request; this effectively ignores the
|
|
1015
|
+
authentication in the spec for a single request.
|
|
1016
|
+
:type _request_auth: dict, optional
|
|
1017
|
+
:param _content_type: force content-type for the request.
|
|
1018
|
+
:type _content_type: str, Optional
|
|
1019
|
+
:param _headers: set to override the headers for a single
|
|
1020
|
+
request; this effectively ignores the headers
|
|
1021
|
+
in the spec for a single request.
|
|
1022
|
+
:type _headers: dict, optional
|
|
1023
|
+
:param _host_index: set to override the host_index for a single
|
|
1024
|
+
request; this effectively ignores the host_index
|
|
1025
|
+
in the spec for a single request.
|
|
1026
|
+
:type _host_index: int, optional
|
|
1027
|
+
:return: Returns the result object.
|
|
1028
|
+
""" # noqa: E501
|
|
1029
|
+
|
|
1030
|
+
_param = self._get_global_communities_latest_post_search_timeline_serialize(
|
|
1031
|
+
path_query_id=path_query_id,
|
|
1032
|
+
features=features,
|
|
1033
|
+
variables=variables,
|
|
1034
|
+
_request_auth=_request_auth,
|
|
1035
|
+
_content_type=_content_type,
|
|
1036
|
+
_headers=_headers,
|
|
1037
|
+
_host_index=_host_index
|
|
1038
|
+
)
|
|
1039
|
+
|
|
1040
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1041
|
+
'200': "GlobalCommunitiesLatestPostSearchTimelineResponse",
|
|
1042
|
+
}
|
|
1043
|
+
response_data = self.api_client.call_api(
|
|
1044
|
+
*_param,
|
|
1045
|
+
_request_timeout=_request_timeout
|
|
1046
|
+
)
|
|
1047
|
+
response_data.read()
|
|
1048
|
+
return self.api_client.response_deserialize(
|
|
1049
|
+
response_data=response_data,
|
|
1050
|
+
response_types_map=_response_types_map,
|
|
1051
|
+
).data
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
@validate_call
|
|
1055
|
+
def get_global_communities_latest_post_search_timeline_with_http_info(
|
|
1056
|
+
self,
|
|
1057
|
+
path_query_id: StrictStr,
|
|
1058
|
+
features: 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[GlobalCommunitiesLatestPostSearchTimelineResponse]:
|
|
1073
|
+
"""get_global_communities_latest_post_search_timeline
|
|
1074
|
+
|
|
1075
|
+
search posts across communities (Latest)
|
|
1076
|
+
|
|
1077
|
+
:param path_query_id: (required)
|
|
1078
|
+
:type path_query_id: str
|
|
1079
|
+
:param features: (required)
|
|
1080
|
+
:type features: str
|
|
1081
|
+
:param variables: (required)
|
|
1082
|
+
:type variables: str
|
|
1083
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1084
|
+
number provided, it will be total request
|
|
1085
|
+
timeout. It can also be a pair (tuple) of
|
|
1086
|
+
(connection, read) timeouts.
|
|
1087
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1088
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1089
|
+
request; this effectively ignores the
|
|
1090
|
+
authentication in the spec for a single request.
|
|
1091
|
+
:type _request_auth: dict, optional
|
|
1092
|
+
:param _content_type: force content-type for the request.
|
|
1093
|
+
:type _content_type: str, Optional
|
|
1094
|
+
:param _headers: set to override the headers for a single
|
|
1095
|
+
request; this effectively ignores the headers
|
|
1096
|
+
in the spec for a single request.
|
|
1097
|
+
:type _headers: dict, optional
|
|
1098
|
+
:param _host_index: set to override the host_index for a single
|
|
1099
|
+
request; this effectively ignores the host_index
|
|
1100
|
+
in the spec for a single request.
|
|
1101
|
+
:type _host_index: int, optional
|
|
1102
|
+
:return: Returns the result object.
|
|
1103
|
+
""" # noqa: E501
|
|
1104
|
+
|
|
1105
|
+
_param = self._get_global_communities_latest_post_search_timeline_serialize(
|
|
1106
|
+
path_query_id=path_query_id,
|
|
1107
|
+
features=features,
|
|
1108
|
+
variables=variables,
|
|
1109
|
+
_request_auth=_request_auth,
|
|
1110
|
+
_content_type=_content_type,
|
|
1111
|
+
_headers=_headers,
|
|
1112
|
+
_host_index=_host_index
|
|
1113
|
+
)
|
|
1114
|
+
|
|
1115
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1116
|
+
'200': "GlobalCommunitiesLatestPostSearchTimelineResponse",
|
|
1117
|
+
}
|
|
1118
|
+
response_data = self.api_client.call_api(
|
|
1119
|
+
*_param,
|
|
1120
|
+
_request_timeout=_request_timeout
|
|
1121
|
+
)
|
|
1122
|
+
response_data.read()
|
|
1123
|
+
return self.api_client.response_deserialize(
|
|
1124
|
+
response_data=response_data,
|
|
1125
|
+
response_types_map=_response_types_map,
|
|
1126
|
+
)
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
@validate_call
|
|
1130
|
+
def get_global_communities_latest_post_search_timeline_without_preload_content(
|
|
1131
|
+
self,
|
|
1132
|
+
path_query_id: StrictStr,
|
|
1133
|
+
features: StrictStr,
|
|
1134
|
+
variables: StrictStr,
|
|
1135
|
+
_request_timeout: Union[
|
|
1136
|
+
None,
|
|
1137
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1138
|
+
Tuple[
|
|
1139
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1140
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1141
|
+
]
|
|
1142
|
+
] = None,
|
|
1143
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1144
|
+
_content_type: Optional[StrictStr] = None,
|
|
1145
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1146
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1147
|
+
) -> RESTResponseType:
|
|
1148
|
+
"""get_global_communities_latest_post_search_timeline
|
|
1149
|
+
|
|
1150
|
+
search posts across communities (Latest)
|
|
1151
|
+
|
|
1152
|
+
:param path_query_id: (required)
|
|
1153
|
+
:type path_query_id: str
|
|
1154
|
+
:param features: (required)
|
|
1155
|
+
:type features: str
|
|
1156
|
+
:param variables: (required)
|
|
1157
|
+
:type variables: str
|
|
1158
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1159
|
+
number provided, it will be total request
|
|
1160
|
+
timeout. It can also be a pair (tuple) of
|
|
1161
|
+
(connection, read) timeouts.
|
|
1162
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1163
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1164
|
+
request; this effectively ignores the
|
|
1165
|
+
authentication in the spec for a single request.
|
|
1166
|
+
:type _request_auth: dict, optional
|
|
1167
|
+
:param _content_type: force content-type for the request.
|
|
1168
|
+
:type _content_type: str, Optional
|
|
1169
|
+
:param _headers: set to override the headers for a single
|
|
1170
|
+
request; this effectively ignores the headers
|
|
1171
|
+
in the spec for a single request.
|
|
1172
|
+
:type _headers: dict, optional
|
|
1173
|
+
:param _host_index: set to override the host_index for a single
|
|
1174
|
+
request; this effectively ignores the host_index
|
|
1175
|
+
in the spec for a single request.
|
|
1176
|
+
:type _host_index: int, optional
|
|
1177
|
+
:return: Returns the result object.
|
|
1178
|
+
""" # noqa: E501
|
|
1179
|
+
|
|
1180
|
+
_param = self._get_global_communities_latest_post_search_timeline_serialize(
|
|
1181
|
+
path_query_id=path_query_id,
|
|
1182
|
+
features=features,
|
|
1183
|
+
variables=variables,
|
|
1184
|
+
_request_auth=_request_auth,
|
|
1185
|
+
_content_type=_content_type,
|
|
1186
|
+
_headers=_headers,
|
|
1187
|
+
_host_index=_host_index
|
|
1188
|
+
)
|
|
1189
|
+
|
|
1190
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1191
|
+
'200': "GlobalCommunitiesLatestPostSearchTimelineResponse",
|
|
1192
|
+
}
|
|
1193
|
+
response_data = self.api_client.call_api(
|
|
1194
|
+
*_param,
|
|
1195
|
+
_request_timeout=_request_timeout
|
|
1196
|
+
)
|
|
1197
|
+
return response_data.response
|
|
1198
|
+
|
|
1199
|
+
|
|
1200
|
+
def _get_global_communities_latest_post_search_timeline_serialize(
|
|
1201
|
+
self,
|
|
1202
|
+
path_query_id,
|
|
1203
|
+
features,
|
|
1204
|
+
variables,
|
|
1205
|
+
_request_auth,
|
|
1206
|
+
_content_type,
|
|
1207
|
+
_headers,
|
|
1208
|
+
_host_index,
|
|
1209
|
+
) -> RequestSerialized:
|
|
1210
|
+
|
|
1211
|
+
_host = None
|
|
1212
|
+
|
|
1213
|
+
_collection_formats: Dict[str, str] = {
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
_path_params: Dict[str, str] = {}
|
|
1217
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1218
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1219
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1220
|
+
_files: Dict[
|
|
1221
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1222
|
+
] = {}
|
|
1223
|
+
_body_params: Optional[bytes] = None
|
|
1224
|
+
|
|
1225
|
+
# process the path parameters
|
|
1226
|
+
if path_query_id is not None:
|
|
1227
|
+
_path_params['pathQueryId'] = path_query_id
|
|
1228
|
+
# process the query parameters
|
|
1229
|
+
if features is not None:
|
|
1230
|
+
|
|
1231
|
+
_query_params.append(('features', features))
|
|
1232
|
+
|
|
1233
|
+
if variables is not None:
|
|
1234
|
+
|
|
1235
|
+
_query_params.append(('variables', variables))
|
|
1236
|
+
|
|
1237
|
+
# process the header parameters
|
|
1238
|
+
# process the form parameters
|
|
1239
|
+
# process the body parameter
|
|
1240
|
+
|
|
1241
|
+
|
|
1242
|
+
# set the HTTP header `Accept`
|
|
1243
|
+
if 'Accept' not in _header_params:
|
|
1244
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1245
|
+
[
|
|
1246
|
+
'application/json'
|
|
1247
|
+
]
|
|
1248
|
+
)
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
# authentication setting
|
|
1252
|
+
_auth_settings: List[str] = [
|
|
1253
|
+
'Accept',
|
|
1254
|
+
'ClientLanguage',
|
|
1255
|
+
'Priority',
|
|
1256
|
+
'Referer',
|
|
1257
|
+
'SecFetchDest',
|
|
1258
|
+
'SecChUaPlatform',
|
|
1259
|
+
'SecFetchMode',
|
|
1260
|
+
'CsrfToken',
|
|
1261
|
+
'ClientUuid',
|
|
1262
|
+
'BearerAuth',
|
|
1263
|
+
'GuestToken',
|
|
1264
|
+
'SecChUa',
|
|
1265
|
+
'CookieGt0',
|
|
1266
|
+
'ClientTransactionId',
|
|
1267
|
+
'ActiveUser',
|
|
1268
|
+
'CookieCt0',
|
|
1269
|
+
'UserAgent',
|
|
1270
|
+
'AcceptLanguage',
|
|
1271
|
+
'SecFetchSite',
|
|
1272
|
+
'AuthType',
|
|
1273
|
+
'CookieAuthToken',
|
|
1274
|
+
'SecChUaMobile',
|
|
1275
|
+
'AcceptEncoding'
|
|
1276
|
+
]
|
|
1277
|
+
|
|
1278
|
+
return self.api_client.param_serialize(
|
|
1279
|
+
method='GET',
|
|
1280
|
+
resource_path='/graphql/{pathQueryId}/GlobalCommunitiesLatestPostSearchTimeline',
|
|
1281
|
+
path_params=_path_params,
|
|
1282
|
+
query_params=_query_params,
|
|
1283
|
+
header_params=_header_params,
|
|
1284
|
+
body=_body_params,
|
|
1285
|
+
post_params=_form_params,
|
|
1286
|
+
files=_files,
|
|
1287
|
+
auth_settings=_auth_settings,
|
|
1288
|
+
collection_formats=_collection_formats,
|
|
1289
|
+
_host=_host,
|
|
1290
|
+
_request_auth=_request_auth
|
|
1291
|
+
)
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
|
|
1295
|
+
|
|
1296
|
+
@validate_call
|
|
1297
|
+
def get_global_communities_post_search_timeline(
|
|
1298
|
+
self,
|
|
1299
|
+
path_query_id: StrictStr,
|
|
1300
|
+
features: StrictStr,
|
|
1301
|
+
variables: StrictStr,
|
|
1302
|
+
_request_timeout: Union[
|
|
1303
|
+
None,
|
|
1304
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1305
|
+
Tuple[
|
|
1306
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1307
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1308
|
+
]
|
|
1309
|
+
] = None,
|
|
1310
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1311
|
+
_content_type: Optional[StrictStr] = None,
|
|
1312
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1313
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1314
|
+
) -> GlobalCommunitiesPostSearchTimelineResponse:
|
|
1315
|
+
"""get_global_communities_post_search_timeline
|
|
1316
|
+
|
|
1317
|
+
search posts across communities (Top)
|
|
1318
|
+
|
|
1319
|
+
:param path_query_id: (required)
|
|
1320
|
+
:type path_query_id: str
|
|
1321
|
+
:param features: (required)
|
|
1322
|
+
:type features: str
|
|
1323
|
+
:param variables: (required)
|
|
1324
|
+
:type variables: str
|
|
1325
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1326
|
+
number provided, it will be total request
|
|
1327
|
+
timeout. It can also be a pair (tuple) of
|
|
1328
|
+
(connection, read) timeouts.
|
|
1329
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1330
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1331
|
+
request; this effectively ignores the
|
|
1332
|
+
authentication in the spec for a single request.
|
|
1333
|
+
:type _request_auth: dict, optional
|
|
1334
|
+
:param _content_type: force content-type for the request.
|
|
1335
|
+
:type _content_type: str, Optional
|
|
1336
|
+
:param _headers: set to override the headers for a single
|
|
1337
|
+
request; this effectively ignores the headers
|
|
1338
|
+
in the spec for a single request.
|
|
1339
|
+
:type _headers: dict, optional
|
|
1340
|
+
:param _host_index: set to override the host_index for a single
|
|
1341
|
+
request; this effectively ignores the host_index
|
|
1342
|
+
in the spec for a single request.
|
|
1343
|
+
:type _host_index: int, optional
|
|
1344
|
+
:return: Returns the result object.
|
|
1345
|
+
""" # noqa: E501
|
|
1346
|
+
|
|
1347
|
+
_param = self._get_global_communities_post_search_timeline_serialize(
|
|
1348
|
+
path_query_id=path_query_id,
|
|
1349
|
+
features=features,
|
|
1350
|
+
variables=variables,
|
|
1351
|
+
_request_auth=_request_auth,
|
|
1352
|
+
_content_type=_content_type,
|
|
1353
|
+
_headers=_headers,
|
|
1354
|
+
_host_index=_host_index
|
|
1355
|
+
)
|
|
1356
|
+
|
|
1357
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1358
|
+
'200': "GlobalCommunitiesPostSearchTimelineResponse",
|
|
1359
|
+
}
|
|
1360
|
+
response_data = self.api_client.call_api(
|
|
1361
|
+
*_param,
|
|
1362
|
+
_request_timeout=_request_timeout
|
|
1363
|
+
)
|
|
1364
|
+
response_data.read()
|
|
1365
|
+
return self.api_client.response_deserialize(
|
|
1366
|
+
response_data=response_data,
|
|
1367
|
+
response_types_map=_response_types_map,
|
|
1368
|
+
).data
|
|
1369
|
+
|
|
1370
|
+
|
|
1371
|
+
@validate_call
|
|
1372
|
+
def get_global_communities_post_search_timeline_with_http_info(
|
|
1373
|
+
self,
|
|
1374
|
+
path_query_id: StrictStr,
|
|
1375
|
+
features: StrictStr,
|
|
1376
|
+
variables: StrictStr,
|
|
1377
|
+
_request_timeout: Union[
|
|
1378
|
+
None,
|
|
1379
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1380
|
+
Tuple[
|
|
1381
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1382
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1383
|
+
]
|
|
1384
|
+
] = None,
|
|
1385
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1386
|
+
_content_type: Optional[StrictStr] = None,
|
|
1387
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1388
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1389
|
+
) -> ApiResponse[GlobalCommunitiesPostSearchTimelineResponse]:
|
|
1390
|
+
"""get_global_communities_post_search_timeline
|
|
1391
|
+
|
|
1392
|
+
search posts across communities (Top)
|
|
1393
|
+
|
|
1394
|
+
:param path_query_id: (required)
|
|
1395
|
+
:type path_query_id: str
|
|
1396
|
+
:param features: (required)
|
|
1397
|
+
:type features: str
|
|
1398
|
+
:param variables: (required)
|
|
1399
|
+
:type variables: str
|
|
1400
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1401
|
+
number provided, it will be total request
|
|
1402
|
+
timeout. It can also be a pair (tuple) of
|
|
1403
|
+
(connection, read) timeouts.
|
|
1404
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1405
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1406
|
+
request; this effectively ignores the
|
|
1407
|
+
authentication in the spec for a single request.
|
|
1408
|
+
:type _request_auth: dict, optional
|
|
1409
|
+
:param _content_type: force content-type for the request.
|
|
1410
|
+
:type _content_type: str, Optional
|
|
1411
|
+
:param _headers: set to override the headers for a single
|
|
1412
|
+
request; this effectively ignores the headers
|
|
1413
|
+
in the spec for a single request.
|
|
1414
|
+
:type _headers: dict, optional
|
|
1415
|
+
:param _host_index: set to override the host_index for a single
|
|
1416
|
+
request; this effectively ignores the host_index
|
|
1417
|
+
in the spec for a single request.
|
|
1418
|
+
:type _host_index: int, optional
|
|
1419
|
+
:return: Returns the result object.
|
|
1420
|
+
""" # noqa: E501
|
|
1421
|
+
|
|
1422
|
+
_param = self._get_global_communities_post_search_timeline_serialize(
|
|
1423
|
+
path_query_id=path_query_id,
|
|
1424
|
+
features=features,
|
|
1425
|
+
variables=variables,
|
|
1426
|
+
_request_auth=_request_auth,
|
|
1427
|
+
_content_type=_content_type,
|
|
1428
|
+
_headers=_headers,
|
|
1429
|
+
_host_index=_host_index
|
|
1430
|
+
)
|
|
1431
|
+
|
|
1432
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1433
|
+
'200': "GlobalCommunitiesPostSearchTimelineResponse",
|
|
1434
|
+
}
|
|
1435
|
+
response_data = self.api_client.call_api(
|
|
1436
|
+
*_param,
|
|
1437
|
+
_request_timeout=_request_timeout
|
|
1438
|
+
)
|
|
1439
|
+
response_data.read()
|
|
1440
|
+
return self.api_client.response_deserialize(
|
|
1441
|
+
response_data=response_data,
|
|
1442
|
+
response_types_map=_response_types_map,
|
|
1443
|
+
)
|
|
1444
|
+
|
|
1445
|
+
|
|
1446
|
+
@validate_call
|
|
1447
|
+
def get_global_communities_post_search_timeline_without_preload_content(
|
|
1448
|
+
self,
|
|
1449
|
+
path_query_id: StrictStr,
|
|
1450
|
+
features: StrictStr,
|
|
1451
|
+
variables: StrictStr,
|
|
1452
|
+
_request_timeout: Union[
|
|
1453
|
+
None,
|
|
1454
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1455
|
+
Tuple[
|
|
1456
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1457
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1458
|
+
]
|
|
1459
|
+
] = None,
|
|
1460
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1461
|
+
_content_type: Optional[StrictStr] = None,
|
|
1462
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1463
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1464
|
+
) -> RESTResponseType:
|
|
1465
|
+
"""get_global_communities_post_search_timeline
|
|
1466
|
+
|
|
1467
|
+
search posts across communities (Top)
|
|
1468
|
+
|
|
1469
|
+
:param path_query_id: (required)
|
|
1470
|
+
:type path_query_id: str
|
|
1471
|
+
:param features: (required)
|
|
1472
|
+
:type features: str
|
|
1473
|
+
:param variables: (required)
|
|
1474
|
+
:type variables: str
|
|
1475
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1476
|
+
number provided, it will be total request
|
|
1477
|
+
timeout. It can also be a pair (tuple) of
|
|
1478
|
+
(connection, read) timeouts.
|
|
1479
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1480
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1481
|
+
request; this effectively ignores the
|
|
1482
|
+
authentication in the spec for a single request.
|
|
1483
|
+
:type _request_auth: dict, optional
|
|
1484
|
+
:param _content_type: force content-type for the request.
|
|
1485
|
+
:type _content_type: str, Optional
|
|
1486
|
+
:param _headers: set to override the headers for a single
|
|
1487
|
+
request; this effectively ignores the headers
|
|
1488
|
+
in the spec for a single request.
|
|
1489
|
+
:type _headers: dict, optional
|
|
1490
|
+
:param _host_index: set to override the host_index for a single
|
|
1491
|
+
request; this effectively ignores the host_index
|
|
1492
|
+
in the spec for a single request.
|
|
1493
|
+
:type _host_index: int, optional
|
|
1494
|
+
:return: Returns the result object.
|
|
1495
|
+
""" # noqa: E501
|
|
1496
|
+
|
|
1497
|
+
_param = self._get_global_communities_post_search_timeline_serialize(
|
|
1498
|
+
path_query_id=path_query_id,
|
|
1499
|
+
features=features,
|
|
1500
|
+
variables=variables,
|
|
1501
|
+
_request_auth=_request_auth,
|
|
1502
|
+
_content_type=_content_type,
|
|
1503
|
+
_headers=_headers,
|
|
1504
|
+
_host_index=_host_index
|
|
1505
|
+
)
|
|
1506
|
+
|
|
1507
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1508
|
+
'200': "GlobalCommunitiesPostSearchTimelineResponse",
|
|
1509
|
+
}
|
|
1510
|
+
response_data = self.api_client.call_api(
|
|
1511
|
+
*_param,
|
|
1512
|
+
_request_timeout=_request_timeout
|
|
1513
|
+
)
|
|
1514
|
+
return response_data.response
|
|
1515
|
+
|
|
1516
|
+
|
|
1517
|
+
def _get_global_communities_post_search_timeline_serialize(
|
|
1518
|
+
self,
|
|
1519
|
+
path_query_id,
|
|
1520
|
+
features,
|
|
1521
|
+
variables,
|
|
1522
|
+
_request_auth,
|
|
1523
|
+
_content_type,
|
|
1524
|
+
_headers,
|
|
1525
|
+
_host_index,
|
|
1526
|
+
) -> RequestSerialized:
|
|
1527
|
+
|
|
1528
|
+
_host = None
|
|
1529
|
+
|
|
1530
|
+
_collection_formats: Dict[str, str] = {
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
_path_params: Dict[str, str] = {}
|
|
1534
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1535
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1536
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1537
|
+
_files: Dict[
|
|
1538
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1539
|
+
] = {}
|
|
1540
|
+
_body_params: Optional[bytes] = None
|
|
1541
|
+
|
|
1542
|
+
# process the path parameters
|
|
1543
|
+
if path_query_id is not None:
|
|
1544
|
+
_path_params['pathQueryId'] = path_query_id
|
|
1545
|
+
# process the query parameters
|
|
1546
|
+
if features is not None:
|
|
1547
|
+
|
|
1548
|
+
_query_params.append(('features', features))
|
|
1549
|
+
|
|
1550
|
+
if variables is not None:
|
|
1551
|
+
|
|
1552
|
+
_query_params.append(('variables', variables))
|
|
1553
|
+
|
|
1554
|
+
# process the header parameters
|
|
1555
|
+
# process the form parameters
|
|
1556
|
+
# process the body parameter
|
|
1557
|
+
|
|
1558
|
+
|
|
1559
|
+
# set the HTTP header `Accept`
|
|
1560
|
+
if 'Accept' not in _header_params:
|
|
1561
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1562
|
+
[
|
|
1563
|
+
'application/json'
|
|
1564
|
+
]
|
|
1565
|
+
)
|
|
1566
|
+
|
|
1567
|
+
|
|
1568
|
+
# authentication setting
|
|
1569
|
+
_auth_settings: List[str] = [
|
|
1570
|
+
'Accept',
|
|
1571
|
+
'ClientLanguage',
|
|
1572
|
+
'Priority',
|
|
1573
|
+
'Referer',
|
|
1574
|
+
'SecFetchDest',
|
|
1575
|
+
'SecChUaPlatform',
|
|
1576
|
+
'SecFetchMode',
|
|
1577
|
+
'CsrfToken',
|
|
1578
|
+
'ClientUuid',
|
|
1579
|
+
'BearerAuth',
|
|
1580
|
+
'GuestToken',
|
|
1581
|
+
'SecChUa',
|
|
1582
|
+
'CookieGt0',
|
|
1583
|
+
'ClientTransactionId',
|
|
1584
|
+
'ActiveUser',
|
|
1585
|
+
'CookieCt0',
|
|
1586
|
+
'UserAgent',
|
|
1587
|
+
'AcceptLanguage',
|
|
1588
|
+
'SecFetchSite',
|
|
1589
|
+
'AuthType',
|
|
1590
|
+
'CookieAuthToken',
|
|
1591
|
+
'SecChUaMobile',
|
|
1592
|
+
'AcceptEncoding'
|
|
1593
|
+
]
|
|
1594
|
+
|
|
1595
|
+
return self.api_client.param_serialize(
|
|
1596
|
+
method='GET',
|
|
1597
|
+
resource_path='/graphql/{pathQueryId}/GlobalCommunitiesPostSearchTimeline',
|
|
1598
|
+
path_params=_path_params,
|
|
1599
|
+
query_params=_query_params,
|
|
1600
|
+
header_params=_header_params,
|
|
1601
|
+
body=_body_params,
|
|
1602
|
+
post_params=_form_params,
|
|
1603
|
+
files=_files,
|
|
1604
|
+
auth_settings=_auth_settings,
|
|
1605
|
+
collection_formats=_collection_formats,
|
|
1606
|
+
_host=_host,
|
|
1607
|
+
_request_auth=_request_auth
|
|
1608
|
+
)
|
|
1609
|
+
|
|
1610
|
+
|
|
1611
|
+
|
|
1612
|
+
|
|
1613
|
+
@validate_call
|
|
1614
|
+
def get_topic_carousel_query(
|
|
1615
|
+
self,
|
|
1616
|
+
path_query_id: StrictStr,
|
|
1617
|
+
variables: StrictStr,
|
|
1618
|
+
_request_timeout: Union[
|
|
1619
|
+
None,
|
|
1620
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1621
|
+
Tuple[
|
|
1622
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1623
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1624
|
+
]
|
|
1625
|
+
] = None,
|
|
1626
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1627
|
+
_content_type: Optional[StrictStr] = None,
|
|
1628
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1629
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1630
|
+
) -> TopicCarouselQueryResponse:
|
|
1631
|
+
"""get_topic_carousel_query
|
|
1632
|
+
|
|
1633
|
+
community topics and subtopics
|
|
1634
|
+
|
|
1635
|
+
:param path_query_id: (required)
|
|
1636
|
+
:type path_query_id: str
|
|
1637
|
+
:param variables: (required)
|
|
1638
|
+
:type variables: str
|
|
1639
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1640
|
+
number provided, it will be total request
|
|
1641
|
+
timeout. It can also be a pair (tuple) of
|
|
1642
|
+
(connection, read) timeouts.
|
|
1643
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1644
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1645
|
+
request; this effectively ignores the
|
|
1646
|
+
authentication in the spec for a single request.
|
|
1647
|
+
:type _request_auth: dict, optional
|
|
1648
|
+
:param _content_type: force content-type for the request.
|
|
1649
|
+
:type _content_type: str, Optional
|
|
1650
|
+
:param _headers: set to override the headers for a single
|
|
1651
|
+
request; this effectively ignores the headers
|
|
1652
|
+
in the spec for a single request.
|
|
1653
|
+
:type _headers: dict, optional
|
|
1654
|
+
:param _host_index: set to override the host_index for a single
|
|
1655
|
+
request; this effectively ignores the host_index
|
|
1656
|
+
in the spec for a single request.
|
|
1657
|
+
:type _host_index: int, optional
|
|
1658
|
+
:return: Returns the result object.
|
|
1659
|
+
""" # noqa: E501
|
|
1660
|
+
|
|
1661
|
+
_param = self._get_topic_carousel_query_serialize(
|
|
1662
|
+
path_query_id=path_query_id,
|
|
1663
|
+
variables=variables,
|
|
1664
|
+
_request_auth=_request_auth,
|
|
1665
|
+
_content_type=_content_type,
|
|
1666
|
+
_headers=_headers,
|
|
1667
|
+
_host_index=_host_index
|
|
1668
|
+
)
|
|
1669
|
+
|
|
1670
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1671
|
+
'200': "TopicCarouselQueryResponse",
|
|
1672
|
+
}
|
|
1673
|
+
response_data = self.api_client.call_api(
|
|
1674
|
+
*_param,
|
|
1675
|
+
_request_timeout=_request_timeout
|
|
1676
|
+
)
|
|
1677
|
+
response_data.read()
|
|
1678
|
+
return self.api_client.response_deserialize(
|
|
1679
|
+
response_data=response_data,
|
|
1680
|
+
response_types_map=_response_types_map,
|
|
1681
|
+
).data
|
|
1682
|
+
|
|
1683
|
+
|
|
1684
|
+
@validate_call
|
|
1685
|
+
def get_topic_carousel_query_with_http_info(
|
|
1686
|
+
self,
|
|
1687
|
+
path_query_id: StrictStr,
|
|
1688
|
+
variables: StrictStr,
|
|
1689
|
+
_request_timeout: Union[
|
|
1690
|
+
None,
|
|
1691
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1692
|
+
Tuple[
|
|
1693
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1694
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1695
|
+
]
|
|
1696
|
+
] = None,
|
|
1697
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1698
|
+
_content_type: Optional[StrictStr] = None,
|
|
1699
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1700
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1701
|
+
) -> ApiResponse[TopicCarouselQueryResponse]:
|
|
1702
|
+
"""get_topic_carousel_query
|
|
1703
|
+
|
|
1704
|
+
community topics and subtopics
|
|
1705
|
+
|
|
1706
|
+
:param path_query_id: (required)
|
|
1707
|
+
:type path_query_id: str
|
|
1708
|
+
:param variables: (required)
|
|
1709
|
+
:type variables: str
|
|
1710
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1711
|
+
number provided, it will be total request
|
|
1712
|
+
timeout. It can also be a pair (tuple) of
|
|
1713
|
+
(connection, read) timeouts.
|
|
1714
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1715
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1716
|
+
request; this effectively ignores the
|
|
1717
|
+
authentication in the spec for a single request.
|
|
1718
|
+
:type _request_auth: dict, optional
|
|
1719
|
+
:param _content_type: force content-type for the request.
|
|
1720
|
+
:type _content_type: str, Optional
|
|
1721
|
+
:param _headers: set to override the headers for a single
|
|
1722
|
+
request; this effectively ignores the headers
|
|
1723
|
+
in the spec for a single request.
|
|
1724
|
+
:type _headers: dict, optional
|
|
1725
|
+
:param _host_index: set to override the host_index for a single
|
|
1726
|
+
request; this effectively ignores the host_index
|
|
1727
|
+
in the spec for a single request.
|
|
1728
|
+
:type _host_index: int, optional
|
|
1729
|
+
:return: Returns the result object.
|
|
1730
|
+
""" # noqa: E501
|
|
1731
|
+
|
|
1732
|
+
_param = self._get_topic_carousel_query_serialize(
|
|
1733
|
+
path_query_id=path_query_id,
|
|
1734
|
+
variables=variables,
|
|
1735
|
+
_request_auth=_request_auth,
|
|
1736
|
+
_content_type=_content_type,
|
|
1737
|
+
_headers=_headers,
|
|
1738
|
+
_host_index=_host_index
|
|
1739
|
+
)
|
|
1740
|
+
|
|
1741
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1742
|
+
'200': "TopicCarouselQueryResponse",
|
|
1743
|
+
}
|
|
1744
|
+
response_data = self.api_client.call_api(
|
|
1745
|
+
*_param,
|
|
1746
|
+
_request_timeout=_request_timeout
|
|
1747
|
+
)
|
|
1748
|
+
response_data.read()
|
|
1749
|
+
return self.api_client.response_deserialize(
|
|
1750
|
+
response_data=response_data,
|
|
1751
|
+
response_types_map=_response_types_map,
|
|
1752
|
+
)
|
|
1753
|
+
|
|
1754
|
+
|
|
1755
|
+
@validate_call
|
|
1756
|
+
def get_topic_carousel_query_without_preload_content(
|
|
1757
|
+
self,
|
|
1758
|
+
path_query_id: StrictStr,
|
|
1759
|
+
variables: StrictStr,
|
|
1760
|
+
_request_timeout: Union[
|
|
1761
|
+
None,
|
|
1762
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1763
|
+
Tuple[
|
|
1764
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1765
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1766
|
+
]
|
|
1767
|
+
] = None,
|
|
1768
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1769
|
+
_content_type: Optional[StrictStr] = None,
|
|
1770
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1771
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1772
|
+
) -> RESTResponseType:
|
|
1773
|
+
"""get_topic_carousel_query
|
|
1774
|
+
|
|
1775
|
+
community topics and subtopics
|
|
1776
|
+
|
|
1777
|
+
:param path_query_id: (required)
|
|
1778
|
+
:type path_query_id: str
|
|
1779
|
+
:param variables: (required)
|
|
1780
|
+
:type variables: str
|
|
1781
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1782
|
+
number provided, it will be total request
|
|
1783
|
+
timeout. It can also be a pair (tuple) of
|
|
1784
|
+
(connection, read) timeouts.
|
|
1785
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1786
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1787
|
+
request; this effectively ignores the
|
|
1788
|
+
authentication in the spec for a single request.
|
|
1789
|
+
:type _request_auth: dict, optional
|
|
1790
|
+
:param _content_type: force content-type for the request.
|
|
1791
|
+
:type _content_type: str, Optional
|
|
1792
|
+
:param _headers: set to override the headers for a single
|
|
1793
|
+
request; this effectively ignores the headers
|
|
1794
|
+
in the spec for a single request.
|
|
1795
|
+
:type _headers: dict, optional
|
|
1796
|
+
:param _host_index: set to override the host_index for a single
|
|
1797
|
+
request; this effectively ignores the host_index
|
|
1798
|
+
in the spec for a single request.
|
|
1799
|
+
:type _host_index: int, optional
|
|
1800
|
+
:return: Returns the result object.
|
|
1801
|
+
""" # noqa: E501
|
|
1802
|
+
|
|
1803
|
+
_param = self._get_topic_carousel_query_serialize(
|
|
1804
|
+
path_query_id=path_query_id,
|
|
1805
|
+
variables=variables,
|
|
1806
|
+
_request_auth=_request_auth,
|
|
1807
|
+
_content_type=_content_type,
|
|
1808
|
+
_headers=_headers,
|
|
1809
|
+
_host_index=_host_index
|
|
1810
|
+
)
|
|
1811
|
+
|
|
1812
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1813
|
+
'200': "TopicCarouselQueryResponse",
|
|
1814
|
+
}
|
|
1815
|
+
response_data = self.api_client.call_api(
|
|
1816
|
+
*_param,
|
|
1817
|
+
_request_timeout=_request_timeout
|
|
1818
|
+
)
|
|
1819
|
+
return response_data.response
|
|
1820
|
+
|
|
1821
|
+
|
|
1822
|
+
def _get_topic_carousel_query_serialize(
|
|
1823
|
+
self,
|
|
1824
|
+
path_query_id,
|
|
1825
|
+
variables,
|
|
1826
|
+
_request_auth,
|
|
1827
|
+
_content_type,
|
|
1828
|
+
_headers,
|
|
1829
|
+
_host_index,
|
|
1830
|
+
) -> RequestSerialized:
|
|
1831
|
+
|
|
1832
|
+
_host = None
|
|
1833
|
+
|
|
1834
|
+
_collection_formats: Dict[str, str] = {
|
|
1835
|
+
}
|
|
1836
|
+
|
|
1837
|
+
_path_params: Dict[str, str] = {}
|
|
1838
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1839
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1840
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1841
|
+
_files: Dict[
|
|
1842
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1843
|
+
] = {}
|
|
1844
|
+
_body_params: Optional[bytes] = None
|
|
1845
|
+
|
|
1846
|
+
# process the path parameters
|
|
1847
|
+
if path_query_id is not None:
|
|
1848
|
+
_path_params['pathQueryId'] = path_query_id
|
|
1849
|
+
# process the query parameters
|
|
1850
|
+
if variables is not None:
|
|
1851
|
+
|
|
1852
|
+
_query_params.append(('variables', variables))
|
|
1853
|
+
|
|
1854
|
+
# process the header parameters
|
|
1855
|
+
# process the form parameters
|
|
1856
|
+
# process the body parameter
|
|
1857
|
+
|
|
1858
|
+
|
|
1859
|
+
# set the HTTP header `Accept`
|
|
1860
|
+
if 'Accept' not in _header_params:
|
|
1861
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1862
|
+
[
|
|
1863
|
+
'application/json'
|
|
1864
|
+
]
|
|
1865
|
+
)
|
|
1866
|
+
|
|
1867
|
+
|
|
1868
|
+
# authentication setting
|
|
1869
|
+
_auth_settings: List[str] = [
|
|
1870
|
+
'Accept',
|
|
1871
|
+
'ClientLanguage',
|
|
1872
|
+
'Priority',
|
|
1873
|
+
'Referer',
|
|
1874
|
+
'SecFetchDest',
|
|
1875
|
+
'SecChUaPlatform',
|
|
1876
|
+
'SecFetchMode',
|
|
1877
|
+
'CsrfToken',
|
|
1878
|
+
'ClientUuid',
|
|
1879
|
+
'BearerAuth',
|
|
1880
|
+
'GuestToken',
|
|
1881
|
+
'SecChUa',
|
|
1882
|
+
'CookieGt0',
|
|
1883
|
+
'ClientTransactionId',
|
|
1884
|
+
'ActiveUser',
|
|
1885
|
+
'CookieCt0',
|
|
1886
|
+
'UserAgent',
|
|
1887
|
+
'AcceptLanguage',
|
|
1888
|
+
'SecFetchSite',
|
|
1889
|
+
'AuthType',
|
|
1890
|
+
'CookieAuthToken',
|
|
1891
|
+
'SecChUaMobile',
|
|
1892
|
+
'AcceptEncoding'
|
|
1893
|
+
]
|
|
1894
|
+
|
|
1895
|
+
return self.api_client.param_serialize(
|
|
1896
|
+
method='GET',
|
|
1897
|
+
resource_path='/graphql/{pathQueryId}/TopicCarouselQuery',
|
|
1898
|
+
path_params=_path_params,
|
|
1899
|
+
query_params=_query_params,
|
|
1900
|
+
header_params=_header_params,
|
|
1901
|
+
body=_body_params,
|
|
1902
|
+
post_params=_form_params,
|
|
1903
|
+
files=_files,
|
|
1904
|
+
auth_settings=_auth_settings,
|
|
1905
|
+
collection_formats=_collection_formats,
|
|
1906
|
+
_host=_host,
|
|
1907
|
+
_request_auth=_request_auth
|
|
1908
|
+
)
|
|
1909
|
+
|
|
1910
|
+
|