p115client 0.0.5.11.9.1__py3-none-any.whl → 0.0.5.11.10__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.
- p115client/client.py +94 -1
- p115client/tool/upload.py +0 -1
- {p115client-0.0.5.11.9.1.dist-info → p115client-0.0.5.11.10.dist-info}/METADATA +1 -1
- {p115client-0.0.5.11.9.1.dist-info → p115client-0.0.5.11.10.dist-info}/RECORD +6 -6
- {p115client-0.0.5.11.9.1.dist-info → p115client-0.0.5.11.10.dist-info}/LICENSE +0 -0
- {p115client-0.0.5.11.9.1.dist-info → p115client-0.0.5.11.10.dist-info}/WHEEL +0 -0
p115client/client.py
CHANGED
@@ -14149,6 +14149,49 @@ class P115Client(P115OpenClient):
|
|
14149
14149
|
payload = {"file_id": 0, "user_asc": 1, "user_order": "user_ptime", **payload}
|
14150
14150
|
return self.request(url=api, method="POST", data=payload, async_=async_, **request_kwargs)
|
14151
14151
|
|
14152
|
+
@overload
|
14153
|
+
def fs_preview(
|
14154
|
+
self,
|
14155
|
+
payload: str | dict,
|
14156
|
+
/,
|
14157
|
+
base_url: bool | str | Callable[[], str] = False,
|
14158
|
+
*,
|
14159
|
+
async_: Literal[False] = False,
|
14160
|
+
**request_kwargs,
|
14161
|
+
) -> dict:
|
14162
|
+
...
|
14163
|
+
@overload
|
14164
|
+
def fs_preview(
|
14165
|
+
self,
|
14166
|
+
payload: str | dict,
|
14167
|
+
/,
|
14168
|
+
base_url: bool | str | Callable[[], str] = False,
|
14169
|
+
*,
|
14170
|
+
async_: Literal[True],
|
14171
|
+
**request_kwargs,
|
14172
|
+
) -> Coroutine[Any, Any, dict]:
|
14173
|
+
...
|
14174
|
+
def fs_preview(
|
14175
|
+
self,
|
14176
|
+
payload: str | dict,
|
14177
|
+
/,
|
14178
|
+
base_url: bool | str | Callable[[], str] = False,
|
14179
|
+
*,
|
14180
|
+
async_: Literal[False, True] = False,
|
14181
|
+
**request_kwargs,
|
14182
|
+
) -> dict | Coroutine[Any, Any, dict]:
|
14183
|
+
"""文档预览
|
14184
|
+
|
14185
|
+
POST https://webapi.115.com/files/preview
|
14186
|
+
|
14187
|
+
:payload:
|
14188
|
+
- pickcode: str 💡 提取码
|
14189
|
+
"""
|
14190
|
+
api = complete_webapi("/files/preview", base_url=base_url)
|
14191
|
+
if isinstance(payload, str):
|
14192
|
+
payload = {"pickcode": payload}
|
14193
|
+
return self.request(url=api, method="POST", data=payload, async_=async_, **request_kwargs)
|
14194
|
+
|
14152
14195
|
@overload
|
14153
14196
|
def fs_rename(
|
14154
14197
|
self,
|
@@ -18315,7 +18358,7 @@ class P115Client(P115OpenClient):
|
|
18315
18358
|
) -> dict | Coroutine[Any, Any, dict]:
|
18316
18359
|
"""删除一组离线任务(无论是否已经完成)
|
18317
18360
|
|
18318
|
-
POST https://lixian.115.com/
|
18361
|
+
POST https://lixian.115.com/lixian/?ac=task_del
|
18319
18362
|
|
18320
18363
|
:payload:
|
18321
18364
|
- hash[0]: str
|
@@ -18332,6 +18375,56 @@ class P115Client(P115OpenClient):
|
|
18332
18375
|
raise ValueError("no `hash` (info_hash) specified")
|
18333
18376
|
return self.request(api, method="POST", data=payload, async_=async_, **request_kwargs)
|
18334
18377
|
|
18378
|
+
@overload
|
18379
|
+
def offline_restart(
|
18380
|
+
self,
|
18381
|
+
payload: str | dict,
|
18382
|
+
/,
|
18383
|
+
base_url: None | bool | str | Callable[[], str] = None,
|
18384
|
+
method: str = "POST",
|
18385
|
+
*,
|
18386
|
+
async_: Literal[False] = False,
|
18387
|
+
**request_kwargs,
|
18388
|
+
) -> dict:
|
18389
|
+
...
|
18390
|
+
@overload
|
18391
|
+
def offline_restart(
|
18392
|
+
self,
|
18393
|
+
payload: str | dict,
|
18394
|
+
/,
|
18395
|
+
base_url: None | bool | str | Callable[[], str] = None,
|
18396
|
+
method: str = "POST",
|
18397
|
+
*,
|
18398
|
+
async_: Literal[True],
|
18399
|
+
**request_kwargs,
|
18400
|
+
) -> Coroutine[Any, Any, dict]:
|
18401
|
+
...
|
18402
|
+
def offline_restart(
|
18403
|
+
self,
|
18404
|
+
payload: str | dict,
|
18405
|
+
/,
|
18406
|
+
base_url: None | bool | str | Callable[[], str] = None,
|
18407
|
+
method: str = "POST",
|
18408
|
+
*,
|
18409
|
+
async_: Literal[False, True] = False,
|
18410
|
+
**request_kwargs,
|
18411
|
+
) -> dict | Coroutine[Any, Any, dict]:
|
18412
|
+
"""重试用户云下载任务
|
18413
|
+
|
18414
|
+
POST https://lixian.115.com/lixian/?ac=restart
|
18415
|
+
|
18416
|
+
:payload:
|
18417
|
+
- info_hash: str 💡 待重试任务的 info_hash
|
18418
|
+
"""
|
18419
|
+
api = complete_lixian_api("?ct=lixian&ac=restart", base_url=base_url)
|
18420
|
+
if isinstance(payload, str):
|
18421
|
+
payload = {"info_hash": payload}
|
18422
|
+
if method.upper() == "POST":
|
18423
|
+
request_kwargs["data"] = payload
|
18424
|
+
else:
|
18425
|
+
request_kwargs["params"] = payload
|
18426
|
+
return self.request(api, method=method, async_=async_, **request_kwargs)
|
18427
|
+
|
18335
18428
|
@overload
|
18336
18429
|
def offline_task_count(
|
18337
18430
|
self,
|
p115client/tool/upload.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
|
2
2
|
p115client/__init__.py,sha256=1mx7njuAlqcuEWONTjSiiGnXyyNyqOcJyNX1FMHqQ-4,214
|
3
3
|
p115client/_upload.py,sha256=3uXwgFsXkZ4X5hjL1N2mx0y8tA8MjVxe49N0BoyYyno,31253
|
4
|
-
p115client/client.py,sha256=
|
4
|
+
p115client/client.py,sha256=RmP5hmMX-qmEKP1ZA6hXRZqa3iGmF1djRQGk1ZfPox8,783893
|
5
5
|
p115client/const.py,sha256=KqDGr9KsOnSkNVM3RIdQGptCMHbidMmZ_ffyFPiniww,7654
|
6
6
|
p115client/exception.py,sha256=4SZ8ubOLMRxtcqc0u1kNzXqH1a6wwXJFwGnRDURoEgQ,3708
|
7
7
|
p115client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -17,11 +17,11 @@ p115client/tool/iterdir.py,sha256=dXBMPfxPzRcFhBpnBT3X1LYkhc3l31rYCLRKRFbggSk,20
|
|
17
17
|
p115client/tool/life.py,sha256=ceweN2uNKYxigSOaBQ4Abo5u05zqppRm_P7k-_rHjcA,17301
|
18
18
|
p115client/tool/pool.py,sha256=H65VhoNxQC6xWSL1THq_PximWnBOqB4EfU6kWBTAnlA,13946
|
19
19
|
p115client/tool/request.py,sha256=rjXuQwRganE5Z-4rfgnyPFjE4jzdQSLdIs9s0cIDshU,7043
|
20
|
-
p115client/tool/upload.py,sha256=
|
20
|
+
p115client/tool/upload.py,sha256=D2TPJlS--bGX-oHgTm6ktoqnX1_gwOMwxwMkiOwGuIY,32695
|
21
21
|
p115client/tool/util.py,sha256=pAa8gc4BcnVTpNcXbNZU4tBUMjSB04DGOpzDdzfbto8,3934
|
22
22
|
p115client/tool/xys.py,sha256=vU28Px2yeQzIxxGkopJIpvV6TdOnWJ5xB6NPXpTgM0Y,10306
|
23
23
|
p115client/type.py,sha256=7kOp98uLaYqcTTCgCrb3DRcl8ukMpn7ibsnVvtw2nG8,6250
|
24
|
-
p115client-0.0.5.11.
|
25
|
-
p115client-0.0.5.11.
|
26
|
-
p115client-0.0.5.11.
|
27
|
-
p115client-0.0.5.11.
|
24
|
+
p115client-0.0.5.11.10.dist-info/LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
|
25
|
+
p115client-0.0.5.11.10.dist-info/METADATA,sha256=4aN9NQjPAOoxtI4CTGRgFGjmB_Nia70kkV6EisvpNII,8193
|
26
|
+
p115client-0.0.5.11.10.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
27
|
+
p115client-0.0.5.11.10.dist-info/RECORD,,
|
File without changes
|
File without changes
|