Add more objects

This commit is contained in:
Aslan 2025-12-23 14:45:41 -05:00
parent 2f30eb62ef
commit cea0a001b8
6 changed files with 158 additions and 3 deletions

View file

@ -1,4 +1,4 @@
## POST /api/v1/register ## POST /api/v1/auth/register
### Request: ### Request:
```json ```json
{ {
@ -27,7 +27,7 @@ Registers a new user
--- ---
## POST /api/v1/login ## POST /api/v1/auth/login
### Request: ### Request:
```json ```json
{ {

12
docs/api/channel.md Normal file
View file

@ -0,0 +1,12 @@
## GET /api/v1/channel/{id}
*Requires authentication header*
Returns a channel with id = {id}
### Response:
```json
{
"id": "string",
"name": "string",
"communityId": "string"
}
```

65
docs/api/community.md Normal file
View file

@ -0,0 +1,65 @@
## GET /api/v1/community/{id}
*Requires authentication header*
Returns a community with id = {id}
### Response:
```json
{
"id": "string",
"name": "string"
}
```
## GET /api/v1/community/{id}/members
*Requires authentication header*
Returns users for a community with id = {id}
### Response:
```json
{
"id": "string",
"name": "string",
"members": [
{
"id": "string",
"username": "string"
}
]
}
```
## GET /api/v1/community/{id}/channels
*Requires authentication header*
Returns channels for a community with id = {id}
### Response:
```json
{
"id": "string",
"name": "string",
"channels": [
{
"id": "string",
"name": "string"
}
]
}
```
## GET /api/v1/community/{id}/roles
*Requires authentication header*
Returns roles for a community with id = {id}
### Response:
```json
{
"id": "string",
"name": "string",
"roles": [
{
"id": "string",
"name": "string"
}
]
}
```

12
docs/api/role.md Normal file
View file

@ -0,0 +1,12 @@
## GET /api/v1/role/{id}
*Requires authentication header*
Returns a role with id = {id}
### Response:
```json
{
"id": "string",
"name": "string",
"communityId": "string"
}
```

11
docs/api/session.md Normal file
View file

@ -0,0 +1,11 @@
## GET /api/v1/session/{id}
*Requires authentication header*
Returns a session with id = {id}
### Response:
```json
{
"id": "string",
"userId": "string"
}
```

View file

@ -1,5 +1,6 @@
## GET /api/v1/user/{id} ## GET /api/v1/user/{id}
Returns a user object with id = {id} *Requires authentication header*
Returns a user with id = {id}
### Response: ### Response:
```json ```json
@ -13,3 +14,57 @@ Returns a user object with id = {id}
"lastLogin": 0 "lastLogin": 0
} }
``` ```
## GET /api/v1/user/{id}/sessions
*Requires authentication header*
Returns all sessions for a user with id = {id}
### Response:
```json
{
"sessions": [
{
"id": "string",
"userId": "string"
}
]
}
```
## POST /api/v1/user/{id}/email
*Requires authentication header*
### Request:
```json
{
"email": "string"
}
```
Updates email for a user with id = {id}
### Response:
```json
{
"id": "string",
"email": "string",
}
```
## POST /api/v1/user/{id}/description
*Requires authentication header*
### Request:
```json
{
"description": "string"
}
```
Updates description for a user with id = {id}
### Response:
```json
{
"id": "string",
"description": "string",
}
```