127 lines
1.7 KiB
Markdown
127 lines
1.7 KiB
Markdown
## GET /api/v1/community/{id}
|
|
|
|
Returns a community with id = {id}
|
|
|
|
### Response:
|
|
|
|
```json
|
|
{
|
|
"id": "string",
|
|
"name": "string",
|
|
"description": "string",
|
|
"creationDate": 0
|
|
}
|
|
```
|
|
|
|
## PATCH /api/v1/community/{id}
|
|
|
|
_Requires an authorization header_
|
|
|
|
### Request:
|
|
|
|
```json
|
|
{
|
|
"name": "string?",
|
|
"description": "string?"
|
|
}
|
|
```
|
|
|
|
Updates a community with id = {id}
|
|
|
|
### Response:
|
|
|
|
```json
|
|
{
|
|
"id": "string",
|
|
"name": "string",
|
|
"description": "string"
|
|
}
|
|
```
|
|
|
|
## GET /api/v1/community/{id}/members
|
|
|
|
_Requires an authorization 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 an authorization 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 an authorization header_
|
|
|
|
Returns roles for a community with id = {id}
|
|
|
|
### Response:
|
|
|
|
```json
|
|
{
|
|
"id": "string",
|
|
"name": "string",
|
|
"roles": [
|
|
{
|
|
"id": "string",
|
|
"name": "string"
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
## POST /api/v1/community/{id}/invite
|
|
|
|
_Requires an authorization header_
|
|
|
|
### Request:
|
|
|
|
```json
|
|
{
|
|
"userId": "string"
|
|
}
|
|
```
|
|
|
|
Creates an invite to a community with id = {id}
|
|
|
|
### Response:
|
|
|
|
```json
|
|
{
|
|
"userId": "string",
|
|
"userName": "string",
|
|
"communityId": "string",
|
|
"communityName": "string"
|
|
}
|
|
```
|