mirror of
https://github.com/thsrite/MoviePilot-Plugins.git
synced 2026-03-27 10:05:57 +00:00
fix CloudDrive2助手支持HomePage自定义API
This commit is contained in:
46
docs/Cd2Assistant.md
Normal file
46
docs/Cd2Assistant.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# CloudDriver HomePage自定义API
|
||||
|
||||

|
||||
|
||||
HomePage services.yaml配置
|
||||
```angular2html
|
||||
- CloudDrive2:
|
||||
icon: /icons/icon/clouddrive.png
|
||||
href: http://cd2ip:cd2端口/
|
||||
ping: http://cd2ip:cd2端口
|
||||
#server: unraid
|
||||
#container: CloudDrive
|
||||
showStats: true
|
||||
display: list
|
||||
widget:
|
||||
type: customapi
|
||||
url: http://mp_ip:mp_port/api/v1/plugin/Cd2Assistant/homepage?apikey=mp_apikey
|
||||
method: GET
|
||||
mappings:
|
||||
# - field: uptime
|
||||
# label: 运行时间
|
||||
- field: upload_count
|
||||
label: 上传数量
|
||||
- field: upload_speed
|
||||
label: 上传速度
|
||||
- field: download_count
|
||||
label: 下载数量
|
||||
- field: download_speed
|
||||
label: 下载速度
|
||||
|
||||
# - field: cloud_space
|
||||
# label: 剩余空间
|
||||
```
|
||||
|
||||
### 自定义API Response字段
|
||||
- cpuUsage: CPU使用率
|
||||
- memUsageKB: 内存使用量
|
||||
- uptime: 运行时间
|
||||
- upload_count: 上传数量
|
||||
- upload_speed: 上传速度
|
||||
- download_count: 下载数量
|
||||
- download_speed: 下载速度
|
||||
- cloud_space: 剩余空间
|
||||
|
||||
### HomePage自定义API文档
|
||||
https://gethomepage.dev/latest/widgets/services/customapi/#custom-request-body
|
||||
Reference in New Issue
Block a user