mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-17 01:15:05 +03:00
1.2 KiB
1.2 KiB
API documentation of Akf-forum
Akf-forum has got an API for other clients etc.
You can find examples in /tests
folder.
Authorization
You need this headers for send request to API:
{
"username": "testUser",
"password": "testPassword"
}
How to request?
Request types:
- GET
/api/users/:id
- POST
/api/threads
- GET
/api/threads/:id
- POST
/api/threads/:id/delete
- GET
/api/messages/:id
- POST
/api/messages
- POST
/api/messages/:id/delete
- POST
/api/messages/:id/react/:type
Example request:
GET /api/message/1
Example API Output:
{
"status": 200,
"result":
{
"content": "First message",
"time": 1647178873587,
"deleted": false,
"edited": false,
"react": {},
"id": "1",
"author": {
"name": "ForumcuCocuk",
"avatar": "/images/guest.png",
"time": 1647177723873,
"admin": true,
"id": "1"
},
"threadID":"0"
}
}