POSTAPIの概要 実装を見る
No description provided.
Credential required: Yes / Permission: write:votes
パラメータ
名前 | 型 | 既定値 |
---|
必須 | noteId | 文字列 | - |
必須 | choice | 整数 | - |
204 レスポンス リクエスト成功(内容なし)
400 エラー クライアント側エラー
401 エラー 認証エラー
403 エラー 権限関連のエラー
418 エラー I'm Ai
500 エラー サーバー内部エラー
{
"_path": "/api-docs/endpoints/notes/polls/vote",
"_dir": "polls",
"_draft": false,
"_partial": false,
"_locale": "",
"data": {
"post": {
"operationId": "notes/polls/vote",
"summary": "notes/polls/vote",
"description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *write:votes*",
"externalDocs": {
"description": "Source code",
"url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/notes/polls/vote.ts"
},
"tags": [
"notes"
],
"security": [
{
"ApiKeyAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"noteId": {
"type": "string",
"format": "misskey:id"
},
"choice": {
"type": "integer"
}
},
"required": [
"noteId",
"choice"
]
}
}
}
},
"responses": {
"204": {
"description": "OK (without any results)"
},
"400": {
"description": "Client error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"NO_SUCH_NOTE": {
"value": {
"error": {
"message": "No such note.",
"code": "NO_SUCH_NOTE",
"id": "ecafbd2e-c283-4d6d-aecb-1a0a33b75396"
}
}
},
"NO_POLL": {
"value": {
"error": {
"message": "The note does not attach a poll.",
"code": "NO_POLL",
"id": "5f979967-52d9-4314-a911-1c673727f92f"
}
}
},
"INVALID_CHOICE": {
"value": {
"error": {
"message": "Choice ID is invalid.",
"code": "INVALID_CHOICE",
"id": "e0cc9a04-f2e8-41e4-a5f1-4127293260cc"
}
}
},
"ALREADY_VOTED": {
"value": {
"error": {
"message": "You have already voted.",
"code": "ALREADY_VOTED",
"id": "0963fc77-efac-419b-9424-b391608dc6d8"
}
}
},
"ALREADY_EXPIRED": {
"value": {
"error": {
"message": "The poll is already expired.",
"code": "ALREADY_EXPIRED",
"id": "1022a357-b085-4054-9083-8f8de358337e"
}
}
},
"YOU_HAVE_BEEN_BLOCKED": {
"value": {
"error": {
"message": "You cannot vote this poll because you have been blocked by this user.",
"code": "YOU_HAVE_BEEN_BLOCKED",
"id": "85a5377e-b1e9-4617-b0b9-5bea73331e49"
}
}
},
"INVALID_PARAM": {
"value": {
"error": {
"message": "Invalid param.",
"code": "INVALID_PARAM",
"id": "3d81ceae-475f-4600-b2a8-2bc116157532"
}
}
}
}
}
}
},
"401": {
"description": "Authentication error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"CREDENTIAL_REQUIRED": {
"value": {
"error": {
"message": "Credential required.",
"code": "CREDENTIAL_REQUIRED",
"id": "1384574d-a912-4b81-8601-c7b1c4085df1"
}
}
}
}
}
}
},
"403": {
"description": "Forbidden error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"AUTHENTICATION_FAILED": {
"value": {
"error": {
"message": "Authentication failed. Please ensure your token is correct.",
"code": "AUTHENTICATION_FAILED",
"id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
}
}
}
}
}
}
},
"418": {
"description": "I'm Ai",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"I_AM_AI": {
"value": {
"error": {
"message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
"code": "I_AM_AI",
"id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
}
}
}
}
}
}
},
"500": {
"description": "Internal server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
},
"examples": {
"INTERNAL_ERROR": {
"value": {
"error": {
"message": "Internal error occurred. Please contact us if the error persists.",
"code": "INTERNAL_ERROR",
"id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
}
}
}
}
}
}
}
}
}
},
"title": "notes/polls/vote",
"_id": "content:api-docs:endpoints:notes:polls:vote.json",
"_type": "json",
"_source": "content",
"_file": "api-docs/endpoints/notes/polls/vote.json",
"_extension": "json"
}