rapidata 2.27.5__py3-none-any.whl → 2.28.0__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.
Potentially problematic release.
This version of rapidata might be problematic. Click here for more details.
- rapidata/__init__.py +3 -1
- rapidata/api_client/__init__.py +19 -1
- rapidata/api_client/api/__init__.py +1 -0
- rapidata/api_client/api/client_api.py +319 -46
- rapidata/api_client/api/leaderboard_api.py +2506 -0
- rapidata/api_client/models/__init__.py +18 -1
- rapidata/api_client/models/client_model.py +191 -0
- rapidata/api_client/models/create_customer_client_result.py +89 -0
- rapidata/api_client/models/create_leaderboard_model.py +91 -0
- rapidata/api_client/models/create_leaderboard_participant_model.py +87 -0
- rapidata/api_client/models/create_leaderboard_participant_result.py +89 -0
- rapidata/api_client/models/create_leaderboard_result.py +87 -0
- rapidata/api_client/models/dynamic_client_registration_request.py +175 -0
- rapidata/api_client/models/get_leaderboard_by_id_result.py +91 -0
- rapidata/api_client/models/get_participant_by_id_result.py +102 -0
- rapidata/api_client/models/json_web_key.py +258 -0
- rapidata/api_client/models/json_web_key_set.py +115 -0
- rapidata/api_client/models/leaderboard_query_result.py +93 -0
- rapidata/api_client/models/leaderboard_query_result_paged_result.py +105 -0
- rapidata/api_client/models/participant_by_leaderboard.py +102 -0
- rapidata/api_client/models/participant_by_leaderboard_paged_result.py +105 -0
- rapidata/api_client/models/participant_status.py +39 -0
- rapidata/api_client/models/prompt_by_leaderboard_result.py +90 -0
- rapidata/api_client/models/prompt_by_leaderboard_result_paged_result.py +105 -0
- rapidata/api_client_README.md +29 -2
- rapidata/rapidata_client/__init__.py +2 -0
- rapidata/rapidata_client/leaderboard/__init__.py +0 -0
- rapidata/rapidata_client/leaderboard/rapidata_leaderboard.py +127 -0
- rapidata/rapidata_client/leaderboard/rapidata_leaderboard_manager.py +80 -0
- rapidata/rapidata_client/order/rapidata_order.py +0 -1
- rapidata/rapidata_client/order/rapidata_order_manager.py +5 -5
- rapidata/rapidata_client/order/rapidata_results.py +17 -9
- rapidata/rapidata_client/rapidata_client.py +4 -0
- rapidata/rapidata_client/selection/__init__.py +1 -0
- rapidata/rapidata_client/selection/effort_selection.py +19 -0
- rapidata/rapidata_client/settings/__init__.py +1 -0
- rapidata/rapidata_client/settings/allow_neither_both.py +15 -0
- rapidata/rapidata_client/settings/rapidata_settings.py +3 -1
- rapidata/rapidata_client/validation/validation_set_manager.py +14 -0
- rapidata/service/openapi_service.py +5 -0
- {rapidata-2.27.5.dist-info → rapidata-2.28.0.dist-info}/METADATA +1 -1
- {rapidata-2.27.5.dist-info → rapidata-2.28.0.dist-info}/RECORD +44 -20
- {rapidata-2.27.5.dist-info → rapidata-2.28.0.dist-info}/LICENSE +0 -0
- {rapidata-2.27.5.dist-info → rapidata-2.28.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,2506 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Rapidata.Dataset
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
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 Field, StrictStr
|
|
20
|
+
from typing import Optional
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from rapidata.api_client.models.create_leaderboard_model import CreateLeaderboardModel
|
|
23
|
+
from rapidata.api_client.models.create_leaderboard_participant_model import CreateLeaderboardParticipantModel
|
|
24
|
+
from rapidata.api_client.models.create_leaderboard_participant_result import CreateLeaderboardParticipantResult
|
|
25
|
+
from rapidata.api_client.models.create_leaderboard_result import CreateLeaderboardResult
|
|
26
|
+
from rapidata.api_client.models.get_leaderboard_by_id_result import GetLeaderboardByIdResult
|
|
27
|
+
from rapidata.api_client.models.get_participant_by_id_result import GetParticipantByIdResult
|
|
28
|
+
from rapidata.api_client.models.leaderboard_query_result_paged_result import LeaderboardQueryResultPagedResult
|
|
29
|
+
from rapidata.api_client.models.participant_by_leaderboard_paged_result import ParticipantByLeaderboardPagedResult
|
|
30
|
+
from rapidata.api_client.models.prompt_by_leaderboard_result_paged_result import PromptByLeaderboardResultPagedResult
|
|
31
|
+
from rapidata.api_client.models.query_model import QueryModel
|
|
32
|
+
|
|
33
|
+
from rapidata.api_client.api_client import ApiClient, RequestSerialized
|
|
34
|
+
from rapidata.api_client.api_response import ApiResponse
|
|
35
|
+
from rapidata.api_client.rest import RESTResponseType
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class LeaderboardApi:
|
|
39
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
40
|
+
Ref: https://openapi-generator.tech
|
|
41
|
+
|
|
42
|
+
Do not edit the class manually.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
def __init__(self, api_client=None) -> None:
|
|
46
|
+
if api_client is None:
|
|
47
|
+
api_client = ApiClient.get_default()
|
|
48
|
+
self.api_client = api_client
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
@validate_call
|
|
52
|
+
def leaderboard_leaderboard_id_get(
|
|
53
|
+
self,
|
|
54
|
+
leaderboard_id: StrictStr,
|
|
55
|
+
_request_timeout: Union[
|
|
56
|
+
None,
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
58
|
+
Tuple[
|
|
59
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
60
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
61
|
+
]
|
|
62
|
+
] = None,
|
|
63
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
64
|
+
_content_type: Optional[StrictStr] = None,
|
|
65
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
66
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
67
|
+
) -> GetLeaderboardByIdResult:
|
|
68
|
+
"""Gets a leaderboard by its ID.
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
:param leaderboard_id: (required)
|
|
72
|
+
:type leaderboard_id: str
|
|
73
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
74
|
+
number provided, it will be total request
|
|
75
|
+
timeout. It can also be a pair (tuple) of
|
|
76
|
+
(connection, read) timeouts.
|
|
77
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
78
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
79
|
+
request; this effectively ignores the
|
|
80
|
+
authentication in the spec for a single request.
|
|
81
|
+
:type _request_auth: dict, optional
|
|
82
|
+
:param _content_type: force content-type for the request.
|
|
83
|
+
:type _content_type: str, Optional
|
|
84
|
+
:param _headers: set to override the headers for a single
|
|
85
|
+
request; this effectively ignores the headers
|
|
86
|
+
in the spec for a single request.
|
|
87
|
+
:type _headers: dict, optional
|
|
88
|
+
:param _host_index: set to override the host_index for a single
|
|
89
|
+
request; this effectively ignores the host_index
|
|
90
|
+
in the spec for a single request.
|
|
91
|
+
:type _host_index: int, optional
|
|
92
|
+
:return: Returns the result object.
|
|
93
|
+
""" # noqa: E501
|
|
94
|
+
|
|
95
|
+
_param = self._leaderboard_leaderboard_id_get_serialize(
|
|
96
|
+
leaderboard_id=leaderboard_id,
|
|
97
|
+
_request_auth=_request_auth,
|
|
98
|
+
_content_type=_content_type,
|
|
99
|
+
_headers=_headers,
|
|
100
|
+
_host_index=_host_index
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
104
|
+
'200': "GetLeaderboardByIdResult",
|
|
105
|
+
}
|
|
106
|
+
response_data = self.api_client.call_api(
|
|
107
|
+
*_param,
|
|
108
|
+
_request_timeout=_request_timeout
|
|
109
|
+
)
|
|
110
|
+
response_data.read()
|
|
111
|
+
return self.api_client.response_deserialize(
|
|
112
|
+
response_data=response_data,
|
|
113
|
+
response_types_map=_response_types_map,
|
|
114
|
+
).data
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@validate_call
|
|
118
|
+
def leaderboard_leaderboard_id_get_with_http_info(
|
|
119
|
+
self,
|
|
120
|
+
leaderboard_id: StrictStr,
|
|
121
|
+
_request_timeout: Union[
|
|
122
|
+
None,
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
124
|
+
Tuple[
|
|
125
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
127
|
+
]
|
|
128
|
+
] = None,
|
|
129
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
130
|
+
_content_type: Optional[StrictStr] = None,
|
|
131
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
132
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
133
|
+
) -> ApiResponse[GetLeaderboardByIdResult]:
|
|
134
|
+
"""Gets a leaderboard by its ID.
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
:param leaderboard_id: (required)
|
|
138
|
+
:type leaderboard_id: str
|
|
139
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
140
|
+
number provided, it will be total request
|
|
141
|
+
timeout. It can also be a pair (tuple) of
|
|
142
|
+
(connection, read) timeouts.
|
|
143
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
144
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
145
|
+
request; this effectively ignores the
|
|
146
|
+
authentication in the spec for a single request.
|
|
147
|
+
:type _request_auth: dict, optional
|
|
148
|
+
:param _content_type: force content-type for the request.
|
|
149
|
+
:type _content_type: str, Optional
|
|
150
|
+
:param _headers: set to override the headers for a single
|
|
151
|
+
request; this effectively ignores the headers
|
|
152
|
+
in the spec for a single request.
|
|
153
|
+
:type _headers: dict, optional
|
|
154
|
+
:param _host_index: set to override the host_index for a single
|
|
155
|
+
request; this effectively ignores the host_index
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _host_index: int, optional
|
|
158
|
+
:return: Returns the result object.
|
|
159
|
+
""" # noqa: E501
|
|
160
|
+
|
|
161
|
+
_param = self._leaderboard_leaderboard_id_get_serialize(
|
|
162
|
+
leaderboard_id=leaderboard_id,
|
|
163
|
+
_request_auth=_request_auth,
|
|
164
|
+
_content_type=_content_type,
|
|
165
|
+
_headers=_headers,
|
|
166
|
+
_host_index=_host_index
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
170
|
+
'200': "GetLeaderboardByIdResult",
|
|
171
|
+
}
|
|
172
|
+
response_data = self.api_client.call_api(
|
|
173
|
+
*_param,
|
|
174
|
+
_request_timeout=_request_timeout
|
|
175
|
+
)
|
|
176
|
+
response_data.read()
|
|
177
|
+
return self.api_client.response_deserialize(
|
|
178
|
+
response_data=response_data,
|
|
179
|
+
response_types_map=_response_types_map,
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
@validate_call
|
|
184
|
+
def leaderboard_leaderboard_id_get_without_preload_content(
|
|
185
|
+
self,
|
|
186
|
+
leaderboard_id: StrictStr,
|
|
187
|
+
_request_timeout: Union[
|
|
188
|
+
None,
|
|
189
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
190
|
+
Tuple[
|
|
191
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
192
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
193
|
+
]
|
|
194
|
+
] = None,
|
|
195
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
196
|
+
_content_type: Optional[StrictStr] = None,
|
|
197
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
198
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
199
|
+
) -> RESTResponseType:
|
|
200
|
+
"""Gets a leaderboard by its ID.
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
:param leaderboard_id: (required)
|
|
204
|
+
:type leaderboard_id: str
|
|
205
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
206
|
+
number provided, it will be total request
|
|
207
|
+
timeout. It can also be a pair (tuple) of
|
|
208
|
+
(connection, read) timeouts.
|
|
209
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
210
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
211
|
+
request; this effectively ignores the
|
|
212
|
+
authentication in the spec for a single request.
|
|
213
|
+
:type _request_auth: dict, optional
|
|
214
|
+
:param _content_type: force content-type for the request.
|
|
215
|
+
:type _content_type: str, Optional
|
|
216
|
+
:param _headers: set to override the headers for a single
|
|
217
|
+
request; this effectively ignores the headers
|
|
218
|
+
in the spec for a single request.
|
|
219
|
+
:type _headers: dict, optional
|
|
220
|
+
:param _host_index: set to override the host_index for a single
|
|
221
|
+
request; this effectively ignores the host_index
|
|
222
|
+
in the spec for a single request.
|
|
223
|
+
:type _host_index: int, optional
|
|
224
|
+
:return: Returns the result object.
|
|
225
|
+
""" # noqa: E501
|
|
226
|
+
|
|
227
|
+
_param = self._leaderboard_leaderboard_id_get_serialize(
|
|
228
|
+
leaderboard_id=leaderboard_id,
|
|
229
|
+
_request_auth=_request_auth,
|
|
230
|
+
_content_type=_content_type,
|
|
231
|
+
_headers=_headers,
|
|
232
|
+
_host_index=_host_index
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
236
|
+
'200': "GetLeaderboardByIdResult",
|
|
237
|
+
}
|
|
238
|
+
response_data = self.api_client.call_api(
|
|
239
|
+
*_param,
|
|
240
|
+
_request_timeout=_request_timeout
|
|
241
|
+
)
|
|
242
|
+
return response_data.response
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
def _leaderboard_leaderboard_id_get_serialize(
|
|
246
|
+
self,
|
|
247
|
+
leaderboard_id,
|
|
248
|
+
_request_auth,
|
|
249
|
+
_content_type,
|
|
250
|
+
_headers,
|
|
251
|
+
_host_index,
|
|
252
|
+
) -> RequestSerialized:
|
|
253
|
+
|
|
254
|
+
_host = None
|
|
255
|
+
|
|
256
|
+
_collection_formats: Dict[str, str] = {
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
_path_params: Dict[str, str] = {}
|
|
260
|
+
_query_params: List[Tuple[str, str]] = []
|
|
261
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
262
|
+
_form_params: List[Tuple[str, str]] = []
|
|
263
|
+
_files: Dict[
|
|
264
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
265
|
+
] = {}
|
|
266
|
+
_body_params: Optional[bytes] = None
|
|
267
|
+
|
|
268
|
+
# process the path parameters
|
|
269
|
+
if leaderboard_id is not None:
|
|
270
|
+
_path_params['leaderboardId'] = leaderboard_id
|
|
271
|
+
# process the query parameters
|
|
272
|
+
# process the header parameters
|
|
273
|
+
# process the form parameters
|
|
274
|
+
# process the body parameter
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
# set the HTTP header `Accept`
|
|
278
|
+
if 'Accept' not in _header_params:
|
|
279
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
280
|
+
[
|
|
281
|
+
'text/plain',
|
|
282
|
+
'application/json',
|
|
283
|
+
'text/json'
|
|
284
|
+
]
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
# authentication setting
|
|
289
|
+
_auth_settings: List[str] = [
|
|
290
|
+
'bearer',
|
|
291
|
+
'oauth2'
|
|
292
|
+
]
|
|
293
|
+
|
|
294
|
+
return self.api_client.param_serialize(
|
|
295
|
+
method='GET',
|
|
296
|
+
resource_path='/leaderboard/{leaderboardId}',
|
|
297
|
+
path_params=_path_params,
|
|
298
|
+
query_params=_query_params,
|
|
299
|
+
header_params=_header_params,
|
|
300
|
+
body=_body_params,
|
|
301
|
+
post_params=_form_params,
|
|
302
|
+
files=_files,
|
|
303
|
+
auth_settings=_auth_settings,
|
|
304
|
+
collection_formats=_collection_formats,
|
|
305
|
+
_host=_host,
|
|
306
|
+
_request_auth=_request_auth
|
|
307
|
+
)
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
@validate_call
|
|
313
|
+
def leaderboard_leaderboard_id_participants_get(
|
|
314
|
+
self,
|
|
315
|
+
leaderboard_id: StrictStr,
|
|
316
|
+
request: Optional[QueryModel] = None,
|
|
317
|
+
_request_timeout: Union[
|
|
318
|
+
None,
|
|
319
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
320
|
+
Tuple[
|
|
321
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
322
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
323
|
+
]
|
|
324
|
+
] = None,
|
|
325
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
326
|
+
_content_type: Optional[StrictStr] = None,
|
|
327
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
328
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
329
|
+
) -> ParticipantByLeaderboardPagedResult:
|
|
330
|
+
"""queries all the participants of a leaderboard by its Id.
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
:param leaderboard_id: (required)
|
|
334
|
+
:type leaderboard_id: str
|
|
335
|
+
:param request:
|
|
336
|
+
:type request: QueryModel
|
|
337
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
338
|
+
number provided, it will be total request
|
|
339
|
+
timeout. It can also be a pair (tuple) of
|
|
340
|
+
(connection, read) timeouts.
|
|
341
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
342
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
343
|
+
request; this effectively ignores the
|
|
344
|
+
authentication in the spec for a single request.
|
|
345
|
+
:type _request_auth: dict, optional
|
|
346
|
+
:param _content_type: force content-type for the request.
|
|
347
|
+
:type _content_type: str, Optional
|
|
348
|
+
:param _headers: set to override the headers for a single
|
|
349
|
+
request; this effectively ignores the headers
|
|
350
|
+
in the spec for a single request.
|
|
351
|
+
:type _headers: dict, optional
|
|
352
|
+
:param _host_index: set to override the host_index for a single
|
|
353
|
+
request; this effectively ignores the host_index
|
|
354
|
+
in the spec for a single request.
|
|
355
|
+
:type _host_index: int, optional
|
|
356
|
+
:return: Returns the result object.
|
|
357
|
+
""" # noqa: E501
|
|
358
|
+
|
|
359
|
+
_param = self._leaderboard_leaderboard_id_participants_get_serialize(
|
|
360
|
+
leaderboard_id=leaderboard_id,
|
|
361
|
+
request=request,
|
|
362
|
+
_request_auth=_request_auth,
|
|
363
|
+
_content_type=_content_type,
|
|
364
|
+
_headers=_headers,
|
|
365
|
+
_host_index=_host_index
|
|
366
|
+
)
|
|
367
|
+
|
|
368
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
369
|
+
'200': "ParticipantByLeaderboardPagedResult",
|
|
370
|
+
}
|
|
371
|
+
response_data = self.api_client.call_api(
|
|
372
|
+
*_param,
|
|
373
|
+
_request_timeout=_request_timeout
|
|
374
|
+
)
|
|
375
|
+
response_data.read()
|
|
376
|
+
return self.api_client.response_deserialize(
|
|
377
|
+
response_data=response_data,
|
|
378
|
+
response_types_map=_response_types_map,
|
|
379
|
+
).data
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
@validate_call
|
|
383
|
+
def leaderboard_leaderboard_id_participants_get_with_http_info(
|
|
384
|
+
self,
|
|
385
|
+
leaderboard_id: StrictStr,
|
|
386
|
+
request: Optional[QueryModel] = None,
|
|
387
|
+
_request_timeout: Union[
|
|
388
|
+
None,
|
|
389
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
390
|
+
Tuple[
|
|
391
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
392
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
393
|
+
]
|
|
394
|
+
] = None,
|
|
395
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
396
|
+
_content_type: Optional[StrictStr] = None,
|
|
397
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
398
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
399
|
+
) -> ApiResponse[ParticipantByLeaderboardPagedResult]:
|
|
400
|
+
"""queries all the participants of a leaderboard by its Id.
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
:param leaderboard_id: (required)
|
|
404
|
+
:type leaderboard_id: str
|
|
405
|
+
:param request:
|
|
406
|
+
:type request: QueryModel
|
|
407
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
408
|
+
number provided, it will be total request
|
|
409
|
+
timeout. It can also be a pair (tuple) of
|
|
410
|
+
(connection, read) timeouts.
|
|
411
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
412
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
413
|
+
request; this effectively ignores the
|
|
414
|
+
authentication in the spec for a single request.
|
|
415
|
+
:type _request_auth: dict, optional
|
|
416
|
+
:param _content_type: force content-type for the request.
|
|
417
|
+
:type _content_type: str, Optional
|
|
418
|
+
:param _headers: set to override the headers for a single
|
|
419
|
+
request; this effectively ignores the headers
|
|
420
|
+
in the spec for a single request.
|
|
421
|
+
:type _headers: dict, optional
|
|
422
|
+
:param _host_index: set to override the host_index for a single
|
|
423
|
+
request; this effectively ignores the host_index
|
|
424
|
+
in the spec for a single request.
|
|
425
|
+
:type _host_index: int, optional
|
|
426
|
+
:return: Returns the result object.
|
|
427
|
+
""" # noqa: E501
|
|
428
|
+
|
|
429
|
+
_param = self._leaderboard_leaderboard_id_participants_get_serialize(
|
|
430
|
+
leaderboard_id=leaderboard_id,
|
|
431
|
+
request=request,
|
|
432
|
+
_request_auth=_request_auth,
|
|
433
|
+
_content_type=_content_type,
|
|
434
|
+
_headers=_headers,
|
|
435
|
+
_host_index=_host_index
|
|
436
|
+
)
|
|
437
|
+
|
|
438
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
439
|
+
'200': "ParticipantByLeaderboardPagedResult",
|
|
440
|
+
}
|
|
441
|
+
response_data = self.api_client.call_api(
|
|
442
|
+
*_param,
|
|
443
|
+
_request_timeout=_request_timeout
|
|
444
|
+
)
|
|
445
|
+
response_data.read()
|
|
446
|
+
return self.api_client.response_deserialize(
|
|
447
|
+
response_data=response_data,
|
|
448
|
+
response_types_map=_response_types_map,
|
|
449
|
+
)
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
@validate_call
|
|
453
|
+
def leaderboard_leaderboard_id_participants_get_without_preload_content(
|
|
454
|
+
self,
|
|
455
|
+
leaderboard_id: StrictStr,
|
|
456
|
+
request: Optional[QueryModel] = None,
|
|
457
|
+
_request_timeout: Union[
|
|
458
|
+
None,
|
|
459
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
460
|
+
Tuple[
|
|
461
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
462
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
463
|
+
]
|
|
464
|
+
] = None,
|
|
465
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
466
|
+
_content_type: Optional[StrictStr] = None,
|
|
467
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
468
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
469
|
+
) -> RESTResponseType:
|
|
470
|
+
"""queries all the participants of a leaderboard by its Id.
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
:param leaderboard_id: (required)
|
|
474
|
+
:type leaderboard_id: str
|
|
475
|
+
:param request:
|
|
476
|
+
:type request: QueryModel
|
|
477
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
478
|
+
number provided, it will be total request
|
|
479
|
+
timeout. It can also be a pair (tuple) of
|
|
480
|
+
(connection, read) timeouts.
|
|
481
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
482
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
483
|
+
request; this effectively ignores the
|
|
484
|
+
authentication in the spec for a single request.
|
|
485
|
+
:type _request_auth: dict, optional
|
|
486
|
+
:param _content_type: force content-type for the request.
|
|
487
|
+
:type _content_type: str, Optional
|
|
488
|
+
:param _headers: set to override the headers for a single
|
|
489
|
+
request; this effectively ignores the headers
|
|
490
|
+
in the spec for a single request.
|
|
491
|
+
:type _headers: dict, optional
|
|
492
|
+
:param _host_index: set to override the host_index for a single
|
|
493
|
+
request; this effectively ignores the host_index
|
|
494
|
+
in the spec for a single request.
|
|
495
|
+
:type _host_index: int, optional
|
|
496
|
+
:return: Returns the result object.
|
|
497
|
+
""" # noqa: E501
|
|
498
|
+
|
|
499
|
+
_param = self._leaderboard_leaderboard_id_participants_get_serialize(
|
|
500
|
+
leaderboard_id=leaderboard_id,
|
|
501
|
+
request=request,
|
|
502
|
+
_request_auth=_request_auth,
|
|
503
|
+
_content_type=_content_type,
|
|
504
|
+
_headers=_headers,
|
|
505
|
+
_host_index=_host_index
|
|
506
|
+
)
|
|
507
|
+
|
|
508
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
509
|
+
'200': "ParticipantByLeaderboardPagedResult",
|
|
510
|
+
}
|
|
511
|
+
response_data = self.api_client.call_api(
|
|
512
|
+
*_param,
|
|
513
|
+
_request_timeout=_request_timeout
|
|
514
|
+
)
|
|
515
|
+
return response_data.response
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
def _leaderboard_leaderboard_id_participants_get_serialize(
|
|
519
|
+
self,
|
|
520
|
+
leaderboard_id,
|
|
521
|
+
request,
|
|
522
|
+
_request_auth,
|
|
523
|
+
_content_type,
|
|
524
|
+
_headers,
|
|
525
|
+
_host_index,
|
|
526
|
+
) -> RequestSerialized:
|
|
527
|
+
|
|
528
|
+
_host = None
|
|
529
|
+
|
|
530
|
+
_collection_formats: Dict[str, str] = {
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
_path_params: Dict[str, str] = {}
|
|
534
|
+
_query_params: List[Tuple[str, str]] = []
|
|
535
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
536
|
+
_form_params: List[Tuple[str, str]] = []
|
|
537
|
+
_files: Dict[
|
|
538
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
539
|
+
] = {}
|
|
540
|
+
_body_params: Optional[bytes] = None
|
|
541
|
+
|
|
542
|
+
# process the path parameters
|
|
543
|
+
if leaderboard_id is not None:
|
|
544
|
+
_path_params['leaderboardId'] = leaderboard_id
|
|
545
|
+
# process the query parameters
|
|
546
|
+
if request is not None:
|
|
547
|
+
|
|
548
|
+
_query_params.append(('request', request))
|
|
549
|
+
|
|
550
|
+
# process the header parameters
|
|
551
|
+
# process the form parameters
|
|
552
|
+
# process the body parameter
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
# set the HTTP header `Accept`
|
|
556
|
+
if 'Accept' not in _header_params:
|
|
557
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
558
|
+
[
|
|
559
|
+
'text/plain',
|
|
560
|
+
'application/json',
|
|
561
|
+
'text/json'
|
|
562
|
+
]
|
|
563
|
+
)
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
# authentication setting
|
|
567
|
+
_auth_settings: List[str] = [
|
|
568
|
+
'bearer',
|
|
569
|
+
'oauth2'
|
|
570
|
+
]
|
|
571
|
+
|
|
572
|
+
return self.api_client.param_serialize(
|
|
573
|
+
method='GET',
|
|
574
|
+
resource_path='/leaderboard/{leaderboardId}/participants',
|
|
575
|
+
path_params=_path_params,
|
|
576
|
+
query_params=_query_params,
|
|
577
|
+
header_params=_header_params,
|
|
578
|
+
body=_body_params,
|
|
579
|
+
post_params=_form_params,
|
|
580
|
+
files=_files,
|
|
581
|
+
auth_settings=_auth_settings,
|
|
582
|
+
collection_formats=_collection_formats,
|
|
583
|
+
_host=_host,
|
|
584
|
+
_request_auth=_request_auth
|
|
585
|
+
)
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
@validate_call
|
|
591
|
+
def leaderboard_leaderboard_id_participants_participant_id_submit_post(
|
|
592
|
+
self,
|
|
593
|
+
leaderboard_id: StrictStr,
|
|
594
|
+
participant_id: StrictStr,
|
|
595
|
+
_request_timeout: Union[
|
|
596
|
+
None,
|
|
597
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
598
|
+
Tuple[
|
|
599
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
600
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
601
|
+
]
|
|
602
|
+
] = None,
|
|
603
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
604
|
+
_content_type: Optional[StrictStr] = None,
|
|
605
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
606
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
607
|
+
) -> None:
|
|
608
|
+
"""Submits a participant to a leaderboard.
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
:param leaderboard_id: (required)
|
|
612
|
+
:type leaderboard_id: str
|
|
613
|
+
:param participant_id: (required)
|
|
614
|
+
:type participant_id: str
|
|
615
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
616
|
+
number provided, it will be total request
|
|
617
|
+
timeout. It can also be a pair (tuple) of
|
|
618
|
+
(connection, read) timeouts.
|
|
619
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
620
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
621
|
+
request; this effectively ignores the
|
|
622
|
+
authentication in the spec for a single request.
|
|
623
|
+
:type _request_auth: dict, optional
|
|
624
|
+
:param _content_type: force content-type for the request.
|
|
625
|
+
:type _content_type: str, Optional
|
|
626
|
+
:param _headers: set to override the headers for a single
|
|
627
|
+
request; this effectively ignores the headers
|
|
628
|
+
in the spec for a single request.
|
|
629
|
+
:type _headers: dict, optional
|
|
630
|
+
:param _host_index: set to override the host_index for a single
|
|
631
|
+
request; this effectively ignores the host_index
|
|
632
|
+
in the spec for a single request.
|
|
633
|
+
:type _host_index: int, optional
|
|
634
|
+
:return: Returns the result object.
|
|
635
|
+
""" # noqa: E501
|
|
636
|
+
|
|
637
|
+
_param = self._leaderboard_leaderboard_id_participants_participant_id_submit_post_serialize(
|
|
638
|
+
leaderboard_id=leaderboard_id,
|
|
639
|
+
participant_id=participant_id,
|
|
640
|
+
_request_auth=_request_auth,
|
|
641
|
+
_content_type=_content_type,
|
|
642
|
+
_headers=_headers,
|
|
643
|
+
_host_index=_host_index
|
|
644
|
+
)
|
|
645
|
+
|
|
646
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
647
|
+
'204': None,
|
|
648
|
+
}
|
|
649
|
+
response_data = self.api_client.call_api(
|
|
650
|
+
*_param,
|
|
651
|
+
_request_timeout=_request_timeout
|
|
652
|
+
)
|
|
653
|
+
response_data.read()
|
|
654
|
+
return self.api_client.response_deserialize(
|
|
655
|
+
response_data=response_data,
|
|
656
|
+
response_types_map=_response_types_map,
|
|
657
|
+
).data
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
@validate_call
|
|
661
|
+
def leaderboard_leaderboard_id_participants_participant_id_submit_post_with_http_info(
|
|
662
|
+
self,
|
|
663
|
+
leaderboard_id: StrictStr,
|
|
664
|
+
participant_id: StrictStr,
|
|
665
|
+
_request_timeout: Union[
|
|
666
|
+
None,
|
|
667
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
668
|
+
Tuple[
|
|
669
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
670
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
671
|
+
]
|
|
672
|
+
] = None,
|
|
673
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
674
|
+
_content_type: Optional[StrictStr] = None,
|
|
675
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
676
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
677
|
+
) -> ApiResponse[None]:
|
|
678
|
+
"""Submits a participant to a leaderboard.
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
:param leaderboard_id: (required)
|
|
682
|
+
:type leaderboard_id: str
|
|
683
|
+
:param participant_id: (required)
|
|
684
|
+
:type participant_id: str
|
|
685
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
686
|
+
number provided, it will be total request
|
|
687
|
+
timeout. It can also be a pair (tuple) of
|
|
688
|
+
(connection, read) timeouts.
|
|
689
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
690
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
691
|
+
request; this effectively ignores the
|
|
692
|
+
authentication in the spec for a single request.
|
|
693
|
+
:type _request_auth: dict, optional
|
|
694
|
+
:param _content_type: force content-type for the request.
|
|
695
|
+
:type _content_type: str, Optional
|
|
696
|
+
:param _headers: set to override the headers for a single
|
|
697
|
+
request; this effectively ignores the headers
|
|
698
|
+
in the spec for a single request.
|
|
699
|
+
:type _headers: dict, optional
|
|
700
|
+
:param _host_index: set to override the host_index for a single
|
|
701
|
+
request; this effectively ignores the host_index
|
|
702
|
+
in the spec for a single request.
|
|
703
|
+
:type _host_index: int, optional
|
|
704
|
+
:return: Returns the result object.
|
|
705
|
+
""" # noqa: E501
|
|
706
|
+
|
|
707
|
+
_param = self._leaderboard_leaderboard_id_participants_participant_id_submit_post_serialize(
|
|
708
|
+
leaderboard_id=leaderboard_id,
|
|
709
|
+
participant_id=participant_id,
|
|
710
|
+
_request_auth=_request_auth,
|
|
711
|
+
_content_type=_content_type,
|
|
712
|
+
_headers=_headers,
|
|
713
|
+
_host_index=_host_index
|
|
714
|
+
)
|
|
715
|
+
|
|
716
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
717
|
+
'204': None,
|
|
718
|
+
}
|
|
719
|
+
response_data = self.api_client.call_api(
|
|
720
|
+
*_param,
|
|
721
|
+
_request_timeout=_request_timeout
|
|
722
|
+
)
|
|
723
|
+
response_data.read()
|
|
724
|
+
return self.api_client.response_deserialize(
|
|
725
|
+
response_data=response_data,
|
|
726
|
+
response_types_map=_response_types_map,
|
|
727
|
+
)
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
@validate_call
|
|
731
|
+
def leaderboard_leaderboard_id_participants_participant_id_submit_post_without_preload_content(
|
|
732
|
+
self,
|
|
733
|
+
leaderboard_id: StrictStr,
|
|
734
|
+
participant_id: StrictStr,
|
|
735
|
+
_request_timeout: Union[
|
|
736
|
+
None,
|
|
737
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
738
|
+
Tuple[
|
|
739
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
740
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
741
|
+
]
|
|
742
|
+
] = None,
|
|
743
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
744
|
+
_content_type: Optional[StrictStr] = None,
|
|
745
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
746
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
747
|
+
) -> RESTResponseType:
|
|
748
|
+
"""Submits a participant to a leaderboard.
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
:param leaderboard_id: (required)
|
|
752
|
+
:type leaderboard_id: str
|
|
753
|
+
:param participant_id: (required)
|
|
754
|
+
:type participant_id: str
|
|
755
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
756
|
+
number provided, it will be total request
|
|
757
|
+
timeout. It can also be a pair (tuple) of
|
|
758
|
+
(connection, read) timeouts.
|
|
759
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
760
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
761
|
+
request; this effectively ignores the
|
|
762
|
+
authentication in the spec for a single request.
|
|
763
|
+
:type _request_auth: dict, optional
|
|
764
|
+
:param _content_type: force content-type for the request.
|
|
765
|
+
:type _content_type: str, Optional
|
|
766
|
+
:param _headers: set to override the headers for a single
|
|
767
|
+
request; this effectively ignores the headers
|
|
768
|
+
in the spec for a single request.
|
|
769
|
+
:type _headers: dict, optional
|
|
770
|
+
:param _host_index: set to override the host_index for a single
|
|
771
|
+
request; this effectively ignores the host_index
|
|
772
|
+
in the spec for a single request.
|
|
773
|
+
:type _host_index: int, optional
|
|
774
|
+
:return: Returns the result object.
|
|
775
|
+
""" # noqa: E501
|
|
776
|
+
|
|
777
|
+
_param = self._leaderboard_leaderboard_id_participants_participant_id_submit_post_serialize(
|
|
778
|
+
leaderboard_id=leaderboard_id,
|
|
779
|
+
participant_id=participant_id,
|
|
780
|
+
_request_auth=_request_auth,
|
|
781
|
+
_content_type=_content_type,
|
|
782
|
+
_headers=_headers,
|
|
783
|
+
_host_index=_host_index
|
|
784
|
+
)
|
|
785
|
+
|
|
786
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
787
|
+
'204': None,
|
|
788
|
+
}
|
|
789
|
+
response_data = self.api_client.call_api(
|
|
790
|
+
*_param,
|
|
791
|
+
_request_timeout=_request_timeout
|
|
792
|
+
)
|
|
793
|
+
return response_data.response
|
|
794
|
+
|
|
795
|
+
|
|
796
|
+
def _leaderboard_leaderboard_id_participants_participant_id_submit_post_serialize(
|
|
797
|
+
self,
|
|
798
|
+
leaderboard_id,
|
|
799
|
+
participant_id,
|
|
800
|
+
_request_auth,
|
|
801
|
+
_content_type,
|
|
802
|
+
_headers,
|
|
803
|
+
_host_index,
|
|
804
|
+
) -> RequestSerialized:
|
|
805
|
+
|
|
806
|
+
_host = None
|
|
807
|
+
|
|
808
|
+
_collection_formats: Dict[str, str] = {
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
_path_params: Dict[str, str] = {}
|
|
812
|
+
_query_params: List[Tuple[str, str]] = []
|
|
813
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
814
|
+
_form_params: List[Tuple[str, str]] = []
|
|
815
|
+
_files: Dict[
|
|
816
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
817
|
+
] = {}
|
|
818
|
+
_body_params: Optional[bytes] = None
|
|
819
|
+
|
|
820
|
+
# process the path parameters
|
|
821
|
+
if leaderboard_id is not None:
|
|
822
|
+
_path_params['leaderboardId'] = leaderboard_id
|
|
823
|
+
if participant_id is not None:
|
|
824
|
+
_path_params['participantId'] = participant_id
|
|
825
|
+
# process the query parameters
|
|
826
|
+
# process the header parameters
|
|
827
|
+
# process the form parameters
|
|
828
|
+
# process the body parameter
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
# authentication setting
|
|
834
|
+
_auth_settings: List[str] = [
|
|
835
|
+
'bearer',
|
|
836
|
+
'oauth2'
|
|
837
|
+
]
|
|
838
|
+
|
|
839
|
+
return self.api_client.param_serialize(
|
|
840
|
+
method='POST',
|
|
841
|
+
resource_path='/leaderboard/{leaderboardId}/participants/{participantId}/submit',
|
|
842
|
+
path_params=_path_params,
|
|
843
|
+
query_params=_query_params,
|
|
844
|
+
header_params=_header_params,
|
|
845
|
+
body=_body_params,
|
|
846
|
+
post_params=_form_params,
|
|
847
|
+
files=_files,
|
|
848
|
+
auth_settings=_auth_settings,
|
|
849
|
+
collection_formats=_collection_formats,
|
|
850
|
+
_host=_host,
|
|
851
|
+
_request_auth=_request_auth
|
|
852
|
+
)
|
|
853
|
+
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
@validate_call
|
|
858
|
+
def leaderboard_leaderboard_id_participants_post(
|
|
859
|
+
self,
|
|
860
|
+
leaderboard_id: StrictStr,
|
|
861
|
+
create_leaderboard_participant_model: Optional[CreateLeaderboardParticipantModel] = None,
|
|
862
|
+
_request_timeout: Union[
|
|
863
|
+
None,
|
|
864
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
865
|
+
Tuple[
|
|
866
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
867
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
868
|
+
]
|
|
869
|
+
] = None,
|
|
870
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
871
|
+
_content_type: Optional[StrictStr] = None,
|
|
872
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
873
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
874
|
+
) -> CreateLeaderboardParticipantResult:
|
|
875
|
+
"""Creates a participant in a leaderboard.
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
:param leaderboard_id: (required)
|
|
879
|
+
:type leaderboard_id: str
|
|
880
|
+
:param create_leaderboard_participant_model:
|
|
881
|
+
:type create_leaderboard_participant_model: CreateLeaderboardParticipantModel
|
|
882
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
883
|
+
number provided, it will be total request
|
|
884
|
+
timeout. It can also be a pair (tuple) of
|
|
885
|
+
(connection, read) timeouts.
|
|
886
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
887
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
888
|
+
request; this effectively ignores the
|
|
889
|
+
authentication in the spec for a single request.
|
|
890
|
+
:type _request_auth: dict, optional
|
|
891
|
+
:param _content_type: force content-type for the request.
|
|
892
|
+
:type _content_type: str, Optional
|
|
893
|
+
:param _headers: set to override the headers for a single
|
|
894
|
+
request; this effectively ignores the headers
|
|
895
|
+
in the spec for a single request.
|
|
896
|
+
:type _headers: dict, optional
|
|
897
|
+
:param _host_index: set to override the host_index for a single
|
|
898
|
+
request; this effectively ignores the host_index
|
|
899
|
+
in the spec for a single request.
|
|
900
|
+
:type _host_index: int, optional
|
|
901
|
+
:return: Returns the result object.
|
|
902
|
+
""" # noqa: E501
|
|
903
|
+
|
|
904
|
+
_param = self._leaderboard_leaderboard_id_participants_post_serialize(
|
|
905
|
+
leaderboard_id=leaderboard_id,
|
|
906
|
+
create_leaderboard_participant_model=create_leaderboard_participant_model,
|
|
907
|
+
_request_auth=_request_auth,
|
|
908
|
+
_content_type=_content_type,
|
|
909
|
+
_headers=_headers,
|
|
910
|
+
_host_index=_host_index
|
|
911
|
+
)
|
|
912
|
+
|
|
913
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
914
|
+
'200': "CreateLeaderboardParticipantResult",
|
|
915
|
+
}
|
|
916
|
+
response_data = self.api_client.call_api(
|
|
917
|
+
*_param,
|
|
918
|
+
_request_timeout=_request_timeout
|
|
919
|
+
)
|
|
920
|
+
response_data.read()
|
|
921
|
+
return self.api_client.response_deserialize(
|
|
922
|
+
response_data=response_data,
|
|
923
|
+
response_types_map=_response_types_map,
|
|
924
|
+
).data
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
@validate_call
|
|
928
|
+
def leaderboard_leaderboard_id_participants_post_with_http_info(
|
|
929
|
+
self,
|
|
930
|
+
leaderboard_id: StrictStr,
|
|
931
|
+
create_leaderboard_participant_model: Optional[CreateLeaderboardParticipantModel] = None,
|
|
932
|
+
_request_timeout: Union[
|
|
933
|
+
None,
|
|
934
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
935
|
+
Tuple[
|
|
936
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
937
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
938
|
+
]
|
|
939
|
+
] = None,
|
|
940
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
941
|
+
_content_type: Optional[StrictStr] = None,
|
|
942
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
943
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
944
|
+
) -> ApiResponse[CreateLeaderboardParticipantResult]:
|
|
945
|
+
"""Creates a participant in a leaderboard.
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
:param leaderboard_id: (required)
|
|
949
|
+
:type leaderboard_id: str
|
|
950
|
+
:param create_leaderboard_participant_model:
|
|
951
|
+
:type create_leaderboard_participant_model: CreateLeaderboardParticipantModel
|
|
952
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
953
|
+
number provided, it will be total request
|
|
954
|
+
timeout. It can also be a pair (tuple) of
|
|
955
|
+
(connection, read) timeouts.
|
|
956
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
957
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
958
|
+
request; this effectively ignores the
|
|
959
|
+
authentication in the spec for a single request.
|
|
960
|
+
:type _request_auth: dict, optional
|
|
961
|
+
:param _content_type: force content-type for the request.
|
|
962
|
+
:type _content_type: str, Optional
|
|
963
|
+
:param _headers: set to override the headers for a single
|
|
964
|
+
request; this effectively ignores the headers
|
|
965
|
+
in the spec for a single request.
|
|
966
|
+
:type _headers: dict, optional
|
|
967
|
+
:param _host_index: set to override the host_index for a single
|
|
968
|
+
request; this effectively ignores the host_index
|
|
969
|
+
in the spec for a single request.
|
|
970
|
+
:type _host_index: int, optional
|
|
971
|
+
:return: Returns the result object.
|
|
972
|
+
""" # noqa: E501
|
|
973
|
+
|
|
974
|
+
_param = self._leaderboard_leaderboard_id_participants_post_serialize(
|
|
975
|
+
leaderboard_id=leaderboard_id,
|
|
976
|
+
create_leaderboard_participant_model=create_leaderboard_participant_model,
|
|
977
|
+
_request_auth=_request_auth,
|
|
978
|
+
_content_type=_content_type,
|
|
979
|
+
_headers=_headers,
|
|
980
|
+
_host_index=_host_index
|
|
981
|
+
)
|
|
982
|
+
|
|
983
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
984
|
+
'200': "CreateLeaderboardParticipantResult",
|
|
985
|
+
}
|
|
986
|
+
response_data = self.api_client.call_api(
|
|
987
|
+
*_param,
|
|
988
|
+
_request_timeout=_request_timeout
|
|
989
|
+
)
|
|
990
|
+
response_data.read()
|
|
991
|
+
return self.api_client.response_deserialize(
|
|
992
|
+
response_data=response_data,
|
|
993
|
+
response_types_map=_response_types_map,
|
|
994
|
+
)
|
|
995
|
+
|
|
996
|
+
|
|
997
|
+
@validate_call
|
|
998
|
+
def leaderboard_leaderboard_id_participants_post_without_preload_content(
|
|
999
|
+
self,
|
|
1000
|
+
leaderboard_id: StrictStr,
|
|
1001
|
+
create_leaderboard_participant_model: Optional[CreateLeaderboardParticipantModel] = None,
|
|
1002
|
+
_request_timeout: Union[
|
|
1003
|
+
None,
|
|
1004
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1005
|
+
Tuple[
|
|
1006
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1007
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1008
|
+
]
|
|
1009
|
+
] = None,
|
|
1010
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1011
|
+
_content_type: Optional[StrictStr] = None,
|
|
1012
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1013
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1014
|
+
) -> RESTResponseType:
|
|
1015
|
+
"""Creates a participant in a leaderboard.
|
|
1016
|
+
|
|
1017
|
+
|
|
1018
|
+
:param leaderboard_id: (required)
|
|
1019
|
+
:type leaderboard_id: str
|
|
1020
|
+
:param create_leaderboard_participant_model:
|
|
1021
|
+
:type create_leaderboard_participant_model: CreateLeaderboardParticipantModel
|
|
1022
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1023
|
+
number provided, it will be total request
|
|
1024
|
+
timeout. It can also be a pair (tuple) of
|
|
1025
|
+
(connection, read) timeouts.
|
|
1026
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1027
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1028
|
+
request; this effectively ignores the
|
|
1029
|
+
authentication in the spec for a single request.
|
|
1030
|
+
:type _request_auth: dict, optional
|
|
1031
|
+
:param _content_type: force content-type for the request.
|
|
1032
|
+
:type _content_type: str, Optional
|
|
1033
|
+
:param _headers: set to override the headers for a single
|
|
1034
|
+
request; this effectively ignores the headers
|
|
1035
|
+
in the spec for a single request.
|
|
1036
|
+
:type _headers: dict, optional
|
|
1037
|
+
:param _host_index: set to override the host_index for a single
|
|
1038
|
+
request; this effectively ignores the host_index
|
|
1039
|
+
in the spec for a single request.
|
|
1040
|
+
:type _host_index: int, optional
|
|
1041
|
+
:return: Returns the result object.
|
|
1042
|
+
""" # noqa: E501
|
|
1043
|
+
|
|
1044
|
+
_param = self._leaderboard_leaderboard_id_participants_post_serialize(
|
|
1045
|
+
leaderboard_id=leaderboard_id,
|
|
1046
|
+
create_leaderboard_participant_model=create_leaderboard_participant_model,
|
|
1047
|
+
_request_auth=_request_auth,
|
|
1048
|
+
_content_type=_content_type,
|
|
1049
|
+
_headers=_headers,
|
|
1050
|
+
_host_index=_host_index
|
|
1051
|
+
)
|
|
1052
|
+
|
|
1053
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1054
|
+
'200': "CreateLeaderboardParticipantResult",
|
|
1055
|
+
}
|
|
1056
|
+
response_data = self.api_client.call_api(
|
|
1057
|
+
*_param,
|
|
1058
|
+
_request_timeout=_request_timeout
|
|
1059
|
+
)
|
|
1060
|
+
return response_data.response
|
|
1061
|
+
|
|
1062
|
+
|
|
1063
|
+
def _leaderboard_leaderboard_id_participants_post_serialize(
|
|
1064
|
+
self,
|
|
1065
|
+
leaderboard_id,
|
|
1066
|
+
create_leaderboard_participant_model,
|
|
1067
|
+
_request_auth,
|
|
1068
|
+
_content_type,
|
|
1069
|
+
_headers,
|
|
1070
|
+
_host_index,
|
|
1071
|
+
) -> RequestSerialized:
|
|
1072
|
+
|
|
1073
|
+
_host = None
|
|
1074
|
+
|
|
1075
|
+
_collection_formats: Dict[str, str] = {
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
_path_params: Dict[str, str] = {}
|
|
1079
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1080
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1081
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1082
|
+
_files: Dict[
|
|
1083
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1084
|
+
] = {}
|
|
1085
|
+
_body_params: Optional[bytes] = None
|
|
1086
|
+
|
|
1087
|
+
# process the path parameters
|
|
1088
|
+
if leaderboard_id is not None:
|
|
1089
|
+
_path_params['leaderboardId'] = leaderboard_id
|
|
1090
|
+
# process the query parameters
|
|
1091
|
+
# process the header parameters
|
|
1092
|
+
# process the form parameters
|
|
1093
|
+
# process the body parameter
|
|
1094
|
+
if create_leaderboard_participant_model is not None:
|
|
1095
|
+
_body_params = create_leaderboard_participant_model
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
# set the HTTP header `Accept`
|
|
1099
|
+
if 'Accept' not in _header_params:
|
|
1100
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1101
|
+
[
|
|
1102
|
+
'text/plain',
|
|
1103
|
+
'application/json',
|
|
1104
|
+
'text/json'
|
|
1105
|
+
]
|
|
1106
|
+
)
|
|
1107
|
+
|
|
1108
|
+
# set the HTTP header `Content-Type`
|
|
1109
|
+
if _content_type:
|
|
1110
|
+
_header_params['Content-Type'] = _content_type
|
|
1111
|
+
else:
|
|
1112
|
+
_default_content_type = (
|
|
1113
|
+
self.api_client.select_header_content_type(
|
|
1114
|
+
[
|
|
1115
|
+
'application/json',
|
|
1116
|
+
'text/json',
|
|
1117
|
+
'application/*+json'
|
|
1118
|
+
]
|
|
1119
|
+
)
|
|
1120
|
+
)
|
|
1121
|
+
if _default_content_type is not None:
|
|
1122
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1123
|
+
|
|
1124
|
+
# authentication setting
|
|
1125
|
+
_auth_settings: List[str] = [
|
|
1126
|
+
'bearer',
|
|
1127
|
+
'oauth2'
|
|
1128
|
+
]
|
|
1129
|
+
|
|
1130
|
+
return self.api_client.param_serialize(
|
|
1131
|
+
method='POST',
|
|
1132
|
+
resource_path='/leaderboard/{leaderboardId}/participants',
|
|
1133
|
+
path_params=_path_params,
|
|
1134
|
+
query_params=_query_params,
|
|
1135
|
+
header_params=_header_params,
|
|
1136
|
+
body=_body_params,
|
|
1137
|
+
post_params=_form_params,
|
|
1138
|
+
files=_files,
|
|
1139
|
+
auth_settings=_auth_settings,
|
|
1140
|
+
collection_formats=_collection_formats,
|
|
1141
|
+
_host=_host,
|
|
1142
|
+
_request_auth=_request_auth
|
|
1143
|
+
)
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
@validate_call
|
|
1149
|
+
def leaderboard_leaderboard_id_prompts_get(
|
|
1150
|
+
self,
|
|
1151
|
+
leaderboard_id: StrictStr,
|
|
1152
|
+
request: Optional[QueryModel] = None,
|
|
1153
|
+
_request_timeout: Union[
|
|
1154
|
+
None,
|
|
1155
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1156
|
+
Tuple[
|
|
1157
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1158
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1159
|
+
]
|
|
1160
|
+
] = None,
|
|
1161
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1162
|
+
_content_type: Optional[StrictStr] = None,
|
|
1163
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1164
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1165
|
+
) -> PromptByLeaderboardResultPagedResult:
|
|
1166
|
+
"""returns the paged prompts of a leaderboard by its Id.
|
|
1167
|
+
|
|
1168
|
+
|
|
1169
|
+
:param leaderboard_id: (required)
|
|
1170
|
+
:type leaderboard_id: str
|
|
1171
|
+
:param request:
|
|
1172
|
+
:type request: QueryModel
|
|
1173
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1174
|
+
number provided, it will be total request
|
|
1175
|
+
timeout. It can also be a pair (tuple) of
|
|
1176
|
+
(connection, read) timeouts.
|
|
1177
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1178
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1179
|
+
request; this effectively ignores the
|
|
1180
|
+
authentication in the spec for a single request.
|
|
1181
|
+
:type _request_auth: dict, optional
|
|
1182
|
+
:param _content_type: force content-type for the request.
|
|
1183
|
+
:type _content_type: str, Optional
|
|
1184
|
+
:param _headers: set to override the headers for a single
|
|
1185
|
+
request; this effectively ignores the headers
|
|
1186
|
+
in the spec for a single request.
|
|
1187
|
+
:type _headers: dict, optional
|
|
1188
|
+
:param _host_index: set to override the host_index for a single
|
|
1189
|
+
request; this effectively ignores the host_index
|
|
1190
|
+
in the spec for a single request.
|
|
1191
|
+
:type _host_index: int, optional
|
|
1192
|
+
:return: Returns the result object.
|
|
1193
|
+
""" # noqa: E501
|
|
1194
|
+
|
|
1195
|
+
_param = self._leaderboard_leaderboard_id_prompts_get_serialize(
|
|
1196
|
+
leaderboard_id=leaderboard_id,
|
|
1197
|
+
request=request,
|
|
1198
|
+
_request_auth=_request_auth,
|
|
1199
|
+
_content_type=_content_type,
|
|
1200
|
+
_headers=_headers,
|
|
1201
|
+
_host_index=_host_index
|
|
1202
|
+
)
|
|
1203
|
+
|
|
1204
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1205
|
+
'200': "PromptByLeaderboardResultPagedResult",
|
|
1206
|
+
}
|
|
1207
|
+
response_data = self.api_client.call_api(
|
|
1208
|
+
*_param,
|
|
1209
|
+
_request_timeout=_request_timeout
|
|
1210
|
+
)
|
|
1211
|
+
response_data.read()
|
|
1212
|
+
return self.api_client.response_deserialize(
|
|
1213
|
+
response_data=response_data,
|
|
1214
|
+
response_types_map=_response_types_map,
|
|
1215
|
+
).data
|
|
1216
|
+
|
|
1217
|
+
|
|
1218
|
+
@validate_call
|
|
1219
|
+
def leaderboard_leaderboard_id_prompts_get_with_http_info(
|
|
1220
|
+
self,
|
|
1221
|
+
leaderboard_id: StrictStr,
|
|
1222
|
+
request: Optional[QueryModel] = None,
|
|
1223
|
+
_request_timeout: Union[
|
|
1224
|
+
None,
|
|
1225
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1226
|
+
Tuple[
|
|
1227
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1228
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1229
|
+
]
|
|
1230
|
+
] = None,
|
|
1231
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1232
|
+
_content_type: Optional[StrictStr] = None,
|
|
1233
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1234
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1235
|
+
) -> ApiResponse[PromptByLeaderboardResultPagedResult]:
|
|
1236
|
+
"""returns the paged prompts of a leaderboard by its Id.
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
:param leaderboard_id: (required)
|
|
1240
|
+
:type leaderboard_id: str
|
|
1241
|
+
:param request:
|
|
1242
|
+
:type request: QueryModel
|
|
1243
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1244
|
+
number provided, it will be total request
|
|
1245
|
+
timeout. It can also be a pair (tuple) of
|
|
1246
|
+
(connection, read) timeouts.
|
|
1247
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1248
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1249
|
+
request; this effectively ignores the
|
|
1250
|
+
authentication in the spec for a single request.
|
|
1251
|
+
:type _request_auth: dict, optional
|
|
1252
|
+
:param _content_type: force content-type for the request.
|
|
1253
|
+
:type _content_type: str, Optional
|
|
1254
|
+
:param _headers: set to override the headers for a single
|
|
1255
|
+
request; this effectively ignores the headers
|
|
1256
|
+
in the spec for a single request.
|
|
1257
|
+
:type _headers: dict, optional
|
|
1258
|
+
:param _host_index: set to override the host_index for a single
|
|
1259
|
+
request; this effectively ignores the host_index
|
|
1260
|
+
in the spec for a single request.
|
|
1261
|
+
:type _host_index: int, optional
|
|
1262
|
+
:return: Returns the result object.
|
|
1263
|
+
""" # noqa: E501
|
|
1264
|
+
|
|
1265
|
+
_param = self._leaderboard_leaderboard_id_prompts_get_serialize(
|
|
1266
|
+
leaderboard_id=leaderboard_id,
|
|
1267
|
+
request=request,
|
|
1268
|
+
_request_auth=_request_auth,
|
|
1269
|
+
_content_type=_content_type,
|
|
1270
|
+
_headers=_headers,
|
|
1271
|
+
_host_index=_host_index
|
|
1272
|
+
)
|
|
1273
|
+
|
|
1274
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1275
|
+
'200': "PromptByLeaderboardResultPagedResult",
|
|
1276
|
+
}
|
|
1277
|
+
response_data = self.api_client.call_api(
|
|
1278
|
+
*_param,
|
|
1279
|
+
_request_timeout=_request_timeout
|
|
1280
|
+
)
|
|
1281
|
+
response_data.read()
|
|
1282
|
+
return self.api_client.response_deserialize(
|
|
1283
|
+
response_data=response_data,
|
|
1284
|
+
response_types_map=_response_types_map,
|
|
1285
|
+
)
|
|
1286
|
+
|
|
1287
|
+
|
|
1288
|
+
@validate_call
|
|
1289
|
+
def leaderboard_leaderboard_id_prompts_get_without_preload_content(
|
|
1290
|
+
self,
|
|
1291
|
+
leaderboard_id: StrictStr,
|
|
1292
|
+
request: Optional[QueryModel] = None,
|
|
1293
|
+
_request_timeout: Union[
|
|
1294
|
+
None,
|
|
1295
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1296
|
+
Tuple[
|
|
1297
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1298
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1299
|
+
]
|
|
1300
|
+
] = None,
|
|
1301
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1302
|
+
_content_type: Optional[StrictStr] = None,
|
|
1303
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1304
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1305
|
+
) -> RESTResponseType:
|
|
1306
|
+
"""returns the paged prompts of a leaderboard by its Id.
|
|
1307
|
+
|
|
1308
|
+
|
|
1309
|
+
:param leaderboard_id: (required)
|
|
1310
|
+
:type leaderboard_id: str
|
|
1311
|
+
:param request:
|
|
1312
|
+
:type request: QueryModel
|
|
1313
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1314
|
+
number provided, it will be total request
|
|
1315
|
+
timeout. It can also be a pair (tuple) of
|
|
1316
|
+
(connection, read) timeouts.
|
|
1317
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1318
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1319
|
+
request; this effectively ignores the
|
|
1320
|
+
authentication in the spec for a single request.
|
|
1321
|
+
:type _request_auth: dict, optional
|
|
1322
|
+
:param _content_type: force content-type for the request.
|
|
1323
|
+
:type _content_type: str, Optional
|
|
1324
|
+
:param _headers: set to override the headers for a single
|
|
1325
|
+
request; this effectively ignores the headers
|
|
1326
|
+
in the spec for a single request.
|
|
1327
|
+
:type _headers: dict, optional
|
|
1328
|
+
:param _host_index: set to override the host_index for a single
|
|
1329
|
+
request; this effectively ignores the host_index
|
|
1330
|
+
in the spec for a single request.
|
|
1331
|
+
:type _host_index: int, optional
|
|
1332
|
+
:return: Returns the result object.
|
|
1333
|
+
""" # noqa: E501
|
|
1334
|
+
|
|
1335
|
+
_param = self._leaderboard_leaderboard_id_prompts_get_serialize(
|
|
1336
|
+
leaderboard_id=leaderboard_id,
|
|
1337
|
+
request=request,
|
|
1338
|
+
_request_auth=_request_auth,
|
|
1339
|
+
_content_type=_content_type,
|
|
1340
|
+
_headers=_headers,
|
|
1341
|
+
_host_index=_host_index
|
|
1342
|
+
)
|
|
1343
|
+
|
|
1344
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1345
|
+
'200': "PromptByLeaderboardResultPagedResult",
|
|
1346
|
+
}
|
|
1347
|
+
response_data = self.api_client.call_api(
|
|
1348
|
+
*_param,
|
|
1349
|
+
_request_timeout=_request_timeout
|
|
1350
|
+
)
|
|
1351
|
+
return response_data.response
|
|
1352
|
+
|
|
1353
|
+
|
|
1354
|
+
def _leaderboard_leaderboard_id_prompts_get_serialize(
|
|
1355
|
+
self,
|
|
1356
|
+
leaderboard_id,
|
|
1357
|
+
request,
|
|
1358
|
+
_request_auth,
|
|
1359
|
+
_content_type,
|
|
1360
|
+
_headers,
|
|
1361
|
+
_host_index,
|
|
1362
|
+
) -> RequestSerialized:
|
|
1363
|
+
|
|
1364
|
+
_host = None
|
|
1365
|
+
|
|
1366
|
+
_collection_formats: Dict[str, str] = {
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
_path_params: Dict[str, str] = {}
|
|
1370
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1371
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1372
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1373
|
+
_files: Dict[
|
|
1374
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1375
|
+
] = {}
|
|
1376
|
+
_body_params: Optional[bytes] = None
|
|
1377
|
+
|
|
1378
|
+
# process the path parameters
|
|
1379
|
+
if leaderboard_id is not None:
|
|
1380
|
+
_path_params['leaderboardId'] = leaderboard_id
|
|
1381
|
+
# process the query parameters
|
|
1382
|
+
if request is not None:
|
|
1383
|
+
|
|
1384
|
+
_query_params.append(('request', request))
|
|
1385
|
+
|
|
1386
|
+
# process the header parameters
|
|
1387
|
+
# process the form parameters
|
|
1388
|
+
# process the body parameter
|
|
1389
|
+
|
|
1390
|
+
|
|
1391
|
+
# set the HTTP header `Accept`
|
|
1392
|
+
if 'Accept' not in _header_params:
|
|
1393
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1394
|
+
[
|
|
1395
|
+
'text/plain',
|
|
1396
|
+
'application/json',
|
|
1397
|
+
'text/json'
|
|
1398
|
+
]
|
|
1399
|
+
)
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
# authentication setting
|
|
1403
|
+
_auth_settings: List[str] = [
|
|
1404
|
+
'bearer',
|
|
1405
|
+
'oauth2'
|
|
1406
|
+
]
|
|
1407
|
+
|
|
1408
|
+
return self.api_client.param_serialize(
|
|
1409
|
+
method='GET',
|
|
1410
|
+
resource_path='/leaderboard/{leaderboardId}/prompts',
|
|
1411
|
+
path_params=_path_params,
|
|
1412
|
+
query_params=_query_params,
|
|
1413
|
+
header_params=_header_params,
|
|
1414
|
+
body=_body_params,
|
|
1415
|
+
post_params=_form_params,
|
|
1416
|
+
files=_files,
|
|
1417
|
+
auth_settings=_auth_settings,
|
|
1418
|
+
collection_formats=_collection_formats,
|
|
1419
|
+
_host=_host,
|
|
1420
|
+
_request_auth=_request_auth
|
|
1421
|
+
)
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
|
|
1425
|
+
|
|
1426
|
+
@validate_call
|
|
1427
|
+
def leaderboard_leaderboard_id_prompts_post(
|
|
1428
|
+
self,
|
|
1429
|
+
leaderboard_id: Annotated[StrictStr, Field(description="The leaderboard id.")],
|
|
1430
|
+
body: Annotated[Optional[StrictStr], Field(description="The prompt")] = None,
|
|
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
|
+
) -> None:
|
|
1444
|
+
"""adds a new prompt to a leaderboard.
|
|
1445
|
+
|
|
1446
|
+
|
|
1447
|
+
:param leaderboard_id: The leaderboard id. (required)
|
|
1448
|
+
:type leaderboard_id: str
|
|
1449
|
+
:param body: The prompt
|
|
1450
|
+
:type body: str
|
|
1451
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1452
|
+
number provided, it will be total request
|
|
1453
|
+
timeout. It can also be a pair (tuple) of
|
|
1454
|
+
(connection, read) timeouts.
|
|
1455
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1456
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1457
|
+
request; this effectively ignores the
|
|
1458
|
+
authentication in the spec for a single request.
|
|
1459
|
+
:type _request_auth: dict, optional
|
|
1460
|
+
:param _content_type: force content-type for the request.
|
|
1461
|
+
:type _content_type: str, Optional
|
|
1462
|
+
:param _headers: set to override the headers for a single
|
|
1463
|
+
request; this effectively ignores the headers
|
|
1464
|
+
in the spec for a single request.
|
|
1465
|
+
:type _headers: dict, optional
|
|
1466
|
+
:param _host_index: set to override the host_index for a single
|
|
1467
|
+
request; this effectively ignores the host_index
|
|
1468
|
+
in the spec for a single request.
|
|
1469
|
+
:type _host_index: int, optional
|
|
1470
|
+
:return: Returns the result object.
|
|
1471
|
+
""" # noqa: E501
|
|
1472
|
+
|
|
1473
|
+
_param = self._leaderboard_leaderboard_id_prompts_post_serialize(
|
|
1474
|
+
leaderboard_id=leaderboard_id,
|
|
1475
|
+
body=body,
|
|
1476
|
+
_request_auth=_request_auth,
|
|
1477
|
+
_content_type=_content_type,
|
|
1478
|
+
_headers=_headers,
|
|
1479
|
+
_host_index=_host_index
|
|
1480
|
+
)
|
|
1481
|
+
|
|
1482
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1483
|
+
'204': None,
|
|
1484
|
+
}
|
|
1485
|
+
response_data = self.api_client.call_api(
|
|
1486
|
+
*_param,
|
|
1487
|
+
_request_timeout=_request_timeout
|
|
1488
|
+
)
|
|
1489
|
+
response_data.read()
|
|
1490
|
+
return self.api_client.response_deserialize(
|
|
1491
|
+
response_data=response_data,
|
|
1492
|
+
response_types_map=_response_types_map,
|
|
1493
|
+
).data
|
|
1494
|
+
|
|
1495
|
+
|
|
1496
|
+
@validate_call
|
|
1497
|
+
def leaderboard_leaderboard_id_prompts_post_with_http_info(
|
|
1498
|
+
self,
|
|
1499
|
+
leaderboard_id: Annotated[StrictStr, Field(description="The leaderboard id.")],
|
|
1500
|
+
body: Annotated[Optional[StrictStr], Field(description="The prompt")] = None,
|
|
1501
|
+
_request_timeout: Union[
|
|
1502
|
+
None,
|
|
1503
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1504
|
+
Tuple[
|
|
1505
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1506
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1507
|
+
]
|
|
1508
|
+
] = None,
|
|
1509
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1510
|
+
_content_type: Optional[StrictStr] = None,
|
|
1511
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1512
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1513
|
+
) -> ApiResponse[None]:
|
|
1514
|
+
"""adds a new prompt to a leaderboard.
|
|
1515
|
+
|
|
1516
|
+
|
|
1517
|
+
:param leaderboard_id: The leaderboard id. (required)
|
|
1518
|
+
:type leaderboard_id: str
|
|
1519
|
+
:param body: The prompt
|
|
1520
|
+
:type body: str
|
|
1521
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1522
|
+
number provided, it will be total request
|
|
1523
|
+
timeout. It can also be a pair (tuple) of
|
|
1524
|
+
(connection, read) timeouts.
|
|
1525
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1526
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1527
|
+
request; this effectively ignores the
|
|
1528
|
+
authentication in the spec for a single request.
|
|
1529
|
+
:type _request_auth: dict, optional
|
|
1530
|
+
:param _content_type: force content-type for the request.
|
|
1531
|
+
:type _content_type: str, Optional
|
|
1532
|
+
:param _headers: set to override the headers for a single
|
|
1533
|
+
request; this effectively ignores the headers
|
|
1534
|
+
in the spec for a single request.
|
|
1535
|
+
:type _headers: dict, optional
|
|
1536
|
+
:param _host_index: set to override the host_index for a single
|
|
1537
|
+
request; this effectively ignores the host_index
|
|
1538
|
+
in the spec for a single request.
|
|
1539
|
+
:type _host_index: int, optional
|
|
1540
|
+
:return: Returns the result object.
|
|
1541
|
+
""" # noqa: E501
|
|
1542
|
+
|
|
1543
|
+
_param = self._leaderboard_leaderboard_id_prompts_post_serialize(
|
|
1544
|
+
leaderboard_id=leaderboard_id,
|
|
1545
|
+
body=body,
|
|
1546
|
+
_request_auth=_request_auth,
|
|
1547
|
+
_content_type=_content_type,
|
|
1548
|
+
_headers=_headers,
|
|
1549
|
+
_host_index=_host_index
|
|
1550
|
+
)
|
|
1551
|
+
|
|
1552
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1553
|
+
'204': None,
|
|
1554
|
+
}
|
|
1555
|
+
response_data = self.api_client.call_api(
|
|
1556
|
+
*_param,
|
|
1557
|
+
_request_timeout=_request_timeout
|
|
1558
|
+
)
|
|
1559
|
+
response_data.read()
|
|
1560
|
+
return self.api_client.response_deserialize(
|
|
1561
|
+
response_data=response_data,
|
|
1562
|
+
response_types_map=_response_types_map,
|
|
1563
|
+
)
|
|
1564
|
+
|
|
1565
|
+
|
|
1566
|
+
@validate_call
|
|
1567
|
+
def leaderboard_leaderboard_id_prompts_post_without_preload_content(
|
|
1568
|
+
self,
|
|
1569
|
+
leaderboard_id: Annotated[StrictStr, Field(description="The leaderboard id.")],
|
|
1570
|
+
body: Annotated[Optional[StrictStr], Field(description="The prompt")] = None,
|
|
1571
|
+
_request_timeout: Union[
|
|
1572
|
+
None,
|
|
1573
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1574
|
+
Tuple[
|
|
1575
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1576
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1577
|
+
]
|
|
1578
|
+
] = None,
|
|
1579
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1580
|
+
_content_type: Optional[StrictStr] = None,
|
|
1581
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1582
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1583
|
+
) -> RESTResponseType:
|
|
1584
|
+
"""adds a new prompt to a leaderboard.
|
|
1585
|
+
|
|
1586
|
+
|
|
1587
|
+
:param leaderboard_id: The leaderboard id. (required)
|
|
1588
|
+
:type leaderboard_id: str
|
|
1589
|
+
:param body: The prompt
|
|
1590
|
+
:type body: str
|
|
1591
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1592
|
+
number provided, it will be total request
|
|
1593
|
+
timeout. It can also be a pair (tuple) of
|
|
1594
|
+
(connection, read) timeouts.
|
|
1595
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1596
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1597
|
+
request; this effectively ignores the
|
|
1598
|
+
authentication in the spec for a single request.
|
|
1599
|
+
:type _request_auth: dict, optional
|
|
1600
|
+
:param _content_type: force content-type for the request.
|
|
1601
|
+
:type _content_type: str, Optional
|
|
1602
|
+
:param _headers: set to override the headers for a single
|
|
1603
|
+
request; this effectively ignores the headers
|
|
1604
|
+
in the spec for a single request.
|
|
1605
|
+
:type _headers: dict, optional
|
|
1606
|
+
:param _host_index: set to override the host_index for a single
|
|
1607
|
+
request; this effectively ignores the host_index
|
|
1608
|
+
in the spec for a single request.
|
|
1609
|
+
:type _host_index: int, optional
|
|
1610
|
+
:return: Returns the result object.
|
|
1611
|
+
""" # noqa: E501
|
|
1612
|
+
|
|
1613
|
+
_param = self._leaderboard_leaderboard_id_prompts_post_serialize(
|
|
1614
|
+
leaderboard_id=leaderboard_id,
|
|
1615
|
+
body=body,
|
|
1616
|
+
_request_auth=_request_auth,
|
|
1617
|
+
_content_type=_content_type,
|
|
1618
|
+
_headers=_headers,
|
|
1619
|
+
_host_index=_host_index
|
|
1620
|
+
)
|
|
1621
|
+
|
|
1622
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1623
|
+
'204': None,
|
|
1624
|
+
}
|
|
1625
|
+
response_data = self.api_client.call_api(
|
|
1626
|
+
*_param,
|
|
1627
|
+
_request_timeout=_request_timeout
|
|
1628
|
+
)
|
|
1629
|
+
return response_data.response
|
|
1630
|
+
|
|
1631
|
+
|
|
1632
|
+
def _leaderboard_leaderboard_id_prompts_post_serialize(
|
|
1633
|
+
self,
|
|
1634
|
+
leaderboard_id,
|
|
1635
|
+
body,
|
|
1636
|
+
_request_auth,
|
|
1637
|
+
_content_type,
|
|
1638
|
+
_headers,
|
|
1639
|
+
_host_index,
|
|
1640
|
+
) -> RequestSerialized:
|
|
1641
|
+
|
|
1642
|
+
_host = None
|
|
1643
|
+
|
|
1644
|
+
_collection_formats: Dict[str, str] = {
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
_path_params: Dict[str, str] = {}
|
|
1648
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1649
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1650
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1651
|
+
_files: Dict[
|
|
1652
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1653
|
+
] = {}
|
|
1654
|
+
_body_params: Optional[bytes] = None
|
|
1655
|
+
|
|
1656
|
+
# process the path parameters
|
|
1657
|
+
if leaderboard_id is not None:
|
|
1658
|
+
_path_params['leaderboardId'] = leaderboard_id
|
|
1659
|
+
# process the query parameters
|
|
1660
|
+
# process the header parameters
|
|
1661
|
+
# process the form parameters
|
|
1662
|
+
# process the body parameter
|
|
1663
|
+
if body is not None:
|
|
1664
|
+
_body_params = body
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
|
|
1668
|
+
# set the HTTP header `Content-Type`
|
|
1669
|
+
if _content_type:
|
|
1670
|
+
_header_params['Content-Type'] = _content_type
|
|
1671
|
+
else:
|
|
1672
|
+
_default_content_type = (
|
|
1673
|
+
self.api_client.select_header_content_type(
|
|
1674
|
+
[
|
|
1675
|
+
'application/json',
|
|
1676
|
+
'text/json',
|
|
1677
|
+
'application/*+json',
|
|
1678
|
+
'text/plain'
|
|
1679
|
+
]
|
|
1680
|
+
)
|
|
1681
|
+
)
|
|
1682
|
+
if _default_content_type is not None:
|
|
1683
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1684
|
+
|
|
1685
|
+
# authentication setting
|
|
1686
|
+
_auth_settings: List[str] = [
|
|
1687
|
+
'bearer',
|
|
1688
|
+
'oauth2'
|
|
1689
|
+
]
|
|
1690
|
+
|
|
1691
|
+
return self.api_client.param_serialize(
|
|
1692
|
+
method='POST',
|
|
1693
|
+
resource_path='/leaderboard/{leaderboardId}/prompts',
|
|
1694
|
+
path_params=_path_params,
|
|
1695
|
+
query_params=_query_params,
|
|
1696
|
+
header_params=_header_params,
|
|
1697
|
+
body=_body_params,
|
|
1698
|
+
post_params=_form_params,
|
|
1699
|
+
files=_files,
|
|
1700
|
+
auth_settings=_auth_settings,
|
|
1701
|
+
collection_formats=_collection_formats,
|
|
1702
|
+
_host=_host,
|
|
1703
|
+
_request_auth=_request_auth
|
|
1704
|
+
)
|
|
1705
|
+
|
|
1706
|
+
|
|
1707
|
+
|
|
1708
|
+
|
|
1709
|
+
@validate_call
|
|
1710
|
+
def leaderboard_participant_participant_id_get(
|
|
1711
|
+
self,
|
|
1712
|
+
participant_id: StrictStr,
|
|
1713
|
+
_request_timeout: Union[
|
|
1714
|
+
None,
|
|
1715
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1716
|
+
Tuple[
|
|
1717
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1718
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1719
|
+
]
|
|
1720
|
+
] = None,
|
|
1721
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1722
|
+
_content_type: Optional[StrictStr] = None,
|
|
1723
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1724
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1725
|
+
) -> GetParticipantByIdResult:
|
|
1726
|
+
"""Gets a participant by its ID.
|
|
1727
|
+
|
|
1728
|
+
|
|
1729
|
+
:param participant_id: (required)
|
|
1730
|
+
:type participant_id: str
|
|
1731
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1732
|
+
number provided, it will be total request
|
|
1733
|
+
timeout. It can also be a pair (tuple) of
|
|
1734
|
+
(connection, read) timeouts.
|
|
1735
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1736
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1737
|
+
request; this effectively ignores the
|
|
1738
|
+
authentication in the spec for a single request.
|
|
1739
|
+
:type _request_auth: dict, optional
|
|
1740
|
+
:param _content_type: force content-type for the request.
|
|
1741
|
+
:type _content_type: str, Optional
|
|
1742
|
+
:param _headers: set to override the headers for a single
|
|
1743
|
+
request; this effectively ignores the headers
|
|
1744
|
+
in the spec for a single request.
|
|
1745
|
+
:type _headers: dict, optional
|
|
1746
|
+
:param _host_index: set to override the host_index for a single
|
|
1747
|
+
request; this effectively ignores the host_index
|
|
1748
|
+
in the spec for a single request.
|
|
1749
|
+
:type _host_index: int, optional
|
|
1750
|
+
:return: Returns the result object.
|
|
1751
|
+
""" # noqa: E501
|
|
1752
|
+
|
|
1753
|
+
_param = self._leaderboard_participant_participant_id_get_serialize(
|
|
1754
|
+
participant_id=participant_id,
|
|
1755
|
+
_request_auth=_request_auth,
|
|
1756
|
+
_content_type=_content_type,
|
|
1757
|
+
_headers=_headers,
|
|
1758
|
+
_host_index=_host_index
|
|
1759
|
+
)
|
|
1760
|
+
|
|
1761
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1762
|
+
'200': "GetParticipantByIdResult",
|
|
1763
|
+
}
|
|
1764
|
+
response_data = self.api_client.call_api(
|
|
1765
|
+
*_param,
|
|
1766
|
+
_request_timeout=_request_timeout
|
|
1767
|
+
)
|
|
1768
|
+
response_data.read()
|
|
1769
|
+
return self.api_client.response_deserialize(
|
|
1770
|
+
response_data=response_data,
|
|
1771
|
+
response_types_map=_response_types_map,
|
|
1772
|
+
).data
|
|
1773
|
+
|
|
1774
|
+
|
|
1775
|
+
@validate_call
|
|
1776
|
+
def leaderboard_participant_participant_id_get_with_http_info(
|
|
1777
|
+
self,
|
|
1778
|
+
participant_id: StrictStr,
|
|
1779
|
+
_request_timeout: Union[
|
|
1780
|
+
None,
|
|
1781
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1782
|
+
Tuple[
|
|
1783
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1784
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1785
|
+
]
|
|
1786
|
+
] = None,
|
|
1787
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1788
|
+
_content_type: Optional[StrictStr] = None,
|
|
1789
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1790
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1791
|
+
) -> ApiResponse[GetParticipantByIdResult]:
|
|
1792
|
+
"""Gets a participant by its ID.
|
|
1793
|
+
|
|
1794
|
+
|
|
1795
|
+
:param participant_id: (required)
|
|
1796
|
+
:type participant_id: str
|
|
1797
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1798
|
+
number provided, it will be total request
|
|
1799
|
+
timeout. It can also be a pair (tuple) of
|
|
1800
|
+
(connection, read) timeouts.
|
|
1801
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1802
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1803
|
+
request; this effectively ignores the
|
|
1804
|
+
authentication in the spec for a single request.
|
|
1805
|
+
:type _request_auth: dict, optional
|
|
1806
|
+
:param _content_type: force content-type for the request.
|
|
1807
|
+
:type _content_type: str, Optional
|
|
1808
|
+
:param _headers: set to override the headers for a single
|
|
1809
|
+
request; this effectively ignores the headers
|
|
1810
|
+
in the spec for a single request.
|
|
1811
|
+
:type _headers: dict, optional
|
|
1812
|
+
:param _host_index: set to override the host_index for a single
|
|
1813
|
+
request; this effectively ignores the host_index
|
|
1814
|
+
in the spec for a single request.
|
|
1815
|
+
:type _host_index: int, optional
|
|
1816
|
+
:return: Returns the result object.
|
|
1817
|
+
""" # noqa: E501
|
|
1818
|
+
|
|
1819
|
+
_param = self._leaderboard_participant_participant_id_get_serialize(
|
|
1820
|
+
participant_id=participant_id,
|
|
1821
|
+
_request_auth=_request_auth,
|
|
1822
|
+
_content_type=_content_type,
|
|
1823
|
+
_headers=_headers,
|
|
1824
|
+
_host_index=_host_index
|
|
1825
|
+
)
|
|
1826
|
+
|
|
1827
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1828
|
+
'200': "GetParticipantByIdResult",
|
|
1829
|
+
}
|
|
1830
|
+
response_data = self.api_client.call_api(
|
|
1831
|
+
*_param,
|
|
1832
|
+
_request_timeout=_request_timeout
|
|
1833
|
+
)
|
|
1834
|
+
response_data.read()
|
|
1835
|
+
return self.api_client.response_deserialize(
|
|
1836
|
+
response_data=response_data,
|
|
1837
|
+
response_types_map=_response_types_map,
|
|
1838
|
+
)
|
|
1839
|
+
|
|
1840
|
+
|
|
1841
|
+
@validate_call
|
|
1842
|
+
def leaderboard_participant_participant_id_get_without_preload_content(
|
|
1843
|
+
self,
|
|
1844
|
+
participant_id: StrictStr,
|
|
1845
|
+
_request_timeout: Union[
|
|
1846
|
+
None,
|
|
1847
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1848
|
+
Tuple[
|
|
1849
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1850
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1851
|
+
]
|
|
1852
|
+
] = None,
|
|
1853
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1854
|
+
_content_type: Optional[StrictStr] = None,
|
|
1855
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1856
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1857
|
+
) -> RESTResponseType:
|
|
1858
|
+
"""Gets a participant by its ID.
|
|
1859
|
+
|
|
1860
|
+
|
|
1861
|
+
:param participant_id: (required)
|
|
1862
|
+
:type participant_id: str
|
|
1863
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1864
|
+
number provided, it will be total request
|
|
1865
|
+
timeout. It can also be a pair (tuple) of
|
|
1866
|
+
(connection, read) timeouts.
|
|
1867
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1868
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1869
|
+
request; this effectively ignores the
|
|
1870
|
+
authentication in the spec for a single request.
|
|
1871
|
+
:type _request_auth: dict, optional
|
|
1872
|
+
:param _content_type: force content-type for the request.
|
|
1873
|
+
:type _content_type: str, Optional
|
|
1874
|
+
:param _headers: set to override the headers for a single
|
|
1875
|
+
request; this effectively ignores the headers
|
|
1876
|
+
in the spec for a single request.
|
|
1877
|
+
:type _headers: dict, optional
|
|
1878
|
+
:param _host_index: set to override the host_index for a single
|
|
1879
|
+
request; this effectively ignores the host_index
|
|
1880
|
+
in the spec for a single request.
|
|
1881
|
+
:type _host_index: int, optional
|
|
1882
|
+
:return: Returns the result object.
|
|
1883
|
+
""" # noqa: E501
|
|
1884
|
+
|
|
1885
|
+
_param = self._leaderboard_participant_participant_id_get_serialize(
|
|
1886
|
+
participant_id=participant_id,
|
|
1887
|
+
_request_auth=_request_auth,
|
|
1888
|
+
_content_type=_content_type,
|
|
1889
|
+
_headers=_headers,
|
|
1890
|
+
_host_index=_host_index
|
|
1891
|
+
)
|
|
1892
|
+
|
|
1893
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1894
|
+
'200': "GetParticipantByIdResult",
|
|
1895
|
+
}
|
|
1896
|
+
response_data = self.api_client.call_api(
|
|
1897
|
+
*_param,
|
|
1898
|
+
_request_timeout=_request_timeout
|
|
1899
|
+
)
|
|
1900
|
+
return response_data.response
|
|
1901
|
+
|
|
1902
|
+
|
|
1903
|
+
def _leaderboard_participant_participant_id_get_serialize(
|
|
1904
|
+
self,
|
|
1905
|
+
participant_id,
|
|
1906
|
+
_request_auth,
|
|
1907
|
+
_content_type,
|
|
1908
|
+
_headers,
|
|
1909
|
+
_host_index,
|
|
1910
|
+
) -> RequestSerialized:
|
|
1911
|
+
|
|
1912
|
+
_host = None
|
|
1913
|
+
|
|
1914
|
+
_collection_formats: Dict[str, str] = {
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
_path_params: Dict[str, str] = {}
|
|
1918
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1919
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1920
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1921
|
+
_files: Dict[
|
|
1922
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1923
|
+
] = {}
|
|
1924
|
+
_body_params: Optional[bytes] = None
|
|
1925
|
+
|
|
1926
|
+
# process the path parameters
|
|
1927
|
+
if participant_id is not None:
|
|
1928
|
+
_path_params['participantId'] = participant_id
|
|
1929
|
+
# process the query parameters
|
|
1930
|
+
# process the header parameters
|
|
1931
|
+
# process the form parameters
|
|
1932
|
+
# process the body parameter
|
|
1933
|
+
|
|
1934
|
+
|
|
1935
|
+
# set the HTTP header `Accept`
|
|
1936
|
+
if 'Accept' not in _header_params:
|
|
1937
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1938
|
+
[
|
|
1939
|
+
'text/plain',
|
|
1940
|
+
'application/json',
|
|
1941
|
+
'text/json'
|
|
1942
|
+
]
|
|
1943
|
+
)
|
|
1944
|
+
|
|
1945
|
+
|
|
1946
|
+
# authentication setting
|
|
1947
|
+
_auth_settings: List[str] = [
|
|
1948
|
+
'bearer',
|
|
1949
|
+
'oauth2'
|
|
1950
|
+
]
|
|
1951
|
+
|
|
1952
|
+
return self.api_client.param_serialize(
|
|
1953
|
+
method='GET',
|
|
1954
|
+
resource_path='/leaderboard/participant/{participantId}',
|
|
1955
|
+
path_params=_path_params,
|
|
1956
|
+
query_params=_query_params,
|
|
1957
|
+
header_params=_header_params,
|
|
1958
|
+
body=_body_params,
|
|
1959
|
+
post_params=_form_params,
|
|
1960
|
+
files=_files,
|
|
1961
|
+
auth_settings=_auth_settings,
|
|
1962
|
+
collection_formats=_collection_formats,
|
|
1963
|
+
_host=_host,
|
|
1964
|
+
_request_auth=_request_auth
|
|
1965
|
+
)
|
|
1966
|
+
|
|
1967
|
+
|
|
1968
|
+
|
|
1969
|
+
|
|
1970
|
+
@validate_call
|
|
1971
|
+
def leaderboard_post(
|
|
1972
|
+
self,
|
|
1973
|
+
create_leaderboard_model: Optional[CreateLeaderboardModel] = None,
|
|
1974
|
+
_request_timeout: Union[
|
|
1975
|
+
None,
|
|
1976
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1977
|
+
Tuple[
|
|
1978
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1979
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1980
|
+
]
|
|
1981
|
+
] = None,
|
|
1982
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1983
|
+
_content_type: Optional[StrictStr] = None,
|
|
1984
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1985
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1986
|
+
) -> CreateLeaderboardResult:
|
|
1987
|
+
"""Creates a new leaderboard with the specified name and criteria.
|
|
1988
|
+
|
|
1989
|
+
|
|
1990
|
+
:param create_leaderboard_model:
|
|
1991
|
+
:type create_leaderboard_model: CreateLeaderboardModel
|
|
1992
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1993
|
+
number provided, it will be total request
|
|
1994
|
+
timeout. It can also be a pair (tuple) of
|
|
1995
|
+
(connection, read) timeouts.
|
|
1996
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1997
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1998
|
+
request; this effectively ignores the
|
|
1999
|
+
authentication in the spec for a single request.
|
|
2000
|
+
:type _request_auth: dict, optional
|
|
2001
|
+
:param _content_type: force content-type for the request.
|
|
2002
|
+
:type _content_type: str, Optional
|
|
2003
|
+
:param _headers: set to override the headers for a single
|
|
2004
|
+
request; this effectively ignores the headers
|
|
2005
|
+
in the spec for a single request.
|
|
2006
|
+
:type _headers: dict, optional
|
|
2007
|
+
:param _host_index: set to override the host_index for a single
|
|
2008
|
+
request; this effectively ignores the host_index
|
|
2009
|
+
in the spec for a single request.
|
|
2010
|
+
:type _host_index: int, optional
|
|
2011
|
+
:return: Returns the result object.
|
|
2012
|
+
""" # noqa: E501
|
|
2013
|
+
|
|
2014
|
+
_param = self._leaderboard_post_serialize(
|
|
2015
|
+
create_leaderboard_model=create_leaderboard_model,
|
|
2016
|
+
_request_auth=_request_auth,
|
|
2017
|
+
_content_type=_content_type,
|
|
2018
|
+
_headers=_headers,
|
|
2019
|
+
_host_index=_host_index
|
|
2020
|
+
)
|
|
2021
|
+
|
|
2022
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2023
|
+
'200': "CreateLeaderboardResult",
|
|
2024
|
+
}
|
|
2025
|
+
response_data = self.api_client.call_api(
|
|
2026
|
+
*_param,
|
|
2027
|
+
_request_timeout=_request_timeout
|
|
2028
|
+
)
|
|
2029
|
+
response_data.read()
|
|
2030
|
+
return self.api_client.response_deserialize(
|
|
2031
|
+
response_data=response_data,
|
|
2032
|
+
response_types_map=_response_types_map,
|
|
2033
|
+
).data
|
|
2034
|
+
|
|
2035
|
+
|
|
2036
|
+
@validate_call
|
|
2037
|
+
def leaderboard_post_with_http_info(
|
|
2038
|
+
self,
|
|
2039
|
+
create_leaderboard_model: Optional[CreateLeaderboardModel] = None,
|
|
2040
|
+
_request_timeout: Union[
|
|
2041
|
+
None,
|
|
2042
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2043
|
+
Tuple[
|
|
2044
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2045
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2046
|
+
]
|
|
2047
|
+
] = None,
|
|
2048
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2049
|
+
_content_type: Optional[StrictStr] = None,
|
|
2050
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2051
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2052
|
+
) -> ApiResponse[CreateLeaderboardResult]:
|
|
2053
|
+
"""Creates a new leaderboard with the specified name and criteria.
|
|
2054
|
+
|
|
2055
|
+
|
|
2056
|
+
:param create_leaderboard_model:
|
|
2057
|
+
:type create_leaderboard_model: CreateLeaderboardModel
|
|
2058
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2059
|
+
number provided, it will be total request
|
|
2060
|
+
timeout. It can also be a pair (tuple) of
|
|
2061
|
+
(connection, read) timeouts.
|
|
2062
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2063
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2064
|
+
request; this effectively ignores the
|
|
2065
|
+
authentication in the spec for a single request.
|
|
2066
|
+
:type _request_auth: dict, optional
|
|
2067
|
+
:param _content_type: force content-type for the request.
|
|
2068
|
+
:type _content_type: str, Optional
|
|
2069
|
+
:param _headers: set to override the headers for a single
|
|
2070
|
+
request; this effectively ignores the headers
|
|
2071
|
+
in the spec for a single request.
|
|
2072
|
+
:type _headers: dict, optional
|
|
2073
|
+
:param _host_index: set to override the host_index for a single
|
|
2074
|
+
request; this effectively ignores the host_index
|
|
2075
|
+
in the spec for a single request.
|
|
2076
|
+
:type _host_index: int, optional
|
|
2077
|
+
:return: Returns the result object.
|
|
2078
|
+
""" # noqa: E501
|
|
2079
|
+
|
|
2080
|
+
_param = self._leaderboard_post_serialize(
|
|
2081
|
+
create_leaderboard_model=create_leaderboard_model,
|
|
2082
|
+
_request_auth=_request_auth,
|
|
2083
|
+
_content_type=_content_type,
|
|
2084
|
+
_headers=_headers,
|
|
2085
|
+
_host_index=_host_index
|
|
2086
|
+
)
|
|
2087
|
+
|
|
2088
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2089
|
+
'200': "CreateLeaderboardResult",
|
|
2090
|
+
}
|
|
2091
|
+
response_data = self.api_client.call_api(
|
|
2092
|
+
*_param,
|
|
2093
|
+
_request_timeout=_request_timeout
|
|
2094
|
+
)
|
|
2095
|
+
response_data.read()
|
|
2096
|
+
return self.api_client.response_deserialize(
|
|
2097
|
+
response_data=response_data,
|
|
2098
|
+
response_types_map=_response_types_map,
|
|
2099
|
+
)
|
|
2100
|
+
|
|
2101
|
+
|
|
2102
|
+
@validate_call
|
|
2103
|
+
def leaderboard_post_without_preload_content(
|
|
2104
|
+
self,
|
|
2105
|
+
create_leaderboard_model: Optional[CreateLeaderboardModel] = None,
|
|
2106
|
+
_request_timeout: Union[
|
|
2107
|
+
None,
|
|
2108
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2109
|
+
Tuple[
|
|
2110
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2111
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2112
|
+
]
|
|
2113
|
+
] = None,
|
|
2114
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2115
|
+
_content_type: Optional[StrictStr] = None,
|
|
2116
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2117
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2118
|
+
) -> RESTResponseType:
|
|
2119
|
+
"""Creates a new leaderboard with the specified name and criteria.
|
|
2120
|
+
|
|
2121
|
+
|
|
2122
|
+
:param create_leaderboard_model:
|
|
2123
|
+
:type create_leaderboard_model: CreateLeaderboardModel
|
|
2124
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2125
|
+
number provided, it will be total request
|
|
2126
|
+
timeout. It can also be a pair (tuple) of
|
|
2127
|
+
(connection, read) timeouts.
|
|
2128
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2129
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2130
|
+
request; this effectively ignores the
|
|
2131
|
+
authentication in the spec for a single request.
|
|
2132
|
+
:type _request_auth: dict, optional
|
|
2133
|
+
:param _content_type: force content-type for the request.
|
|
2134
|
+
:type _content_type: str, Optional
|
|
2135
|
+
:param _headers: set to override the headers for a single
|
|
2136
|
+
request; this effectively ignores the headers
|
|
2137
|
+
in the spec for a single request.
|
|
2138
|
+
:type _headers: dict, optional
|
|
2139
|
+
:param _host_index: set to override the host_index for a single
|
|
2140
|
+
request; this effectively ignores the host_index
|
|
2141
|
+
in the spec for a single request.
|
|
2142
|
+
:type _host_index: int, optional
|
|
2143
|
+
:return: Returns the result object.
|
|
2144
|
+
""" # noqa: E501
|
|
2145
|
+
|
|
2146
|
+
_param = self._leaderboard_post_serialize(
|
|
2147
|
+
create_leaderboard_model=create_leaderboard_model,
|
|
2148
|
+
_request_auth=_request_auth,
|
|
2149
|
+
_content_type=_content_type,
|
|
2150
|
+
_headers=_headers,
|
|
2151
|
+
_host_index=_host_index
|
|
2152
|
+
)
|
|
2153
|
+
|
|
2154
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2155
|
+
'200': "CreateLeaderboardResult",
|
|
2156
|
+
}
|
|
2157
|
+
response_data = self.api_client.call_api(
|
|
2158
|
+
*_param,
|
|
2159
|
+
_request_timeout=_request_timeout
|
|
2160
|
+
)
|
|
2161
|
+
return response_data.response
|
|
2162
|
+
|
|
2163
|
+
|
|
2164
|
+
def _leaderboard_post_serialize(
|
|
2165
|
+
self,
|
|
2166
|
+
create_leaderboard_model,
|
|
2167
|
+
_request_auth,
|
|
2168
|
+
_content_type,
|
|
2169
|
+
_headers,
|
|
2170
|
+
_host_index,
|
|
2171
|
+
) -> RequestSerialized:
|
|
2172
|
+
|
|
2173
|
+
_host = None
|
|
2174
|
+
|
|
2175
|
+
_collection_formats: Dict[str, str] = {
|
|
2176
|
+
}
|
|
2177
|
+
|
|
2178
|
+
_path_params: Dict[str, str] = {}
|
|
2179
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2180
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2181
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2182
|
+
_files: Dict[
|
|
2183
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2184
|
+
] = {}
|
|
2185
|
+
_body_params: Optional[bytes] = None
|
|
2186
|
+
|
|
2187
|
+
# process the path parameters
|
|
2188
|
+
# process the query parameters
|
|
2189
|
+
# process the header parameters
|
|
2190
|
+
# process the form parameters
|
|
2191
|
+
# process the body parameter
|
|
2192
|
+
if create_leaderboard_model is not None:
|
|
2193
|
+
_body_params = create_leaderboard_model
|
|
2194
|
+
|
|
2195
|
+
|
|
2196
|
+
# set the HTTP header `Accept`
|
|
2197
|
+
if 'Accept' not in _header_params:
|
|
2198
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2199
|
+
[
|
|
2200
|
+
'text/plain',
|
|
2201
|
+
'application/json',
|
|
2202
|
+
'text/json'
|
|
2203
|
+
]
|
|
2204
|
+
)
|
|
2205
|
+
|
|
2206
|
+
# set the HTTP header `Content-Type`
|
|
2207
|
+
if _content_type:
|
|
2208
|
+
_header_params['Content-Type'] = _content_type
|
|
2209
|
+
else:
|
|
2210
|
+
_default_content_type = (
|
|
2211
|
+
self.api_client.select_header_content_type(
|
|
2212
|
+
[
|
|
2213
|
+
'application/json',
|
|
2214
|
+
'text/json',
|
|
2215
|
+
'application/*+json'
|
|
2216
|
+
]
|
|
2217
|
+
)
|
|
2218
|
+
)
|
|
2219
|
+
if _default_content_type is not None:
|
|
2220
|
+
_header_params['Content-Type'] = _default_content_type
|
|
2221
|
+
|
|
2222
|
+
# authentication setting
|
|
2223
|
+
_auth_settings: List[str] = [
|
|
2224
|
+
'bearer',
|
|
2225
|
+
'oauth2'
|
|
2226
|
+
]
|
|
2227
|
+
|
|
2228
|
+
return self.api_client.param_serialize(
|
|
2229
|
+
method='POST',
|
|
2230
|
+
resource_path='/leaderboard',
|
|
2231
|
+
path_params=_path_params,
|
|
2232
|
+
query_params=_query_params,
|
|
2233
|
+
header_params=_header_params,
|
|
2234
|
+
body=_body_params,
|
|
2235
|
+
post_params=_form_params,
|
|
2236
|
+
files=_files,
|
|
2237
|
+
auth_settings=_auth_settings,
|
|
2238
|
+
collection_formats=_collection_formats,
|
|
2239
|
+
_host=_host,
|
|
2240
|
+
_request_auth=_request_auth
|
|
2241
|
+
)
|
|
2242
|
+
|
|
2243
|
+
|
|
2244
|
+
|
|
2245
|
+
|
|
2246
|
+
@validate_call
|
|
2247
|
+
def leaderboards_get(
|
|
2248
|
+
self,
|
|
2249
|
+
request: Optional[QueryModel] = None,
|
|
2250
|
+
_request_timeout: Union[
|
|
2251
|
+
None,
|
|
2252
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2253
|
+
Tuple[
|
|
2254
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2255
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2256
|
+
]
|
|
2257
|
+
] = None,
|
|
2258
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2259
|
+
_content_type: Optional[StrictStr] = None,
|
|
2260
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2261
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2262
|
+
) -> LeaderboardQueryResultPagedResult:
|
|
2263
|
+
"""Queries all leaderboards of the user.
|
|
2264
|
+
|
|
2265
|
+
|
|
2266
|
+
:param request:
|
|
2267
|
+
:type request: QueryModel
|
|
2268
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2269
|
+
number provided, it will be total request
|
|
2270
|
+
timeout. It can also be a pair (tuple) of
|
|
2271
|
+
(connection, read) timeouts.
|
|
2272
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2273
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2274
|
+
request; this effectively ignores the
|
|
2275
|
+
authentication in the spec for a single request.
|
|
2276
|
+
:type _request_auth: dict, optional
|
|
2277
|
+
:param _content_type: force content-type for the request.
|
|
2278
|
+
:type _content_type: str, Optional
|
|
2279
|
+
:param _headers: set to override the headers for a single
|
|
2280
|
+
request; this effectively ignores the headers
|
|
2281
|
+
in the spec for a single request.
|
|
2282
|
+
:type _headers: dict, optional
|
|
2283
|
+
:param _host_index: set to override the host_index for a single
|
|
2284
|
+
request; this effectively ignores the host_index
|
|
2285
|
+
in the spec for a single request.
|
|
2286
|
+
:type _host_index: int, optional
|
|
2287
|
+
:return: Returns the result object.
|
|
2288
|
+
""" # noqa: E501
|
|
2289
|
+
|
|
2290
|
+
_param = self._leaderboards_get_serialize(
|
|
2291
|
+
request=request,
|
|
2292
|
+
_request_auth=_request_auth,
|
|
2293
|
+
_content_type=_content_type,
|
|
2294
|
+
_headers=_headers,
|
|
2295
|
+
_host_index=_host_index
|
|
2296
|
+
)
|
|
2297
|
+
|
|
2298
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2299
|
+
'200': "LeaderboardQueryResultPagedResult",
|
|
2300
|
+
}
|
|
2301
|
+
response_data = self.api_client.call_api(
|
|
2302
|
+
*_param,
|
|
2303
|
+
_request_timeout=_request_timeout
|
|
2304
|
+
)
|
|
2305
|
+
response_data.read()
|
|
2306
|
+
return self.api_client.response_deserialize(
|
|
2307
|
+
response_data=response_data,
|
|
2308
|
+
response_types_map=_response_types_map,
|
|
2309
|
+
).data
|
|
2310
|
+
|
|
2311
|
+
|
|
2312
|
+
@validate_call
|
|
2313
|
+
def leaderboards_get_with_http_info(
|
|
2314
|
+
self,
|
|
2315
|
+
request: Optional[QueryModel] = None,
|
|
2316
|
+
_request_timeout: Union[
|
|
2317
|
+
None,
|
|
2318
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2319
|
+
Tuple[
|
|
2320
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2321
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2322
|
+
]
|
|
2323
|
+
] = None,
|
|
2324
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2325
|
+
_content_type: Optional[StrictStr] = None,
|
|
2326
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2327
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2328
|
+
) -> ApiResponse[LeaderboardQueryResultPagedResult]:
|
|
2329
|
+
"""Queries all leaderboards of the user.
|
|
2330
|
+
|
|
2331
|
+
|
|
2332
|
+
:param request:
|
|
2333
|
+
:type request: QueryModel
|
|
2334
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2335
|
+
number provided, it will be total request
|
|
2336
|
+
timeout. It can also be a pair (tuple) of
|
|
2337
|
+
(connection, read) timeouts.
|
|
2338
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2339
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2340
|
+
request; this effectively ignores the
|
|
2341
|
+
authentication in the spec for a single request.
|
|
2342
|
+
:type _request_auth: dict, optional
|
|
2343
|
+
:param _content_type: force content-type for the request.
|
|
2344
|
+
:type _content_type: str, Optional
|
|
2345
|
+
:param _headers: set to override the headers for a single
|
|
2346
|
+
request; this effectively ignores the headers
|
|
2347
|
+
in the spec for a single request.
|
|
2348
|
+
:type _headers: dict, optional
|
|
2349
|
+
:param _host_index: set to override the host_index for a single
|
|
2350
|
+
request; this effectively ignores the host_index
|
|
2351
|
+
in the spec for a single request.
|
|
2352
|
+
:type _host_index: int, optional
|
|
2353
|
+
:return: Returns the result object.
|
|
2354
|
+
""" # noqa: E501
|
|
2355
|
+
|
|
2356
|
+
_param = self._leaderboards_get_serialize(
|
|
2357
|
+
request=request,
|
|
2358
|
+
_request_auth=_request_auth,
|
|
2359
|
+
_content_type=_content_type,
|
|
2360
|
+
_headers=_headers,
|
|
2361
|
+
_host_index=_host_index
|
|
2362
|
+
)
|
|
2363
|
+
|
|
2364
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2365
|
+
'200': "LeaderboardQueryResultPagedResult",
|
|
2366
|
+
}
|
|
2367
|
+
response_data = self.api_client.call_api(
|
|
2368
|
+
*_param,
|
|
2369
|
+
_request_timeout=_request_timeout
|
|
2370
|
+
)
|
|
2371
|
+
response_data.read()
|
|
2372
|
+
return self.api_client.response_deserialize(
|
|
2373
|
+
response_data=response_data,
|
|
2374
|
+
response_types_map=_response_types_map,
|
|
2375
|
+
)
|
|
2376
|
+
|
|
2377
|
+
|
|
2378
|
+
@validate_call
|
|
2379
|
+
def leaderboards_get_without_preload_content(
|
|
2380
|
+
self,
|
|
2381
|
+
request: Optional[QueryModel] = None,
|
|
2382
|
+
_request_timeout: Union[
|
|
2383
|
+
None,
|
|
2384
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2385
|
+
Tuple[
|
|
2386
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2387
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2388
|
+
]
|
|
2389
|
+
] = None,
|
|
2390
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2391
|
+
_content_type: Optional[StrictStr] = None,
|
|
2392
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2393
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2394
|
+
) -> RESTResponseType:
|
|
2395
|
+
"""Queries all leaderboards of the user.
|
|
2396
|
+
|
|
2397
|
+
|
|
2398
|
+
:param request:
|
|
2399
|
+
:type request: QueryModel
|
|
2400
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2401
|
+
number provided, it will be total request
|
|
2402
|
+
timeout. It can also be a pair (tuple) of
|
|
2403
|
+
(connection, read) timeouts.
|
|
2404
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2405
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2406
|
+
request; this effectively ignores the
|
|
2407
|
+
authentication in the spec for a single request.
|
|
2408
|
+
:type _request_auth: dict, optional
|
|
2409
|
+
:param _content_type: force content-type for the request.
|
|
2410
|
+
:type _content_type: str, Optional
|
|
2411
|
+
:param _headers: set to override the headers for a single
|
|
2412
|
+
request; this effectively ignores the headers
|
|
2413
|
+
in the spec for a single request.
|
|
2414
|
+
:type _headers: dict, optional
|
|
2415
|
+
:param _host_index: set to override the host_index for a single
|
|
2416
|
+
request; this effectively ignores the host_index
|
|
2417
|
+
in the spec for a single request.
|
|
2418
|
+
:type _host_index: int, optional
|
|
2419
|
+
:return: Returns the result object.
|
|
2420
|
+
""" # noqa: E501
|
|
2421
|
+
|
|
2422
|
+
_param = self._leaderboards_get_serialize(
|
|
2423
|
+
request=request,
|
|
2424
|
+
_request_auth=_request_auth,
|
|
2425
|
+
_content_type=_content_type,
|
|
2426
|
+
_headers=_headers,
|
|
2427
|
+
_host_index=_host_index
|
|
2428
|
+
)
|
|
2429
|
+
|
|
2430
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2431
|
+
'200': "LeaderboardQueryResultPagedResult",
|
|
2432
|
+
}
|
|
2433
|
+
response_data = self.api_client.call_api(
|
|
2434
|
+
*_param,
|
|
2435
|
+
_request_timeout=_request_timeout
|
|
2436
|
+
)
|
|
2437
|
+
return response_data.response
|
|
2438
|
+
|
|
2439
|
+
|
|
2440
|
+
def _leaderboards_get_serialize(
|
|
2441
|
+
self,
|
|
2442
|
+
request,
|
|
2443
|
+
_request_auth,
|
|
2444
|
+
_content_type,
|
|
2445
|
+
_headers,
|
|
2446
|
+
_host_index,
|
|
2447
|
+
) -> RequestSerialized:
|
|
2448
|
+
|
|
2449
|
+
_host = None
|
|
2450
|
+
|
|
2451
|
+
_collection_formats: Dict[str, str] = {
|
|
2452
|
+
}
|
|
2453
|
+
|
|
2454
|
+
_path_params: Dict[str, str] = {}
|
|
2455
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2456
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2457
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2458
|
+
_files: Dict[
|
|
2459
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2460
|
+
] = {}
|
|
2461
|
+
_body_params: Optional[bytes] = None
|
|
2462
|
+
|
|
2463
|
+
# process the path parameters
|
|
2464
|
+
# process the query parameters
|
|
2465
|
+
if request is not None:
|
|
2466
|
+
|
|
2467
|
+
_query_params.append(('request', request))
|
|
2468
|
+
|
|
2469
|
+
# process the header parameters
|
|
2470
|
+
# process the form parameters
|
|
2471
|
+
# process the body parameter
|
|
2472
|
+
|
|
2473
|
+
|
|
2474
|
+
# set the HTTP header `Accept`
|
|
2475
|
+
if 'Accept' not in _header_params:
|
|
2476
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2477
|
+
[
|
|
2478
|
+
'text/plain',
|
|
2479
|
+
'application/json',
|
|
2480
|
+
'text/json'
|
|
2481
|
+
]
|
|
2482
|
+
)
|
|
2483
|
+
|
|
2484
|
+
|
|
2485
|
+
# authentication setting
|
|
2486
|
+
_auth_settings: List[str] = [
|
|
2487
|
+
'bearer',
|
|
2488
|
+
'oauth2'
|
|
2489
|
+
]
|
|
2490
|
+
|
|
2491
|
+
return self.api_client.param_serialize(
|
|
2492
|
+
method='GET',
|
|
2493
|
+
resource_path='/leaderboards',
|
|
2494
|
+
path_params=_path_params,
|
|
2495
|
+
query_params=_query_params,
|
|
2496
|
+
header_params=_header_params,
|
|
2497
|
+
body=_body_params,
|
|
2498
|
+
post_params=_form_params,
|
|
2499
|
+
files=_files,
|
|
2500
|
+
auth_settings=_auth_settings,
|
|
2501
|
+
collection_formats=_collection_formats,
|
|
2502
|
+
_host=_host,
|
|
2503
|
+
_request_auth=_request_auth
|
|
2504
|
+
)
|
|
2505
|
+
|
|
2506
|
+
|