p123client 0.0.7.1__py3-none-any.whl → 0.0.7.1.1__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.
p123client/client.py CHANGED
@@ -8583,6 +8583,7 @@ class P123Client(P123OpenClient):
8583
8583
  self,
8584
8584
  payload: dict | Iterable[dict],
8585
8585
  /,
8586
+ upload_dir: None | int | str = None,
8586
8587
  base_url: str | Callable[[], str] = DEFAULT_BASE_URL,
8587
8588
  *,
8588
8589
  async_: Literal[False] = False,
@@ -8594,6 +8595,7 @@ class P123Client(P123OpenClient):
8594
8595
  self,
8595
8596
  payload: dict | Iterable[dict],
8596
8597
  /,
8598
+ upload_dir: None | int | str = None,
8597
8599
  base_url: str | Callable[[], str] = DEFAULT_BASE_URL,
8598
8600
  *,
8599
8601
  async_: Literal[True],
@@ -8604,6 +8606,7 @@ class P123Client(P123OpenClient):
8604
8606
  self,
8605
8607
  payload: dict | Iterable[dict],
8606
8608
  /,
8609
+ upload_dir: None | int | str = None,
8607
8610
  base_url: str | Callable[[], str] = DEFAULT_BASE_URL,
8608
8611
  *,
8609
8612
  async_: Literal[False, True] = False,
@@ -8644,6 +8647,9 @@ class P123Client(P123OpenClient):
8644
8647
  "select_file_id": [info["id"] for info in resource["files"]],
8645
8648
  } for resource in payload]
8646
8649
  }
8650
+ payload = cast(dict, payload)
8651
+ if upload_dir is not None:
8652
+ payload["upload_dir"] = upload_dir
8647
8653
  return self.request(
8648
8654
  "v2/offline_download/task/submit",
8649
8655
  "POST",
@@ -8706,6 +8712,7 @@ class P123Client(P123OpenClient):
8706
8712
  self,
8707
8713
  /,
8708
8714
  url: str | Iterable[str],
8715
+ upload_dir: None | int | str = None,
8709
8716
  base_url: str | Callable[[], str] = DEFAULT_BASE_URL,
8710
8717
  *,
8711
8718
  async_: Literal[False] = False,
@@ -8717,6 +8724,7 @@ class P123Client(P123OpenClient):
8717
8724
  self,
8718
8725
  /,
8719
8726
  url: str | Iterable[str],
8727
+ upload_dir: None | int | str = None,
8720
8728
  base_url: str | Callable[[], str] = DEFAULT_BASE_URL,
8721
8729
  *,
8722
8730
  async_: Literal[True],
@@ -8727,6 +8735,7 @@ class P123Client(P123OpenClient):
8727
8735
  self,
8728
8736
  /,
8729
8737
  url: str | Iterable[str],
8738
+ upload_dir: None | int | str = None,
8730
8739
  base_url: str | Callable[[], str] = DEFAULT_BASE_URL,
8731
8740
  *,
8732
8741
  async_: Literal[False, True] = False,
@@ -8737,6 +8746,7 @@ class P123Client(P123OpenClient):
8737
8746
  POST https://www.123pan.com/api/offline_download/upload/seed
8738
8747
 
8739
8748
  :param url: info_hash(只允许单个)、下载链接(多个用 "\n" 分隔)或者多个下载链接的迭代器
8749
+ :param upload_dir: 保存到目录的 id
8740
8750
  :param base_url: API 链接的基地址
8741
8751
  :param async_: 是否异步
8742
8752
  :param request_kwargs: 其它请求参数
@@ -8760,6 +8770,7 @@ class P123Client(P123OpenClient):
8760
8770
  check_response(resp)
8761
8771
  return self.offline_task_submit(
8762
8772
  resp["data"]["list"],
8773
+ upload_dir,
8763
8774
  base_url=base_url,
8764
8775
  async_=async_,
8765
8776
  **request_kwargs,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: p123client
3
- Version: 0.0.7.1
3
+ Version: 0.0.7.1.1
4
4
  Summary: Python 123 webdisk client.
5
5
  Home-page: https://github.com/ChenyangGao/p123client
6
6
  License: MIT
@@ -1,12 +1,12 @@
1
1
  LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
2
2
  p123client/__init__.py,sha256=lcTiBpyNHH1HN4f1ueacumxkaahBNOUyvNA172UtSOU,214
3
- p123client/client.py,sha256=RK74Lrxldx7d2dDbLZlexsq6gPKRisR6A08yqC_DY2E,349673
3
+ p123client/client.py,sha256=CKSDmL8trU1yfwDL82heSjrX3AoY-gZygWkTk9SsGq8,350147
4
4
  p123client/const.py,sha256=UYfBrgciCz7RJJPqCX6zwWlMoWiaTUwUU8bpFJyh0sM,348
5
5
  p123client/exception.py,sha256=Vn2UlJulY63z3cF7bnTjMlZ6og7gCw1pAA-dswFwKpQ,3174
6
6
  p123client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  p123client/tool/__init__.py,sha256=hnOwkk1CKk1CLGlhl6hlUl3BWNdqXdy8sWKXAGmOXHE,18812
8
8
  p123client/type.py,sha256=T17OzPQrnIG6w_Hzjc8TF_fFMKa-hQMSn1gff8pVcBc,56
9
- p123client-0.0.7.1.dist-info/LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
10
- p123client-0.0.7.1.dist-info/METADATA,sha256=FGry4TF8zhNXf_IiPewQY919FeymlN4vftG-D_R8vCE,14657
11
- p123client-0.0.7.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
12
- p123client-0.0.7.1.dist-info/RECORD,,
9
+ p123client-0.0.7.1.1.dist-info/LICENSE,sha256=o5242_N2TgDsWwFhPn7yr8YJNF7XsJM5NxUMtcT97bc,1100
10
+ p123client-0.0.7.1.1.dist-info/METADATA,sha256=VNfTXL5NiNYWPEH4yLM-Fd7s0QgR1K_b869rQM8E3_4,14659
11
+ p123client-0.0.7.1.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
12
+ p123client-0.0.7.1.1.dist-info/RECORD,,