prismlauncheroldmcsnaps 0.2.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.
- prismlauncheroldmcsnaps/__init__.py +59 -0
- prismlauncheroldmcsnaps/api/__init__.py +5 -0
- prismlauncheroldmcsnaps/api/default_api.py +550 -0
- prismlauncheroldmcsnaps/api_client.py +843 -0
- prismlauncheroldmcsnaps/api_response.py +21 -0
- prismlauncheroldmcsnaps/configuration.py +646 -0
- prismlauncheroldmcsnaps/exceptions.py +219 -0
- prismlauncheroldmcsnaps/models/__init__.py +22 -0
- prismlauncheroldmcsnaps/models/archived_minecraft_version_info.py +131 -0
- prismlauncheroldmcsnaps/models/asset_index.py +121 -0
- prismlauncheroldmcsnaps/models/library.py +110 -0
- prismlauncheroldmcsnaps/models/old_snapshot.py +107 -0
- prismlauncheroldmcsnaps/models/old_snapshots_manifest.py +96 -0
- prismlauncheroldmcsnaps/py.typed +0 -0
- prismlauncheroldmcsnaps/rest.py +335 -0
- prismlauncheroldmcsnaps-0.2.0.dist-info/METADATA +135 -0
- prismlauncheroldmcsnaps-0.2.0.dist-info/RECORD +19 -0
- prismlauncheroldmcsnaps-0.2.0.dist-info/WHEEL +5 -0
- prismlauncheroldmcsnaps-0.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
PrismLauncher Old Minecraft Snapshots
|
|
7
|
+
|
|
8
|
+
SDK-friendly OpenAPI description for PrismLauncher's old Minecraft snapshots metadata and the corresponding archived Minecraft version JSON documents hosted by Internet Archive.
|
|
9
|
+
|
|
10
|
+
The version of the OpenAPI document: 0.2.0
|
|
11
|
+
Contact: blah+oapicf@cliffano.com
|
|
12
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
13
|
+
|
|
14
|
+
Do not edit the class manually.
|
|
15
|
+
""" # noqa: E501
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
__version__ = "0.2.0"
|
|
19
|
+
|
|
20
|
+
# Define package exports
|
|
21
|
+
__all__ = [
|
|
22
|
+
"DefaultApi",
|
|
23
|
+
"ApiResponse",
|
|
24
|
+
"ApiClient",
|
|
25
|
+
"Configuration",
|
|
26
|
+
"OpenApiException",
|
|
27
|
+
"ApiTypeError",
|
|
28
|
+
"ApiValueError",
|
|
29
|
+
"ApiKeyError",
|
|
30
|
+
"ApiAttributeError",
|
|
31
|
+
"ApiException",
|
|
32
|
+
"ArchivedMinecraftVersionInfo",
|
|
33
|
+
"AssetIndex",
|
|
34
|
+
"Library",
|
|
35
|
+
"OldSnapshot",
|
|
36
|
+
"OldSnapshotsManifest",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
# import apis into sdk package
|
|
40
|
+
from prismlauncheroldmcsnaps.api.default_api import DefaultApi as DefaultApi
|
|
41
|
+
|
|
42
|
+
# import ApiClient
|
|
43
|
+
from prismlauncheroldmcsnaps.api_response import ApiResponse as ApiResponse
|
|
44
|
+
from prismlauncheroldmcsnaps.api_client import ApiClient as ApiClient
|
|
45
|
+
from prismlauncheroldmcsnaps.configuration import Configuration as Configuration
|
|
46
|
+
from prismlauncheroldmcsnaps.exceptions import OpenApiException as OpenApiException
|
|
47
|
+
from prismlauncheroldmcsnaps.exceptions import ApiTypeError as ApiTypeError
|
|
48
|
+
from prismlauncheroldmcsnaps.exceptions import ApiValueError as ApiValueError
|
|
49
|
+
from prismlauncheroldmcsnaps.exceptions import ApiKeyError as ApiKeyError
|
|
50
|
+
from prismlauncheroldmcsnaps.exceptions import ApiAttributeError as ApiAttributeError
|
|
51
|
+
from prismlauncheroldmcsnaps.exceptions import ApiException as ApiException
|
|
52
|
+
|
|
53
|
+
# import models into sdk package
|
|
54
|
+
from prismlauncheroldmcsnaps.models.archived_minecraft_version_info import ArchivedMinecraftVersionInfo as ArchivedMinecraftVersionInfo
|
|
55
|
+
from prismlauncheroldmcsnaps.models.asset_index import AssetIndex as AssetIndex
|
|
56
|
+
from prismlauncheroldmcsnaps.models.library import Library as Library
|
|
57
|
+
from prismlauncheroldmcsnaps.models.old_snapshot import OldSnapshot as OldSnapshot
|
|
58
|
+
from prismlauncheroldmcsnaps.models.old_snapshots_manifest import OldSnapshotsManifest as OldSnapshotsManifest
|
|
59
|
+
|
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
"""
|
|
2
|
+
PrismLauncher Old Minecraft Snapshots
|
|
3
|
+
|
|
4
|
+
SDK-friendly OpenAPI description for PrismLauncher's old Minecraft snapshots metadata and the corresponding archived Minecraft version JSON documents hosted by Internet Archive.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.2.0
|
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
""" # noqa: E501
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import warnings
|
|
15
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
+
from typing_extensions import Annotated
|
|
18
|
+
|
|
19
|
+
from pydantic import Field, StrictStr
|
|
20
|
+
from typing_extensions import Annotated
|
|
21
|
+
from prismlauncheroldmcsnaps.models.archived_minecraft_version_info import ArchivedMinecraftVersionInfo
|
|
22
|
+
from prismlauncheroldmcsnaps.models.old_snapshots_manifest import OldSnapshotsManifest
|
|
23
|
+
|
|
24
|
+
from prismlauncheroldmcsnaps.api_client import ApiClient, RequestSerialized
|
|
25
|
+
from prismlauncheroldmcsnaps.api_response import ApiResponse
|
|
26
|
+
from prismlauncheroldmcsnaps.rest import RESTResponseType
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class DefaultApi:
|
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
31
|
+
Ref: https://openapi-generator.tech
|
|
32
|
+
|
|
33
|
+
Do not edit the class manually.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, api_client=None) -> None:
|
|
37
|
+
if api_client is None:
|
|
38
|
+
api_client = ApiClient.get_default()
|
|
39
|
+
self.api_client = api_client
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@validate_call
|
|
43
|
+
def get_archived_minecraft_version_info(
|
|
44
|
+
self,
|
|
45
|
+
version_json_id: Annotated[StrictStr, Field(description="Archive.org Minecraft-JSONs filename without the `.json` suffix. For example, `b1.9-pre3`.")],
|
|
46
|
+
_request_timeout: Union[
|
|
47
|
+
None,
|
|
48
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
49
|
+
Tuple[
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
52
|
+
]
|
|
53
|
+
] = None,
|
|
54
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
55
|
+
_content_type: Optional[StrictStr] = None,
|
|
56
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
|
58
|
+
) -> ArchivedMinecraftVersionInfo:
|
|
59
|
+
"""Get archived Minecraft version info
|
|
60
|
+
|
|
61
|
+
Returns the archived Minecraft launcher/version JSON for an old snapshot or pre-release. The value of versionJsonId should come from the basename of the `url` field in the PrismLauncher manifest rather than being derived from the manifest `id`, because the two are not always identical.
|
|
62
|
+
|
|
63
|
+
:param version_json_id: Archive.org Minecraft-JSONs filename without the `.json` suffix. For example, `b1.9-pre3`. (required)
|
|
64
|
+
:type version_json_id: str
|
|
65
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
66
|
+
number provided, it will be total request
|
|
67
|
+
timeout. It can also be a pair (tuple) of
|
|
68
|
+
(connection, read) timeouts.
|
|
69
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
70
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
71
|
+
request; this effectively ignores the
|
|
72
|
+
authentication in the spec for a single request.
|
|
73
|
+
:type _request_auth: dict, optional
|
|
74
|
+
:param _content_type: force content-type for the request.
|
|
75
|
+
:type _content_type: str, Optional
|
|
76
|
+
:param _headers: set to override the headers for a single
|
|
77
|
+
request; this effectively ignores the headers
|
|
78
|
+
in the spec for a single request.
|
|
79
|
+
:type _headers: dict, optional
|
|
80
|
+
:param _host_index: set to override the host_index for a single
|
|
81
|
+
request; this effectively ignores the host_index
|
|
82
|
+
in the spec for a single request.
|
|
83
|
+
:type _host_index: int, optional
|
|
84
|
+
:return: Returns the result object.
|
|
85
|
+
""" # noqa: E501
|
|
86
|
+
|
|
87
|
+
_param = self._get_archived_minecraft_version_info_serialize(
|
|
88
|
+
version_json_id=version_json_id,
|
|
89
|
+
_request_auth=_request_auth,
|
|
90
|
+
_content_type=_content_type,
|
|
91
|
+
_headers=_headers,
|
|
92
|
+
_host_index=_host_index
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
96
|
+
'200': "ArchivedMinecraftVersionInfo",
|
|
97
|
+
'404': None,
|
|
98
|
+
}
|
|
99
|
+
response_data = self.api_client.call_api(
|
|
100
|
+
*_param,
|
|
101
|
+
_request_timeout=_request_timeout
|
|
102
|
+
)
|
|
103
|
+
response_data.read()
|
|
104
|
+
return self.api_client.response_deserialize(
|
|
105
|
+
response_data=response_data,
|
|
106
|
+
response_types_map=_response_types_map,
|
|
107
|
+
).data
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
@validate_call
|
|
111
|
+
def get_archived_minecraft_version_info_with_http_info(
|
|
112
|
+
self,
|
|
113
|
+
version_json_id: Annotated[StrictStr, Field(description="Archive.org Minecraft-JSONs filename without the `.json` suffix. For example, `b1.9-pre3`.")],
|
|
114
|
+
_request_timeout: Union[
|
|
115
|
+
None,
|
|
116
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
117
|
+
Tuple[
|
|
118
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
119
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
120
|
+
]
|
|
121
|
+
] = None,
|
|
122
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
123
|
+
_content_type: Optional[StrictStr] = None,
|
|
124
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
125
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
|
126
|
+
) -> ApiResponse[ArchivedMinecraftVersionInfo]:
|
|
127
|
+
"""Get archived Minecraft version info
|
|
128
|
+
|
|
129
|
+
Returns the archived Minecraft launcher/version JSON for an old snapshot or pre-release. The value of versionJsonId should come from the basename of the `url` field in the PrismLauncher manifest rather than being derived from the manifest `id`, because the two are not always identical.
|
|
130
|
+
|
|
131
|
+
:param version_json_id: Archive.org Minecraft-JSONs filename without the `.json` suffix. For example, `b1.9-pre3`. (required)
|
|
132
|
+
:type version_json_id: str
|
|
133
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
134
|
+
number provided, it will be total request
|
|
135
|
+
timeout. It can also be a pair (tuple) of
|
|
136
|
+
(connection, read) timeouts.
|
|
137
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
138
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
139
|
+
request; this effectively ignores the
|
|
140
|
+
authentication in the spec for a single request.
|
|
141
|
+
:type _request_auth: dict, optional
|
|
142
|
+
:param _content_type: force content-type for the request.
|
|
143
|
+
:type _content_type: str, Optional
|
|
144
|
+
:param _headers: set to override the headers for a single
|
|
145
|
+
request; this effectively ignores the headers
|
|
146
|
+
in the spec for a single request.
|
|
147
|
+
:type _headers: dict, optional
|
|
148
|
+
:param _host_index: set to override the host_index for a single
|
|
149
|
+
request; this effectively ignores the host_index
|
|
150
|
+
in the spec for a single request.
|
|
151
|
+
:type _host_index: int, optional
|
|
152
|
+
:return: Returns the result object.
|
|
153
|
+
""" # noqa: E501
|
|
154
|
+
|
|
155
|
+
_param = self._get_archived_minecraft_version_info_serialize(
|
|
156
|
+
version_json_id=version_json_id,
|
|
157
|
+
_request_auth=_request_auth,
|
|
158
|
+
_content_type=_content_type,
|
|
159
|
+
_headers=_headers,
|
|
160
|
+
_host_index=_host_index
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
164
|
+
'200': "ArchivedMinecraftVersionInfo",
|
|
165
|
+
'404': None,
|
|
166
|
+
}
|
|
167
|
+
response_data = self.api_client.call_api(
|
|
168
|
+
*_param,
|
|
169
|
+
_request_timeout=_request_timeout
|
|
170
|
+
)
|
|
171
|
+
response_data.read()
|
|
172
|
+
return self.api_client.response_deserialize(
|
|
173
|
+
response_data=response_data,
|
|
174
|
+
response_types_map=_response_types_map,
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
@validate_call
|
|
179
|
+
def get_archived_minecraft_version_info_without_preload_content(
|
|
180
|
+
self,
|
|
181
|
+
version_json_id: Annotated[StrictStr, Field(description="Archive.org Minecraft-JSONs filename without the `.json` suffix. For example, `b1.9-pre3`.")],
|
|
182
|
+
_request_timeout: Union[
|
|
183
|
+
None,
|
|
184
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
185
|
+
Tuple[
|
|
186
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
187
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
188
|
+
]
|
|
189
|
+
] = None,
|
|
190
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
191
|
+
_content_type: Optional[StrictStr] = None,
|
|
192
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
193
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
|
194
|
+
) -> RESTResponseType:
|
|
195
|
+
"""Get archived Minecraft version info
|
|
196
|
+
|
|
197
|
+
Returns the archived Minecraft launcher/version JSON for an old snapshot or pre-release. The value of versionJsonId should come from the basename of the `url` field in the PrismLauncher manifest rather than being derived from the manifest `id`, because the two are not always identical.
|
|
198
|
+
|
|
199
|
+
:param version_json_id: Archive.org Minecraft-JSONs filename without the `.json` suffix. For example, `b1.9-pre3`. (required)
|
|
200
|
+
:type version_json_id: str
|
|
201
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
202
|
+
number provided, it will be total request
|
|
203
|
+
timeout. It can also be a pair (tuple) of
|
|
204
|
+
(connection, read) timeouts.
|
|
205
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
206
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
207
|
+
request; this effectively ignores the
|
|
208
|
+
authentication in the spec for a single request.
|
|
209
|
+
:type _request_auth: dict, optional
|
|
210
|
+
:param _content_type: force content-type for the request.
|
|
211
|
+
:type _content_type: str, Optional
|
|
212
|
+
:param _headers: set to override the headers for a single
|
|
213
|
+
request; this effectively ignores the headers
|
|
214
|
+
in the spec for a single request.
|
|
215
|
+
:type _headers: dict, optional
|
|
216
|
+
:param _host_index: set to override the host_index for a single
|
|
217
|
+
request; this effectively ignores the host_index
|
|
218
|
+
in the spec for a single request.
|
|
219
|
+
:type _host_index: int, optional
|
|
220
|
+
:return: Returns the result object.
|
|
221
|
+
""" # noqa: E501
|
|
222
|
+
|
|
223
|
+
_param = self._get_archived_minecraft_version_info_serialize(
|
|
224
|
+
version_json_id=version_json_id,
|
|
225
|
+
_request_auth=_request_auth,
|
|
226
|
+
_content_type=_content_type,
|
|
227
|
+
_headers=_headers,
|
|
228
|
+
_host_index=_host_index
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
232
|
+
'200': "ArchivedMinecraftVersionInfo",
|
|
233
|
+
'404': None,
|
|
234
|
+
}
|
|
235
|
+
response_data = self.api_client.call_api(
|
|
236
|
+
*_param,
|
|
237
|
+
_request_timeout=_request_timeout
|
|
238
|
+
)
|
|
239
|
+
return response_data.response
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
def _get_archived_minecraft_version_info_serialize(
|
|
243
|
+
self,
|
|
244
|
+
version_json_id,
|
|
245
|
+
_request_auth,
|
|
246
|
+
_content_type,
|
|
247
|
+
_headers,
|
|
248
|
+
_host_index,
|
|
249
|
+
) -> RequestSerialized:
|
|
250
|
+
|
|
251
|
+
_hosts = [
|
|
252
|
+
'https://archive.org'
|
|
253
|
+
]
|
|
254
|
+
_host = _hosts[_host_index]
|
|
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 version_json_id is not None:
|
|
270
|
+
_path_params['versionJsonId'] = version_json_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
|
+
'application/json'
|
|
282
|
+
]
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
# authentication setting
|
|
287
|
+
_auth_settings: List[str] = [
|
|
288
|
+
]
|
|
289
|
+
|
|
290
|
+
return self.api_client.param_serialize(
|
|
291
|
+
method='GET',
|
|
292
|
+
resource_path='/download/Minecraft-JSONs/{versionJsonId}.json',
|
|
293
|
+
path_params=_path_params,
|
|
294
|
+
query_params=_query_params,
|
|
295
|
+
header_params=_header_params,
|
|
296
|
+
body=_body_params,
|
|
297
|
+
post_params=_form_params,
|
|
298
|
+
files=_files,
|
|
299
|
+
auth_settings=_auth_settings,
|
|
300
|
+
collection_formats=_collection_formats,
|
|
301
|
+
_host=_host,
|
|
302
|
+
_request_auth=_request_auth
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
@validate_call
|
|
309
|
+
def get_old_minecraft_snapshots(
|
|
310
|
+
self,
|
|
311
|
+
_request_timeout: Union[
|
|
312
|
+
None,
|
|
313
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
314
|
+
Tuple[
|
|
315
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
316
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
317
|
+
]
|
|
318
|
+
] = None,
|
|
319
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
320
|
+
_content_type: Optional[StrictStr] = None,
|
|
321
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
322
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
323
|
+
) -> OldSnapshotsManifest:
|
|
324
|
+
"""Get old Minecraft snapshots manifest
|
|
325
|
+
|
|
326
|
+
Returns PrismLauncher's curated list of old Minecraft snapshots and pre-releases. Each entry includes the canonical Archive.org version JSON URL and the archived client JAR URL.
|
|
327
|
+
|
|
328
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
329
|
+
number provided, it will be total request
|
|
330
|
+
timeout. It can also be a pair (tuple) of
|
|
331
|
+
(connection, read) timeouts.
|
|
332
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
333
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
334
|
+
request; this effectively ignores the
|
|
335
|
+
authentication in the spec for a single request.
|
|
336
|
+
:type _request_auth: dict, optional
|
|
337
|
+
:param _content_type: force content-type for the request.
|
|
338
|
+
:type _content_type: str, Optional
|
|
339
|
+
:param _headers: set to override the headers for a single
|
|
340
|
+
request; this effectively ignores the headers
|
|
341
|
+
in the spec for a single request.
|
|
342
|
+
:type _headers: dict, optional
|
|
343
|
+
:param _host_index: set to override the host_index for a single
|
|
344
|
+
request; this effectively ignores the host_index
|
|
345
|
+
in the spec for a single request.
|
|
346
|
+
:type _host_index: int, optional
|
|
347
|
+
:return: Returns the result object.
|
|
348
|
+
""" # noqa: E501
|
|
349
|
+
|
|
350
|
+
_param = self._get_old_minecraft_snapshots_serialize(
|
|
351
|
+
_request_auth=_request_auth,
|
|
352
|
+
_content_type=_content_type,
|
|
353
|
+
_headers=_headers,
|
|
354
|
+
_host_index=_host_index
|
|
355
|
+
)
|
|
356
|
+
|
|
357
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
358
|
+
'200': "OldSnapshotsManifest",
|
|
359
|
+
}
|
|
360
|
+
response_data = self.api_client.call_api(
|
|
361
|
+
*_param,
|
|
362
|
+
_request_timeout=_request_timeout
|
|
363
|
+
)
|
|
364
|
+
response_data.read()
|
|
365
|
+
return self.api_client.response_deserialize(
|
|
366
|
+
response_data=response_data,
|
|
367
|
+
response_types_map=_response_types_map,
|
|
368
|
+
).data
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
@validate_call
|
|
372
|
+
def get_old_minecraft_snapshots_with_http_info(
|
|
373
|
+
self,
|
|
374
|
+
_request_timeout: Union[
|
|
375
|
+
None,
|
|
376
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
377
|
+
Tuple[
|
|
378
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
379
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
380
|
+
]
|
|
381
|
+
] = None,
|
|
382
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
383
|
+
_content_type: Optional[StrictStr] = None,
|
|
384
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
385
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
386
|
+
) -> ApiResponse[OldSnapshotsManifest]:
|
|
387
|
+
"""Get old Minecraft snapshots manifest
|
|
388
|
+
|
|
389
|
+
Returns PrismLauncher's curated list of old Minecraft snapshots and pre-releases. Each entry includes the canonical Archive.org version JSON URL and the archived client JAR URL.
|
|
390
|
+
|
|
391
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
392
|
+
number provided, it will be total request
|
|
393
|
+
timeout. It can also be a pair (tuple) of
|
|
394
|
+
(connection, read) timeouts.
|
|
395
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
396
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
397
|
+
request; this effectively ignores the
|
|
398
|
+
authentication in the spec for a single request.
|
|
399
|
+
:type _request_auth: dict, optional
|
|
400
|
+
:param _content_type: force content-type for the request.
|
|
401
|
+
:type _content_type: str, Optional
|
|
402
|
+
:param _headers: set to override the headers for a single
|
|
403
|
+
request; this effectively ignores the headers
|
|
404
|
+
in the spec for a single request.
|
|
405
|
+
:type _headers: dict, optional
|
|
406
|
+
:param _host_index: set to override the host_index for a single
|
|
407
|
+
request; this effectively ignores the host_index
|
|
408
|
+
in the spec for a single request.
|
|
409
|
+
:type _host_index: int, optional
|
|
410
|
+
:return: Returns the result object.
|
|
411
|
+
""" # noqa: E501
|
|
412
|
+
|
|
413
|
+
_param = self._get_old_minecraft_snapshots_serialize(
|
|
414
|
+
_request_auth=_request_auth,
|
|
415
|
+
_content_type=_content_type,
|
|
416
|
+
_headers=_headers,
|
|
417
|
+
_host_index=_host_index
|
|
418
|
+
)
|
|
419
|
+
|
|
420
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
421
|
+
'200': "OldSnapshotsManifest",
|
|
422
|
+
}
|
|
423
|
+
response_data = self.api_client.call_api(
|
|
424
|
+
*_param,
|
|
425
|
+
_request_timeout=_request_timeout
|
|
426
|
+
)
|
|
427
|
+
response_data.read()
|
|
428
|
+
return self.api_client.response_deserialize(
|
|
429
|
+
response_data=response_data,
|
|
430
|
+
response_types_map=_response_types_map,
|
|
431
|
+
)
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
@validate_call
|
|
435
|
+
def get_old_minecraft_snapshots_without_preload_content(
|
|
436
|
+
self,
|
|
437
|
+
_request_timeout: Union[
|
|
438
|
+
None,
|
|
439
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
440
|
+
Tuple[
|
|
441
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
442
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
443
|
+
]
|
|
444
|
+
] = None,
|
|
445
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
446
|
+
_content_type: Optional[StrictStr] = None,
|
|
447
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
448
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
449
|
+
) -> RESTResponseType:
|
|
450
|
+
"""Get old Minecraft snapshots manifest
|
|
451
|
+
|
|
452
|
+
Returns PrismLauncher's curated list of old Minecraft snapshots and pre-releases. Each entry includes the canonical Archive.org version JSON URL and the archived client JAR URL.
|
|
453
|
+
|
|
454
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
455
|
+
number provided, it will be total request
|
|
456
|
+
timeout. It can also be a pair (tuple) of
|
|
457
|
+
(connection, read) timeouts.
|
|
458
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
459
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
460
|
+
request; this effectively ignores the
|
|
461
|
+
authentication in the spec for a single request.
|
|
462
|
+
:type _request_auth: dict, optional
|
|
463
|
+
:param _content_type: force content-type for the request.
|
|
464
|
+
:type _content_type: str, Optional
|
|
465
|
+
:param _headers: set to override the headers for a single
|
|
466
|
+
request; this effectively ignores the headers
|
|
467
|
+
in the spec for a single request.
|
|
468
|
+
:type _headers: dict, optional
|
|
469
|
+
:param _host_index: set to override the host_index for a single
|
|
470
|
+
request; this effectively ignores the host_index
|
|
471
|
+
in the spec for a single request.
|
|
472
|
+
:type _host_index: int, optional
|
|
473
|
+
:return: Returns the result object.
|
|
474
|
+
""" # noqa: E501
|
|
475
|
+
|
|
476
|
+
_param = self._get_old_minecraft_snapshots_serialize(
|
|
477
|
+
_request_auth=_request_auth,
|
|
478
|
+
_content_type=_content_type,
|
|
479
|
+
_headers=_headers,
|
|
480
|
+
_host_index=_host_index
|
|
481
|
+
)
|
|
482
|
+
|
|
483
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
484
|
+
'200': "OldSnapshotsManifest",
|
|
485
|
+
}
|
|
486
|
+
response_data = self.api_client.call_api(
|
|
487
|
+
*_param,
|
|
488
|
+
_request_timeout=_request_timeout
|
|
489
|
+
)
|
|
490
|
+
return response_data.response
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
def _get_old_minecraft_snapshots_serialize(
|
|
494
|
+
self,
|
|
495
|
+
_request_auth,
|
|
496
|
+
_content_type,
|
|
497
|
+
_headers,
|
|
498
|
+
_host_index,
|
|
499
|
+
) -> RequestSerialized:
|
|
500
|
+
|
|
501
|
+
_host = None
|
|
502
|
+
|
|
503
|
+
_collection_formats: Dict[str, str] = {
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
_path_params: Dict[str, str] = {}
|
|
507
|
+
_query_params: List[Tuple[str, str]] = []
|
|
508
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
509
|
+
_form_params: List[Tuple[str, str]] = []
|
|
510
|
+
_files: Dict[
|
|
511
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
512
|
+
] = {}
|
|
513
|
+
_body_params: Optional[bytes] = None
|
|
514
|
+
|
|
515
|
+
# process the path parameters
|
|
516
|
+
# process the query parameters
|
|
517
|
+
# process the header parameters
|
|
518
|
+
# process the form parameters
|
|
519
|
+
# process the body parameter
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
# set the HTTP header `Accept`
|
|
523
|
+
if 'Accept' not in _header_params:
|
|
524
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
525
|
+
[
|
|
526
|
+
'application/json'
|
|
527
|
+
]
|
|
528
|
+
)
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
# authentication setting
|
|
532
|
+
_auth_settings: List[str] = [
|
|
533
|
+
]
|
|
534
|
+
|
|
535
|
+
return self.api_client.param_serialize(
|
|
536
|
+
method='GET',
|
|
537
|
+
resource_path='/PrismLauncher/meta/main/meta/common/mojang-minecraft-old-snapshots.json',
|
|
538
|
+
path_params=_path_params,
|
|
539
|
+
query_params=_query_params,
|
|
540
|
+
header_params=_header_params,
|
|
541
|
+
body=_body_params,
|
|
542
|
+
post_params=_form_params,
|
|
543
|
+
files=_files,
|
|
544
|
+
auth_settings=_auth_settings,
|
|
545
|
+
collection_formats=_collection_formats,
|
|
546
|
+
_host=_host,
|
|
547
|
+
_request_auth=_request_auth
|
|
548
|
+
)
|
|
549
|
+
|
|
550
|
+
|