mcsmapi 0.1.5b2__py3-none-any.whl → 0.1.6__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.
mcsmapi/apis/daemon.py CHANGED
@@ -31,32 +31,6 @@ class Daemon:
31
31
  f"{ApiPool.SERVICE}/remote_services_system",
32
32
  )
33
33
  return [DaemonModel(**daemon) for daemon in daemons]
34
-
35
- def instances(self, daemonId: str, page: int = 0, page_size: int = 10, instance_name: str = "", status: int = 0, tag: list[str] | None = None) -> list[InstanceDetail]:
36
- """
37
- 查询指定节点下的实例详细信息
38
-
39
- 参数:
40
- - `daemonId` (str): 要查询的守护进程(Daemon)的唯一标识符。
41
- - `page` (int, 默认=0): 分页查询的页码(从 0 开始)。
42
- - `page_size` (int, 默认=10): 每页返回的实例数量。
43
- - `instance_name` (str, 默认=""): 过滤指定名称的实例。
44
- - `status` (int, 默认=0): 过滤指定状态的实例,如运行中、已停止等。
45
- - `tag` (List[str] | None, 默认=None): 根据标签筛选实例(可选参数)。
46
-
47
- 返回:
48
- - `List[InstanceDetail]`: 包含实例详细信息的列表。
49
-
50
- 注意:
51
- - 此方法尚未实现 (`raise RuntimeError`),因为 MCSM 官方文档未提供足够的信息。
52
- - 由于根据 MCSM 源代码的测试无法获取有效数据,目前无法完成该功能的开发。
53
- - 如果你有具体的实现思路,请在 issue 中提出
54
- - 可供参考 MCSM 源码: [daemon_router.ts 第 32 行](https://github.com/MCSManager/MCSManager/blob/master/panel%2Fsrc%2Fapp%2Frouters%2Fdaemon_router.ts#L32-L32)
55
- - 模型定义代码: https://github.com/MCSManager/MCSManager/blob/master/frontend%2Fsrc%2Fservices%2Fapis%2Findex.ts#L86-L86
56
- - 测试地址示例:
57
- `http://localhost:23333/api/service/remote_service_instances?apikey=xxx&daemonId=xxx&page=0&page_size=10&status=3&instance_name=`
58
- """
59
- raise RuntimeError("此方法尚未实现")
60
34
 
61
35
  def add(self, config: dict[str, Any]) -> str:
62
36
  """
mcsmapi/apis/instance.py CHANGED
@@ -229,7 +229,7 @@ class Instance:
229
229
  - bool: 返回操作结果,成功时返回True。
230
230
  """
231
231
  return send(
232
- "GET",
232
+ "POST",
233
233
  f"{ApiPool.PROTECTED_INSTANCE}/asynchronous",
234
234
  params={"daemonId": daemonId, "uuid": uuid, "task_name": "update"},
235
235
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcsmapi
3
- Version: 0.1.5b2
3
+ Version: 0.1.6
4
4
  Summary: Shortcut the pypi package of MCSM./快捷操作MCSM的pypi包
5
5
  Author-email: molanp <molanpp@outlook.com>
6
6
  License-Expression: MIT
@@ -26,7 +26,13 @@ English|[Chinese Simplified](README_zh-cn.md)
26
26
 
27
27
  ## Documentation
28
28
 
29
- The documentation is not yet complete, if you need it, please visit [https://deepwiki.com/molanp/mcsmapi](https://deepwiki.com/molanp/mcsmapi)
29
+ The documentation is not yet complete, if you need it, please visit [deepwiki-mcsmapi](https://deepwiki.com/molanp/mcsmapi)
30
+
31
+ You can also find:
32
+
33
+ 📄 Work-in-progress docs: [docs](docs)
34
+
35
+ 💡 Example: [example](example)
30
36
 
31
37
  ## Introduction
32
38
 
@@ -43,7 +49,7 @@ pip install mcsmapi
43
49
  ```
44
50
 
45
51
  If you need the latest build files (untested), please visit
46
- [Actions](https://github.com/molanp/mcsmapi/actions)
52
+ [Actions](https://github.com/molanp/mcsmapi/actions/workflows/auto-build.yml)
47
53
 
48
54
  ## Supported Features
49
55
 
@@ -3,10 +3,10 @@ mcsmapi/exceptions.py,sha256=mHsAHyoX9SiFDGBMEhesA_ao9hhZZ38EGTp97K7VDp8,184
3
3
  mcsmapi/pool.py,sha256=CoOYbyECp4FoXkzwFN7WgtS3vgZtvWO8e93i18vhOEI,308
4
4
  mcsmapi/request.py,sha256=5mCzKgrh4OPFKvBo22kIDpX_D1zqCza1nglYUeGWveg,2618
5
5
  mcsmapi/apis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- mcsmapi/apis/daemon.py,sha256=2Se5ViwaePg6_CGI9qKeI823FMF0qzlemn2yCt92SPs,4488
6
+ mcsmapi/apis/daemon.py,sha256=9jWoygFuACVJVn6fdt42tMWB3Nca2mZuoKcMs-p4_ic,2768
7
7
  mcsmapi/apis/file.py,sha256=Qh3kOtU2mj9PS2nN4s6WufZ149pM0sbkM37aG-LlY5A,10778
8
8
  mcsmapi/apis/image.py,sha256=UwVH2LPfPBEADZuoSyyiMrlEc9LL858Z3oidRPaKrvs,2908
9
- mcsmapi/apis/instance.py,sha256=zibACXlhsMAWW5QjvGCFO5iN0wNEVlnecdnFvLeQTUg,10986
9
+ mcsmapi/apis/instance.py,sha256=tucZTLuad8EF4I7GQHUjuLXWyW56ab8EGNh0_ntnwio,10987
10
10
  mcsmapi/apis/overview.py,sha256=4bS3RGSykdQ1JyBTM-I9na6v0SCijEG1CN-WxqabfUo,625
11
11
  mcsmapi/apis/user.py,sha256=CBLNWxxNfvnmzoMa1YV3Q33POitYDGyN-hRORoe2JEc,2968
12
12
  mcsmapi/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -16,8 +16,8 @@ mcsmapi/models/image.py,sha256=pjwSJ79rYMuDTLlazevpjqdnnc0Mqvea9bp-BepUhio,5484
16
16
  mcsmapi/models/instance.py,sha256=oNXw0q3FDTu2bG_crWPgUtLXxM2yL7eRwo9H2RFzmDA,8850
17
17
  mcsmapi/models/overview.py,sha256=yRERCPRA3vBceKjISBClngvmKaQlo0HowC859nm15Nc,2859
18
18
  mcsmapi/models/user.py,sha256=sduOS8MWoxUfvTseK7nShuBOYzei3dEM8eP45PuIZ3g,3130
19
- mcsmapi-0.1.5b2.dist-info/licenses/LICENSE,sha256=bMKDPsvaybvY-4TTlSZtCXPPtxb7KPpDVqXgDA8Ogo0,1068
20
- mcsmapi-0.1.5b2.dist-info/METADATA,sha256=IFV6TW-2aLuZydebLlPN1mSRbzsFCtRpRAbWa7kaDlc,2805
21
- mcsmapi-0.1.5b2.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
22
- mcsmapi-0.1.5b2.dist-info/top_level.txt,sha256=8MUYHd1Or4cbSCd93IaqLA72w0weEuKieopVwIfVlWo,8
23
- mcsmapi-0.1.5b2.dist-info/RECORD,,
19
+ mcsmapi-0.1.6.dist-info/licenses/LICENSE,sha256=bMKDPsvaybvY-4TTlSZtCXPPtxb7KPpDVqXgDA8Ogo0,1068
20
+ mcsmapi-0.1.6.dist-info/METADATA,sha256=38r0EmlPzaYNExFWAyCkr4f_NIE-wjANeVwjBUT1vNY,2907
21
+ mcsmapi-0.1.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
+ mcsmapi-0.1.6.dist-info/top_level.txt,sha256=8MUYHd1Or4cbSCd93IaqLA72w0weEuKieopVwIfVlWo,8
23
+ mcsmapi-0.1.6.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.4.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5