MemoService · MemoService_UpsertMemoReaction
基于协议生成的参考。授权与实例策略仍然生效。结构描述继承自 MIT 许可的应用接口定义;本站不会向真实服务执行示例。
访问权限
需要账号认证。在空间内创建或参与已有笔记时还会检查归属与读取权限;认证本身不代表可以修改他人的笔记。
回应输入与重试注意
提供包含 reactionType 的 reaction 对象;调用者和父笔记由认证与 URL 确定。Rust 处理函数会插入回应记录。不要仅因为操作名是 Upsert,就认为重复相同 POST 一定是无害更新;结果不明确时先检查已有回应。
请求
UpsertMemoReaction adds or updates the authenticated user's reaction on a memo.
POST
/api/v1/memos/{memo}/reactions参数
| 名称 / 位置 | 类型 / 是否必需 | 描述 |
|---|---|---|
memopath | string 必需 | The memo id. |
请求体
必需
application/json · UpsertMemoReactionRequest
响应
200 · OK
application/json · Reaction
default · Default error response
application/json · Status
完整操作定义
下方保留全部已声明约束、媒体类型和响应细节。结构引用链接到完整定义。
展开 JSON 定义
{
"tags": [
"MemoService"
],
"description": "UpsertMemoReaction adds or updates the authenticated user's reaction on a memo.",
"operationId": "MemoService_UpsertMemoReaction",
"parameters": [
{
"name": "memo",
"in": "path",
"description": "The memo id.",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpsertMemoReactionRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Reaction"
}
}
}
},
"default": {
"description": "Default error response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Status"
}
}
}
}
}
}