Add invitations and joining
This commit is contained in:
parent
66b25d5135
commit
d1685fde77
4 changed files with 131 additions and 2 deletions
|
|
@ -12,6 +12,46 @@ Returns a community with id = {id}
|
|||
}
|
||||
```
|
||||
|
||||
## UPDATE /api/v1/community/{id}/name
|
||||
*Requires an authentication header*
|
||||
|
||||
### Request:
|
||||
```json
|
||||
{
|
||||
"name": "string"
|
||||
}
|
||||
```
|
||||
|
||||
Updates name for a community with id = {id}
|
||||
|
||||
### Response:
|
||||
```json
|
||||
{
|
||||
"id": "string",
|
||||
"name": "string",
|
||||
}
|
||||
```
|
||||
|
||||
## PATCH /api/v1/community/{id}/description
|
||||
*Requires an authentication header*
|
||||
|
||||
### Request:
|
||||
```json
|
||||
{
|
||||
"description": "string"
|
||||
}
|
||||
```
|
||||
|
||||
Updates description for a community with id = {id}
|
||||
|
||||
### Response:
|
||||
```json
|
||||
{
|
||||
"id": "string",
|
||||
"description": "string",
|
||||
}
|
||||
```
|
||||
|
||||
## GET /api/v1/community/{id}/members
|
||||
*Requires an authentication header*
|
||||
|
||||
|
|
@ -68,3 +108,48 @@ Returns roles for a community with id = {id}
|
|||
]
|
||||
}
|
||||
```
|
||||
|
||||
## POST /api/v1/community/{id}/invite
|
||||
*Requires an authentication header*
|
||||
|
||||
### Request:
|
||||
```json
|
||||
{
|
||||
"userId": "string"
|
||||
}
|
||||
```
|
||||
|
||||
Creates an invite to a community with id = {id}
|
||||
|
||||
### Response:
|
||||
```json
|
||||
{
|
||||
"userId": "string",
|
||||
"userName": "string",
|
||||
"communityId": "string",
|
||||
"communityName": "string",
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## POST /api/v1/community/{id}/join
|
||||
*Requires an authentication header*
|
||||
|
||||
### Request:
|
||||
```json
|
||||
{
|
||||
"userId": "string"
|
||||
}
|
||||
```
|
||||
|
||||
Joins a user to a community with id = {id}
|
||||
|
||||
### Response:
|
||||
```json
|
||||
{
|
||||
"userId": "string",
|
||||
"userName": "string",
|
||||
"communityId": "string",
|
||||
"communityName": "string",
|
||||
}
|
||||
```
|
||||
|
|
|
|||
31
docs/api/invite.md
Normal file
31
docs/api/invite.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
## GET /api/v1/invite/{id}
|
||||
*Requires an authentication header*
|
||||
|
||||
Returns an invite with id = {id}
|
||||
|
||||
### Response:
|
||||
```json
|
||||
{
|
||||
"id": "string",
|
||||
"communityId": "string",
|
||||
"valid": true,
|
||||
"unlimitedInvites": false,
|
||||
"hasExpiration": false,
|
||||
"remainingInvites": 0,
|
||||
"creationDate": 0,
|
||||
"expirationDate": 0
|
||||
}
|
||||
```
|
||||
|
||||
## DELETE /api/v1/invite/{id}
|
||||
*Requires an authentication header*
|
||||
|
||||
Removes an invite with id = {id}
|
||||
|
||||
### Response:
|
||||
```json
|
||||
{
|
||||
"id": "string",
|
||||
"communityId": "string",
|
||||
}
|
||||
```
|
||||
|
|
@ -10,3 +10,16 @@ Returns a session with id = {id}
|
|||
"userId": "string"
|
||||
}
|
||||
```
|
||||
|
||||
## DELETE /api/v1/session/{id}
|
||||
*Requires an authentication header*
|
||||
|
||||
Revokes a session with id = {id}
|
||||
|
||||
### Response:
|
||||
```json
|
||||
{
|
||||
"id": "string",
|
||||
"userId": "string",
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ Returns all sessions for a user with id = {id}
|
|||
}
|
||||
```
|
||||
|
||||
## POST /api/v1/user/{id}/email
|
||||
## PATCH /api/v1/user/{id}/email
|
||||
*Requires an authentication header*
|
||||
|
||||
### Request:
|
||||
|
|
@ -53,7 +53,7 @@ Updates email for a user with id = {id}
|
|||
}
|
||||
```
|
||||
|
||||
## POST /api/v1/user/{id}/description
|
||||
## PATCH /api/v1/user/{id}/description
|
||||
*Requires an authentication header*
|
||||
|
||||
### Request:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue