mirror of
https://github.com/Sliverkiss/GoodNight.git
synced 2025-12-23 02:04:41 +08:00
Update README.md
This commit is contained in:
@@ -1,5 +1,16 @@
|
||||
# **接口文档**
|
||||
|
||||
## **通用请求头**
|
||||
|
||||
所有接口均需携带以下请求头:
|
||||
|
||||
| Header 名称 | 必填 | 示例值 | 描述 |
|
||||
|------------------------|------|---------------------------------------|---------------------------------------|
|
||||
| Content-Type | 是 | `application/x-www-form-urlencoded` | 表示请求体的编码格式。 |
|
||||
| Cookie | 是 | `key=abc; _clientOffset=480` | 包含用户会话信息,例如任务的授权凭据。 |
|
||||
|
||||
---
|
||||
|
||||
## **1. 创建任务**
|
||||
|
||||
### **接口地址**
|
||||
@@ -9,7 +20,7 @@
|
||||
|
||||
| 参数名 | 类型 | 是否必填 | 示例值 | 描述 |
|
||||
|------------|----------|----------|----------------|----------------------------------------|
|
||||
| enabled | `boolean` | 是 | `true` | 任务状态,固定值为 `true`,表示启用任务。 |
|
||||
| enabled | `string` | 是 | `false` | 任务状态,固定值为 `on`,表示启用任务。 |
|
||||
| interval | `string` | 是 | `"*/5 * * *"` | 任务执行间隔,支持 Cron 表达式。 |
|
||||
| url | `string` | 是 | `"http://..."` | 任务的目标 URL 或 curl 命令。 |
|
||||
| note | `string` | 否 | `"My Task"` | 任务的备注信息,用于描述任务。 |
|
||||
@@ -23,7 +34,7 @@
|
||||
|
||||
| 参数名 | 类型 | 是否必填 | 示例值 | 描述 |
|
||||
|------------|----------|----------|----------------|----------------------------------------|
|
||||
| enabled | `boolean` | 否 | `true` | 任务状态,`true` 表示启用,省略表示禁用。 |
|
||||
| enabled | `string` | 否 | `false` | 任务状态,`on` 表示启用,省略表示禁用。 |
|
||||
| interval | `string` | 否 | `"*/10 * * *"` | 修改后的任务执行间隔,支持 Cron 表达式。 |
|
||||
| url | `string` | 否 | `"http://..."` | 修改后的目标 URL 或 curl 命令。 |
|
||||
| note | `string` | 否 | `"Updated"` | 修改后的任务备注信息。 |
|
||||
|
||||
Reference in New Issue
Block a user