New endpoints
This commit is contained in:
parent
983623dff2
commit
c37a81e8fd
4 changed files with 80 additions and 10 deletions
|
|
@ -14,3 +14,28 @@ Returns a channel with id = {id}
|
||||||
"creationDate": 0
|
"creationDate": 0
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## POST /api/v1/channel
|
||||||
|
|
||||||
|
_Requires an authorization header_
|
||||||
|
|
||||||
|
### Request:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "string",
|
||||||
|
"communityId": "string"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Creates a new channel and returns it
|
||||||
|
|
||||||
|
### Response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "string",
|
||||||
|
"name": "string",
|
||||||
|
"communityId": "string"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,37 @@ Returns a community with id = {id}
|
||||||
"id": "string",
|
"id": "string",
|
||||||
"name": "string",
|
"name": "string",
|
||||||
"description": "string",
|
"description": "string",
|
||||||
|
"ownerId": "string",
|
||||||
"creationDate": 0
|
"creationDate": 0
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## POST /api/v1/community
|
||||||
|
|
||||||
|
_Requires an authorization header_
|
||||||
|
|
||||||
|
### Request:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "string",
|
||||||
|
"description": "string?"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Creates a new community and returns it
|
||||||
|
|
||||||
|
### Response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "string",
|
||||||
|
"name": "string",
|
||||||
|
"description": "string",
|
||||||
|
"ownerId": "string"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## PATCH /api/v1/community/{id}
|
## PATCH /api/v1/community/{id}
|
||||||
|
|
||||||
_Requires an authorization header_
|
_Requires an authorization header_
|
||||||
|
|
@ -109,7 +136,6 @@ _Requires an authorization header_
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"creatorId": "string",
|
|
||||||
"totalInvites": "number?",
|
"totalInvites": "number?",
|
||||||
"expirationDate": "number?"
|
"expirationDate": "number?"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ Returns an invite with id = {id}
|
||||||
"valid": true,
|
"valid": true,
|
||||||
"unlimitedInvites": false,
|
"unlimitedInvites": false,
|
||||||
"hasExpiration": false,
|
"hasExpiration": false,
|
||||||
|
"totalInvites": 0,
|
||||||
"remainingInvites": 0,
|
"remainingInvites": 0,
|
||||||
"creationDate": 0,
|
"creationDate": 0,
|
||||||
"expirationDate": 0
|
"expirationDate": 0
|
||||||
|
|
@ -32,18 +33,10 @@ Removes an invite with id = {id}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## POST /api/v1/invite/{id}/accept
|
## GET /api/v1/invite/{id}/accept
|
||||||
|
|
||||||
_Requires an authorization header_
|
_Requires an authorization header_
|
||||||
|
|
||||||
### Request:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"userId": "string"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Accepts an invite and joins user to a community with id = {id}
|
Accepts an invite and joins user to a community with id = {id}
|
||||||
|
|
||||||
### Response:
|
### Response:
|
||||||
|
|
|
||||||
|
|
@ -14,3 +14,29 @@ Returns a role with id = {id}
|
||||||
"creationDate": 0
|
"creationDate": 0
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## POST /api/v1/role
|
||||||
|
|
||||||
|
_Requires an authorization header_
|
||||||
|
|
||||||
|
### Request:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "string",
|
||||||
|
"communityId": "string",
|
||||||
|
"permissions": "string[]"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Creates a new role and returns it
|
||||||
|
|
||||||
|
### Response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"id": "string",
|
||||||
|
"name": "string",
|
||||||
|
"communityId": "string"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue