Add logged user and user communities endpoint
This commit is contained in:
parent
df2b2a4247
commit
f736171db8
3 changed files with 37 additions and 2 deletions
|
|
@ -1,3 +1,3 @@
|
|||
# Nexlink
|
||||
|
||||
Communication protocol spec and API documentation
|
||||
Spec and API documentation for a gamified communication protocol with AI support
|
||||
|
|
|
|||
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
0.3.3
|
||||
0.3.4
|
||||
|
|
|
|||
|
|
@ -18,6 +18,20 @@ Returns a user with id = {id}
|
|||
}
|
||||
```
|
||||
|
||||
## GET /api/v1/user/logged
|
||||
|
||||
_Requires an authorization header_
|
||||
|
||||
Returns id of the currently logged user based on the auth token
|
||||
|
||||
### Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "string"
|
||||
}
|
||||
```
|
||||
|
||||
## POST /api/v1/user
|
||||
|
||||
_Requires an authorization header_
|
||||
|
|
@ -106,3 +120,24 @@ Returns all sessions for a user with id = {id}
|
|||
]
|
||||
}
|
||||
```
|
||||
|
||||
## GET /api/v1/user/{id}/communities
|
||||
|
||||
_Requires an authorization header_
|
||||
|
||||
Returns all communities for a user with id = {id}
|
||||
|
||||
### Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "string",
|
||||
"communities": [
|
||||
{
|
||||
"id": "string",
|
||||
"name": "string",
|
||||
"description": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue