这是本文档旧的修订版!
BitComet 从 v2.09 开始支持 WebUI,可以从浏览器远程访问软件界面。
WebUI 界面部分使用 Vue + Vuetify 搭建,与软件的通信使用 axios 传送 json 格式的报文。
以下是部分 API 调用接口:
API 路径:
/api_v2/task_list/get
参数名称 | 参数类型 | 说明 | 是否可选 | 默认值 | 取值范围 |
---|---|---|---|---|---|
group_state | string | 任务分组 | 可选 | ALL | ALL, DOWNLOADING, DOWNLOAD_PAUSED, SEEDING, SEED_PAUSED, COMPLETED, UNCOMPLETED, ACTIVE, INACTIVE |
sort_key | string | 排序键值 | 可选 | 空 | Name, Size, Progress, LeftTime, Download, Upload, DownloadSize, UploadSize |
sort_order | string | 排序顺序 | 可选 | unsorted | ascend, descend, unsorted |
API 路径:
/api/task/peers/get
参数名称 | 参数类型 | 说明 | 是否可选 | 默认值 | 取值范围 |
---|---|---|---|---|---|
task_id | string | 任务ID | 强制 | 无 | 可通过任务列表获取 |
groups | string | peer 分组 | 可选 | 无 | peers_connected, peers_connecting, peers_disconnected, peers_banned, ltseeds_connected, ltseeds_connecting, webseeds |
max_count | int | 返回数量上限 | 可选 | 0 | 0 表示返回全部 |
sort_key | string | 排序键值 | 可选 | 空 | ip, remoteport, listenport, progress, downrate, uprate, downsize, upsize, initiation, protocol, peerdownrate, connecttime, clienttype |
sort_order | string | 排序顺序 | 可选 | unsorted | ascend, descend, unsorted |