diff --git a/docs/api/community.md b/docs/api/community.md index d437810..8ff1615 100644 --- a/docs/api/community.md +++ b/docs/api/community.md @@ -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", +} +``` diff --git a/docs/api/invite.md b/docs/api/invite.md new file mode 100644 index 0000000..72a8a59 --- /dev/null +++ b/docs/api/invite.md @@ -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", +} +``` diff --git a/docs/api/session.md b/docs/api/session.md index 476e83a..0beef1d 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -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", +} +``` diff --git a/docs/api/user.md b/docs/api/user.md index 4aff1ad..18a1f18 100644 --- a/docs/api/user.md +++ b/docs/api/user.md @@ -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: