bdpan-cli 0.1.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.
- bdpan_cli/__init__.py +15 -0
- bdpan_cli/_vendor/__init__.py +9 -0
- bdpan_cli/_vendor/openapi_client/__init__.py +27 -0
- bdpan_cli/_vendor/openapi_client/api/__init__.py +6 -0
- bdpan_cli/_vendor/openapi_client/api/auth_api.py +649 -0
- bdpan_cli/_vendor/openapi_client/api/fileinfo_api.py +737 -0
- bdpan_cli/_vendor/openapi_client/api/filemanager_api.py +669 -0
- bdpan_cli/_vendor/openapi_client/api/fileupload_api.py +599 -0
- bdpan_cli/_vendor/openapi_client/api/multimediafile_api.py +391 -0
- bdpan_cli/_vendor/openapi_client/api/userinfo_api.py +315 -0
- bdpan_cli/_vendor/openapi_client/api_client.py +864 -0
- bdpan_cli/_vendor/openapi_client/configuration.py +454 -0
- bdpan_cli/_vendor/openapi_client/exceptions.py +197 -0
- bdpan_cli/_vendor/openapi_client/model/__init__.py +5 -0
- bdpan_cli/_vendor/openapi_client/model/oauth_token_authorization_code_response.py +276 -0
- bdpan_cli/_vendor/openapi_client/model/oauth_token_device_code_response.py +276 -0
- bdpan_cli/_vendor/openapi_client/model/oauth_token_device_token_response.py +276 -0
- bdpan_cli/_vendor/openapi_client/model/oauth_token_refresh_token_response.py +276 -0
- bdpan_cli/_vendor/openapi_client/model/quotaresponse.py +276 -0
- bdpan_cli/_vendor/openapi_client/model/uinforesponse.py +284 -0
- bdpan_cli/_vendor/openapi_client/model_utils.py +2039 -0
- bdpan_cli/_vendor/openapi_client/rest.py +385 -0
- bdpan_cli/_version.py +3 -0
- bdpan_cli/account.py +78 -0
- bdpan_cli/apply_scrape_rename.py +99 -0
- bdpan_cli/auth.py +218 -0
- bdpan_cli/cli.py +1428 -0
- bdpan_cli/config.py +26 -0
- bdpan_cli/dedup.py +310 -0
- bdpan_cli/downloader.py +178 -0
- bdpan_cli/file_manager.py +389 -0
- bdpan_cli/foldering.py +181 -0
- bdpan_cli/logger.py +101 -0
- bdpan_cli/mcp_server.py +547 -0
- bdpan_cli/media_info.py +251 -0
- bdpan_cli/ops.py +173 -0
- bdpan_cli/organize.py +108 -0
- bdpan_cli/preview_scrape.py +182 -0
- bdpan_cli/scraper.py +505 -0
- bdpan_cli/uploader.py +391 -0
- bdpan_cli-0.1.0.dist-info/METADATA +167 -0
- bdpan_cli-0.1.0.dist-info/RECORD +44 -0
- bdpan_cli-0.1.0.dist-info/WHEEL +4 -0
- bdpan_cli-0.1.0.dist-info/entry_points.txt +5 -0
|
@@ -0,0 +1,599 @@
|
|
|
1
|
+
"""
|
|
2
|
+
xpan
|
|
3
|
+
|
|
4
|
+
xpanapi # noqa: E501
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.1
|
|
7
|
+
Generated by: https://openapi-generator.tech
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
import re # noqa: F401
|
|
12
|
+
import sys # noqa: F401
|
|
13
|
+
|
|
14
|
+
from bdpan_cli._vendor.openapi_client.api_client import ApiClient, Endpoint as _Endpoint
|
|
15
|
+
from bdpan_cli._vendor.openapi_client.model_utils import ( # noqa: F401
|
|
16
|
+
check_allowed_values,
|
|
17
|
+
check_validations,
|
|
18
|
+
date,
|
|
19
|
+
datetime,
|
|
20
|
+
file_type,
|
|
21
|
+
none_type,
|
|
22
|
+
validate_and_convert_types
|
|
23
|
+
)
|
|
24
|
+
# from bdpan_cli._vendor.openapi_client.model.filecreateresponse import Filecreateresponse
|
|
25
|
+
# from bdpan_cli._vendor.openapi_client.model.fileprecreateresponse import Fileprecreateresponse
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class FileuploadApi(object):
|
|
29
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
30
|
+
Ref: https://openapi-generator.tech
|
|
31
|
+
|
|
32
|
+
Do not edit the class manually.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
def __init__(self, api_client=None):
|
|
36
|
+
if api_client is None:
|
|
37
|
+
api_client = ApiClient()
|
|
38
|
+
self.api_client = api_client
|
|
39
|
+
self.pcssuperfile2_endpoint = _Endpoint(
|
|
40
|
+
settings={
|
|
41
|
+
'response_type': (dict,),
|
|
42
|
+
'auth': [],
|
|
43
|
+
'endpoint_path': '/rest/2.0/pcs/superfile2?method=upload&openapi=xpansdk',
|
|
44
|
+
'operation_id': 'pcssuperfile2',
|
|
45
|
+
'http_method': 'POST',
|
|
46
|
+
'servers': [
|
|
47
|
+
{
|
|
48
|
+
'url': "https://d.pcs.baidu.com",
|
|
49
|
+
'description': "No description provided",
|
|
50
|
+
},
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
params_map={
|
|
54
|
+
'all': [
|
|
55
|
+
'access_token',
|
|
56
|
+
'partseq',
|
|
57
|
+
'path',
|
|
58
|
+
'uploadid',
|
|
59
|
+
'type',
|
|
60
|
+
'file',
|
|
61
|
+
],
|
|
62
|
+
'required': [
|
|
63
|
+
'access_token',
|
|
64
|
+
'partseq',
|
|
65
|
+
'path',
|
|
66
|
+
'uploadid',
|
|
67
|
+
'type',
|
|
68
|
+
],
|
|
69
|
+
'nullable': [
|
|
70
|
+
],
|
|
71
|
+
'enum': [
|
|
72
|
+
],
|
|
73
|
+
'validation': [
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
root_map={
|
|
77
|
+
'validations': {
|
|
78
|
+
},
|
|
79
|
+
'allowed_values': {
|
|
80
|
+
},
|
|
81
|
+
'openapi_types': {
|
|
82
|
+
'access_token':
|
|
83
|
+
(str,),
|
|
84
|
+
'partseq':
|
|
85
|
+
(str,),
|
|
86
|
+
'path':
|
|
87
|
+
(str,),
|
|
88
|
+
'uploadid':
|
|
89
|
+
(str,),
|
|
90
|
+
'type':
|
|
91
|
+
(str,),
|
|
92
|
+
'file':
|
|
93
|
+
(file_type,),
|
|
94
|
+
},
|
|
95
|
+
'attribute_map': {
|
|
96
|
+
'access_token': 'access_token',
|
|
97
|
+
'partseq': 'partseq',
|
|
98
|
+
'path': 'path',
|
|
99
|
+
'uploadid': 'uploadid',
|
|
100
|
+
'type': 'type',
|
|
101
|
+
'file': 'file',
|
|
102
|
+
},
|
|
103
|
+
'location_map': {
|
|
104
|
+
'access_token': 'query',
|
|
105
|
+
'partseq': 'query',
|
|
106
|
+
'path': 'query',
|
|
107
|
+
'uploadid': 'query',
|
|
108
|
+
'type': 'query',
|
|
109
|
+
'file': 'form',
|
|
110
|
+
},
|
|
111
|
+
'collection_format_map': {
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
headers_map={
|
|
115
|
+
'accept': [
|
|
116
|
+
'text/html;charset=utf8'
|
|
117
|
+
],
|
|
118
|
+
'content_type': [
|
|
119
|
+
'multipart/form-data'
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
api_client=api_client
|
|
123
|
+
)
|
|
124
|
+
self.xpanfilecreate_endpoint = _Endpoint(
|
|
125
|
+
settings={
|
|
126
|
+
'response_type': (dict,),
|
|
127
|
+
'auth': [],
|
|
128
|
+
'endpoint_path': '/rest/2.0/xpan/file?method=create&openapi=xpansdk',
|
|
129
|
+
'operation_id': 'xpanfilecreate',
|
|
130
|
+
'http_method': 'POST',
|
|
131
|
+
'servers': [
|
|
132
|
+
{
|
|
133
|
+
'url': "https://pan.baidu.com",
|
|
134
|
+
'description': "No description provided",
|
|
135
|
+
},
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
params_map={
|
|
139
|
+
'all': [
|
|
140
|
+
'access_token',
|
|
141
|
+
'path',
|
|
142
|
+
'isdir',
|
|
143
|
+
'size',
|
|
144
|
+
'uploadid',
|
|
145
|
+
'block_list',
|
|
146
|
+
'rtype',
|
|
147
|
+
],
|
|
148
|
+
'required': [
|
|
149
|
+
'access_token',
|
|
150
|
+
'path',
|
|
151
|
+
'isdir',
|
|
152
|
+
'size',
|
|
153
|
+
'uploadid',
|
|
154
|
+
'block_list',
|
|
155
|
+
],
|
|
156
|
+
'nullable': [
|
|
157
|
+
],
|
|
158
|
+
'enum': [
|
|
159
|
+
],
|
|
160
|
+
'validation': [
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
root_map={
|
|
164
|
+
'validations': {
|
|
165
|
+
},
|
|
166
|
+
'allowed_values': {
|
|
167
|
+
},
|
|
168
|
+
'openapi_types': {
|
|
169
|
+
'access_token':
|
|
170
|
+
(str,),
|
|
171
|
+
'path':
|
|
172
|
+
(str,),
|
|
173
|
+
'isdir':
|
|
174
|
+
(int,),
|
|
175
|
+
'size':
|
|
176
|
+
(int,),
|
|
177
|
+
'uploadid':
|
|
178
|
+
(str,),
|
|
179
|
+
'block_list':
|
|
180
|
+
(str,),
|
|
181
|
+
'rtype':
|
|
182
|
+
(int,),
|
|
183
|
+
},
|
|
184
|
+
'attribute_map': {
|
|
185
|
+
'access_token': 'access_token',
|
|
186
|
+
'path': 'path',
|
|
187
|
+
'isdir': 'isdir',
|
|
188
|
+
'size': 'size',
|
|
189
|
+
'uploadid': 'uploadid',
|
|
190
|
+
'block_list': 'block_list',
|
|
191
|
+
'rtype': 'rtype',
|
|
192
|
+
},
|
|
193
|
+
'location_map': {
|
|
194
|
+
'access_token': 'query',
|
|
195
|
+
'path': 'form',
|
|
196
|
+
'isdir': 'form',
|
|
197
|
+
'size': 'form',
|
|
198
|
+
'uploadid': 'form',
|
|
199
|
+
'block_list': 'form',
|
|
200
|
+
'rtype': 'form',
|
|
201
|
+
},
|
|
202
|
+
'collection_format_map': {
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
headers_map={
|
|
206
|
+
'accept': [
|
|
207
|
+
'application/json; charset=UTF-8'
|
|
208
|
+
],
|
|
209
|
+
'content_type': [
|
|
210
|
+
'application/x-www-form-urlencoded'
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
api_client=api_client
|
|
214
|
+
)
|
|
215
|
+
self.xpanfileprecreate_endpoint = _Endpoint(
|
|
216
|
+
settings={
|
|
217
|
+
'response_type': (dict,),
|
|
218
|
+
'auth': [],
|
|
219
|
+
'endpoint_path': '/rest/2.0/xpan/file?method=precreate&openapi=xpansdk',
|
|
220
|
+
'operation_id': 'xpanfileprecreate',
|
|
221
|
+
'http_method': 'POST',
|
|
222
|
+
'servers': [
|
|
223
|
+
{
|
|
224
|
+
'url': "https://pan.baidu.com",
|
|
225
|
+
'description': "No description provided",
|
|
226
|
+
},
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
params_map={
|
|
230
|
+
'all': [
|
|
231
|
+
'access_token',
|
|
232
|
+
'path',
|
|
233
|
+
'isdir',
|
|
234
|
+
'size',
|
|
235
|
+
'autoinit',
|
|
236
|
+
'block_list',
|
|
237
|
+
'rtype',
|
|
238
|
+
],
|
|
239
|
+
'required': [
|
|
240
|
+
'access_token',
|
|
241
|
+
'path',
|
|
242
|
+
'isdir',
|
|
243
|
+
'size',
|
|
244
|
+
'autoinit',
|
|
245
|
+
'block_list',
|
|
246
|
+
],
|
|
247
|
+
'nullable': [
|
|
248
|
+
],
|
|
249
|
+
'enum': [
|
|
250
|
+
],
|
|
251
|
+
'validation': [
|
|
252
|
+
]
|
|
253
|
+
},
|
|
254
|
+
root_map={
|
|
255
|
+
'validations': {
|
|
256
|
+
},
|
|
257
|
+
'allowed_values': {
|
|
258
|
+
},
|
|
259
|
+
'openapi_types': {
|
|
260
|
+
'access_token':
|
|
261
|
+
(str,),
|
|
262
|
+
'path':
|
|
263
|
+
(str,),
|
|
264
|
+
'isdir':
|
|
265
|
+
(int,),
|
|
266
|
+
'size':
|
|
267
|
+
(int,),
|
|
268
|
+
'autoinit':
|
|
269
|
+
(int,),
|
|
270
|
+
'block_list':
|
|
271
|
+
(str,),
|
|
272
|
+
'rtype':
|
|
273
|
+
(int,),
|
|
274
|
+
},
|
|
275
|
+
'attribute_map': {
|
|
276
|
+
'access_token': 'access_token',
|
|
277
|
+
'path': 'path',
|
|
278
|
+
'isdir': 'isdir',
|
|
279
|
+
'size': 'size',
|
|
280
|
+
'autoinit': 'autoinit',
|
|
281
|
+
'block_list': 'block_list',
|
|
282
|
+
'rtype': 'rtype',
|
|
283
|
+
},
|
|
284
|
+
'location_map': {
|
|
285
|
+
'access_token': 'query',
|
|
286
|
+
'path': 'form',
|
|
287
|
+
'isdir': 'form',
|
|
288
|
+
'size': 'form',
|
|
289
|
+
'autoinit': 'form',
|
|
290
|
+
'block_list': 'form',
|
|
291
|
+
'rtype': 'form',
|
|
292
|
+
},
|
|
293
|
+
'collection_format_map': {
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
headers_map={
|
|
297
|
+
'accept': [
|
|
298
|
+
'application/json; charset=UTF-8'
|
|
299
|
+
],
|
|
300
|
+
'content_type': [
|
|
301
|
+
'application/x-www-form-urlencoded'
|
|
302
|
+
]
|
|
303
|
+
},
|
|
304
|
+
api_client=api_client
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
def pcssuperfile2(
|
|
308
|
+
self,
|
|
309
|
+
access_token,
|
|
310
|
+
partseq,
|
|
311
|
+
path,
|
|
312
|
+
uploadid,
|
|
313
|
+
type,
|
|
314
|
+
**kwargs
|
|
315
|
+
):
|
|
316
|
+
"""pcssuperfile2 # noqa: E501
|
|
317
|
+
|
|
318
|
+
分片上传,这里是实际的文件内容传送部分。一般多为大于4MB的文件,需将文件以4MB为单位切分,对切分后得到的n个分片一一调用该接口进行传送,以实现对原文件的传送(当然若不大于4MB,则直接该对文件进行传送即可)。 # noqa: E501
|
|
319
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
320
|
+
asynchronous HTTP request, please pass async_req=True
|
|
321
|
+
|
|
322
|
+
>>> thread = api.pcssuperfile2(access_token, partseq, path, uploadid, type, async_req=True)
|
|
323
|
+
>>> result = thread.get()
|
|
324
|
+
|
|
325
|
+
Args:
|
|
326
|
+
access_token (str):
|
|
327
|
+
partseq (str):
|
|
328
|
+
path (str):
|
|
329
|
+
uploadid (str):
|
|
330
|
+
type (str):
|
|
331
|
+
|
|
332
|
+
Keyword Args:
|
|
333
|
+
file (file_type): 要进行传送的本地文件分片. [optional]
|
|
334
|
+
_return_http_data_only (bool): response data without head status
|
|
335
|
+
code and headers. Default is True.
|
|
336
|
+
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
337
|
+
will be returned without reading/decoding response data.
|
|
338
|
+
Default is True.
|
|
339
|
+
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
340
|
+
one number provided, it will be total request timeout. It can also
|
|
341
|
+
be a pair (tuple) of (connection, read) timeouts.
|
|
342
|
+
Default is None.
|
|
343
|
+
_check_input_type (bool): specifies if type checking
|
|
344
|
+
should be done one the data sent to the server.
|
|
345
|
+
Default is True.
|
|
346
|
+
_check_return_type (bool): specifies if type checking
|
|
347
|
+
should be done one the data received from the server.
|
|
348
|
+
Default is True.
|
|
349
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
350
|
+
are serialized names, as specified in the OpenAPI document.
|
|
351
|
+
False if the variable names in the input data
|
|
352
|
+
are pythonic names, e.g. snake case (default)
|
|
353
|
+
_content_type (str/None): force body content-type.
|
|
354
|
+
Default is None and content-type will be predicted by allowed
|
|
355
|
+
content-types and body.
|
|
356
|
+
_host_index (int/None): specifies the index of the server
|
|
357
|
+
that we want to use.
|
|
358
|
+
Default is read from the configuration.
|
|
359
|
+
async_req (bool): execute request asynchronously
|
|
360
|
+
|
|
361
|
+
Returns:
|
|
362
|
+
str
|
|
363
|
+
If the method is called asynchronously, returns the request
|
|
364
|
+
thread.
|
|
365
|
+
"""
|
|
366
|
+
kwargs['async_req'] = kwargs.get(
|
|
367
|
+
'async_req', False
|
|
368
|
+
)
|
|
369
|
+
kwargs['_return_http_data_only'] = kwargs.get(
|
|
370
|
+
'_return_http_data_only', True
|
|
371
|
+
)
|
|
372
|
+
kwargs['_preload_content'] = kwargs.get(
|
|
373
|
+
'_preload_content', True
|
|
374
|
+
)
|
|
375
|
+
kwargs['_request_timeout'] = kwargs.get(
|
|
376
|
+
'_request_timeout', None
|
|
377
|
+
)
|
|
378
|
+
kwargs['_check_input_type'] = kwargs.get(
|
|
379
|
+
'_check_input_type', True
|
|
380
|
+
)
|
|
381
|
+
kwargs['_check_return_type'] = kwargs.get(
|
|
382
|
+
'_check_return_type', True
|
|
383
|
+
)
|
|
384
|
+
kwargs['_spec_property_naming'] = kwargs.get(
|
|
385
|
+
'_spec_property_naming', False
|
|
386
|
+
)
|
|
387
|
+
kwargs['_content_type'] = kwargs.get(
|
|
388
|
+
'_content_type')
|
|
389
|
+
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
390
|
+
kwargs['access_token'] = \
|
|
391
|
+
access_token
|
|
392
|
+
kwargs['partseq'] = \
|
|
393
|
+
partseq
|
|
394
|
+
kwargs['path'] = \
|
|
395
|
+
path
|
|
396
|
+
kwargs['uploadid'] = \
|
|
397
|
+
uploadid
|
|
398
|
+
kwargs['type'] = \
|
|
399
|
+
type
|
|
400
|
+
return self.pcssuperfile2_endpoint.call_with_http_info(**kwargs)
|
|
401
|
+
|
|
402
|
+
def xpanfilecreate(
|
|
403
|
+
self,
|
|
404
|
+
access_token,
|
|
405
|
+
path,
|
|
406
|
+
isdir,
|
|
407
|
+
size,
|
|
408
|
+
uploadid,
|
|
409
|
+
block_list,
|
|
410
|
+
**kwargs
|
|
411
|
+
):
|
|
412
|
+
"""xpanfilecreate # noqa: E501
|
|
413
|
+
|
|
414
|
+
将多个文件分片合并成一个文件,生成文件基本信息,完成文件的上传最后一步。 # noqa: E501
|
|
415
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
416
|
+
asynchronous HTTP request, please pass async_req=True
|
|
417
|
+
|
|
418
|
+
>>> thread = api.xpanfilecreate(access_token, path, isdir, size, uploadid, block_list, async_req=True)
|
|
419
|
+
>>> result = thread.get()
|
|
420
|
+
|
|
421
|
+
Args:
|
|
422
|
+
access_token (str):
|
|
423
|
+
path (str): 与precreate的path值保持一致
|
|
424
|
+
isdir (int): isdir
|
|
425
|
+
size (int): 与precreate的size值保持一致
|
|
426
|
+
uploadid (str): precreate返回的uploadid
|
|
427
|
+
block_list (str): 与precreate的block_list值保持一致
|
|
428
|
+
|
|
429
|
+
Keyword Args:
|
|
430
|
+
rtype (int): rtype. [optional]
|
|
431
|
+
_return_http_data_only (bool): response data without head status
|
|
432
|
+
code and headers. Default is True.
|
|
433
|
+
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
434
|
+
will be returned without reading/decoding response data.
|
|
435
|
+
Default is True.
|
|
436
|
+
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
437
|
+
one number provided, it will be total request timeout. It can also
|
|
438
|
+
be a pair (tuple) of (connection, read) timeouts.
|
|
439
|
+
Default is None.
|
|
440
|
+
_check_input_type (bool): specifies if type checking
|
|
441
|
+
should be done one the data sent to the server.
|
|
442
|
+
Default is True.
|
|
443
|
+
_check_return_type (bool): specifies if type checking
|
|
444
|
+
should be done one the data received from the server.
|
|
445
|
+
Default is True.
|
|
446
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
447
|
+
are serialized names, as specified in the OpenAPI document.
|
|
448
|
+
False if the variable names in the input data
|
|
449
|
+
are pythonic names, e.g. snake case (default)
|
|
450
|
+
_content_type (str/None): force body content-type.
|
|
451
|
+
Default is None and content-type will be predicted by allowed
|
|
452
|
+
content-types and body.
|
|
453
|
+
_host_index (int/None): specifies the index of the server
|
|
454
|
+
that we want to use.
|
|
455
|
+
Default is read from the configuration.
|
|
456
|
+
async_req (bool): execute request asynchronously
|
|
457
|
+
|
|
458
|
+
Returns:
|
|
459
|
+
Filecreateresponse
|
|
460
|
+
If the method is called asynchronously, returns the request
|
|
461
|
+
thread.
|
|
462
|
+
"""
|
|
463
|
+
kwargs['async_req'] = kwargs.get(
|
|
464
|
+
'async_req', False
|
|
465
|
+
)
|
|
466
|
+
kwargs['_return_http_data_only'] = kwargs.get(
|
|
467
|
+
'_return_http_data_only', True
|
|
468
|
+
)
|
|
469
|
+
kwargs['_preload_content'] = kwargs.get(
|
|
470
|
+
'_preload_content', True
|
|
471
|
+
)
|
|
472
|
+
kwargs['_request_timeout'] = kwargs.get(
|
|
473
|
+
'_request_timeout', None
|
|
474
|
+
)
|
|
475
|
+
kwargs['_check_input_type'] = kwargs.get(
|
|
476
|
+
'_check_input_type', True
|
|
477
|
+
)
|
|
478
|
+
kwargs['_check_return_type'] = kwargs.get(
|
|
479
|
+
'_check_return_type', True
|
|
480
|
+
)
|
|
481
|
+
kwargs['_spec_property_naming'] = kwargs.get(
|
|
482
|
+
'_spec_property_naming', False
|
|
483
|
+
)
|
|
484
|
+
kwargs['_content_type'] = kwargs.get(
|
|
485
|
+
'_content_type')
|
|
486
|
+
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
487
|
+
kwargs['access_token'] = \
|
|
488
|
+
access_token
|
|
489
|
+
kwargs['path'] = \
|
|
490
|
+
path
|
|
491
|
+
kwargs['isdir'] = \
|
|
492
|
+
isdir
|
|
493
|
+
kwargs['size'] = \
|
|
494
|
+
size
|
|
495
|
+
kwargs['uploadid'] = \
|
|
496
|
+
uploadid
|
|
497
|
+
kwargs['block_list'] = \
|
|
498
|
+
block_list
|
|
499
|
+
return self.xpanfilecreate_endpoint.call_with_http_info(**kwargs)
|
|
500
|
+
|
|
501
|
+
def xpanfileprecreate(
|
|
502
|
+
self,
|
|
503
|
+
access_token,
|
|
504
|
+
path,
|
|
505
|
+
isdir,
|
|
506
|
+
size,
|
|
507
|
+
autoinit,
|
|
508
|
+
block_list,
|
|
509
|
+
**kwargs
|
|
510
|
+
):
|
|
511
|
+
"""xpanfileprecreate # noqa: E501
|
|
512
|
+
|
|
513
|
+
文件预上传,用于获取上传任务id,既uploadid # noqa: E501
|
|
514
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
515
|
+
asynchronous HTTP request, please pass async_req=True
|
|
516
|
+
|
|
517
|
+
>>> thread = api.xpanfileprecreate(access_token, path, isdir, size, autoinit, block_list, async_req=True)
|
|
518
|
+
>>> result = thread.get()
|
|
519
|
+
|
|
520
|
+
Args:
|
|
521
|
+
access_token (str):
|
|
522
|
+
path (str): 对于一般的第三方软件应用,路径以 \\\"/apps/your-app-name/\\\" 开头。对于小度等硬件应用,路径一般 \\\"/来自:小度设备/\\\" 开头。对于定制化配置的硬件应用,根据配置情况进行填写。
|
|
523
|
+
isdir (int): isdir
|
|
524
|
+
size (int): size
|
|
525
|
+
autoinit (int): autoinit
|
|
526
|
+
block_list (str): 由MD5字符串组成的list
|
|
527
|
+
|
|
528
|
+
Keyword Args:
|
|
529
|
+
rtype (int): rtype. [optional]
|
|
530
|
+
_return_http_data_only (bool): response data without head status
|
|
531
|
+
code and headers. Default is True.
|
|
532
|
+
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
533
|
+
will be returned without reading/decoding response data.
|
|
534
|
+
Default is True.
|
|
535
|
+
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
536
|
+
one number provided, it will be total request timeout. It can also
|
|
537
|
+
be a pair (tuple) of (connection, read) timeouts.
|
|
538
|
+
Default is None.
|
|
539
|
+
_check_input_type (bool): specifies if type checking
|
|
540
|
+
should be done one the data sent to the server.
|
|
541
|
+
Default is True.
|
|
542
|
+
_check_return_type (bool): specifies if type checking
|
|
543
|
+
should be done one the data received from the server.
|
|
544
|
+
Default is True.
|
|
545
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
546
|
+
are serialized names, as specified in the OpenAPI document.
|
|
547
|
+
False if the variable names in the input data
|
|
548
|
+
are pythonic names, e.g. snake case (default)
|
|
549
|
+
_content_type (str/None): force body content-type.
|
|
550
|
+
Default is None and content-type will be predicted by allowed
|
|
551
|
+
content-types and body.
|
|
552
|
+
_host_index (int/None): specifies the index of the server
|
|
553
|
+
that we want to use.
|
|
554
|
+
Default is read from the configuration.
|
|
555
|
+
async_req (bool): execute request asynchronously
|
|
556
|
+
|
|
557
|
+
Returns:
|
|
558
|
+
Fileprecreateresponse
|
|
559
|
+
If the method is called asynchronously, returns the request
|
|
560
|
+
thread.
|
|
561
|
+
"""
|
|
562
|
+
kwargs['async_req'] = kwargs.get(
|
|
563
|
+
'async_req', False
|
|
564
|
+
)
|
|
565
|
+
kwargs['_return_http_data_only'] = kwargs.get(
|
|
566
|
+
'_return_http_data_only', True
|
|
567
|
+
)
|
|
568
|
+
kwargs['_preload_content'] = kwargs.get(
|
|
569
|
+
'_preload_content', True
|
|
570
|
+
)
|
|
571
|
+
kwargs['_request_timeout'] = kwargs.get(
|
|
572
|
+
'_request_timeout', None
|
|
573
|
+
)
|
|
574
|
+
kwargs['_check_input_type'] = kwargs.get(
|
|
575
|
+
'_check_input_type', True
|
|
576
|
+
)
|
|
577
|
+
kwargs['_check_return_type'] = kwargs.get(
|
|
578
|
+
'_check_return_type', True
|
|
579
|
+
)
|
|
580
|
+
kwargs['_spec_property_naming'] = kwargs.get(
|
|
581
|
+
'_spec_property_naming', False
|
|
582
|
+
)
|
|
583
|
+
kwargs['_content_type'] = kwargs.get(
|
|
584
|
+
'_content_type')
|
|
585
|
+
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
586
|
+
kwargs['access_token'] = \
|
|
587
|
+
access_token
|
|
588
|
+
kwargs['path'] = \
|
|
589
|
+
path
|
|
590
|
+
kwargs['isdir'] = \
|
|
591
|
+
isdir
|
|
592
|
+
kwargs['size'] = \
|
|
593
|
+
size
|
|
594
|
+
kwargs['autoinit'] = \
|
|
595
|
+
autoinit
|
|
596
|
+
kwargs['block_list'] = \
|
|
597
|
+
block_list
|
|
598
|
+
return self.xpanfileprecreate_endpoint.call_with_http_info(**kwargs)
|
|
599
|
+
|