POST /api/communities/f/{forum}/write/
- 쓰레드 작성
- 권한: option.permission_write
- parameters
key |
type |
default |
required |
description |
forum |
Forum |
|
True |
|
user |
User |
|
|
작성자 |
name |
char(150) |
|
True* |
익명 접속시 작성자 (익명 접속시 required)* |
title |
char(100) |
|
True |
제목 |
content |
Text |
|
True |
내용 |
files |
[Attachment] |
|
|
첨부 파일 |
is_pinned |
bool |
False |
|
고정 여부 |
is_deleted |
bool |
False |
|
삭제 여부 |
created_at |
datetime |
|
|
|
modified_at |
datetime |
|
|
|
- Forum parameters
- permissions: 현재 접속 유저의 권한
- write: 쓰레드 작성 가능 여부
- reply: 댓글 작성 가능 여부
- vote: up, down 및 reaction 가능 여부
- support_files
- files
- attachment API를 이용해 File을 upload 한 후 Attachment id를 입력
- 권한: 승인된 사용자
- input sample
- POST /api/communities/f/illegallysmolcats/write/
{
"title": "Hello",
"content": "Kitty",
"files": [
{
"id": 1
},
{
"id": 2
}
]
}
{
"data": {
"id": 1,
"forum": {
"id": 1,
"name": "illegallysmolcats",
"title": "Illegally Small Cats",
"description": "Why so small",
"managers": [
{
"id": 2,
"username": "[email protected]",
"call_name": "B B"
}
],
"permissions": {
"write": true,
"reply": true,
"vote": true
},
"support_files": false
},
"user": {
"id": 2,
"username": "[email protected]",
"call_name": "B B"
},
"name": null,
"title": "Hello",
"content": "Kitty",
"files": [
{
"id": 2,
"file": "<http://localhost:8000/upload/files/shield_U1YeTjr.png>",
"filename": "shield.png",
"content_type": "image/png",
"size": 48248,
"created_at": "2023-09-27T11:02:55+0900"
},
{
"id": 1,
"file": "<http://localhost:8000/upload/files/shield_TaNz5sY.png>",
"filename": "shield.png",
"content_type": "image/png",
"size": 48248,
"created_at": "2023-09-27T11:02:24+0900"
}
],
"is_pinned": false,
"is_deleted": false,
"created_at": "2023-09-25T09:59:43+0900",
"modified_at": "2023-09-25T09:59:43+0900"
}
}
{
"name": "maskman",
"title": "Hello",
"content": "Kitty"
}
{
"data": {
"id": 2,
"forum": {
"id": 2,
"name": "ano",
"title": "anony test",
"description": "",
"managers": [
{
"id": 2,
"username": "[email protected]",
"call_name": "B B"
}
],
"permissions": {
"write": true,
"reply": true,
"vote": false
},
"support_files": false
},
"user": null,
"name": "maskman",
"title": "Hello",
"content": "Kitty",
"is_pinned": false,
"is_deleted": false,
"created_at": "2023-09-25T10:29:27+0900",
"modified_at": "2023-09-25T10:29:27+0900"
}
}
PATCH /api/communities/f/{forum}/{thread_id}/