学习待办/BearerWrite
Update study todo
Edit the title, note, optional whole-hour scheduledAt, WeChat reminder setting, optional site contentRef, or completion status of an exact todo id.
Endpoint
POST
/api/v1/agent/capabilities/ielts_study_todos_update请求参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| title | string | 否 | title |
| note | string | 否 | note |
| scheduledAt | string | 否 | scheduledAt |
| wechatEnabled | boolean | 否 | wechatEnabled |
| contentRef | unknown | 否 | contentRef |
| status | open | done | 否 | status |
| id | string | 是 | id |
调用示例
curl -X POST \
'https://work.ieltsbuddy.igopx.cn/api/v1/agent/capabilities/ielts_study_todos_update' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer $IELTS_BUDDY_TOKEN' \
--data '{"id":"00000000-0000-4000-8000-000000000000"}'请求结构
{
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"note": {
"type": "string",
"maxLength": 2000
},
"scheduledAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"wechatEnabled": {
"type": "boolean"
},
"contentRef": {
"anyOf": [
{
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "question_part"
},
"partId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"kind",
"partId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "mock_paper"
},
"paperId": {
"type": "string",
"minLength": 1,
"maxLength": 160
}
},
"required": [
"kind",
"paperId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"courseId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"kind": {
"type": "string",
"const": "course_section"
},
"sectionId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"courseId",
"kind",
"sectionId"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "listening_dictation"
},
"partId": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"kind",
"partId"
],
"additionalProperties": false
}
]
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"open",
"done"
]
},
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"id"
],
"additionalProperties": false
}统一响应
接口结果位于 data;code 为 0 表示调用成功。
{
"code": 0,
"data": {},
"message": "ok"
}错误码
400
40001请求参数不符合接口契约401
40101缺少或使用了无效的访问令牌403
40301访问令牌不包含接口所需权限404
40401接口或目标资源不存在