Skip to content
Snippets Groups Projects
Commit 857fe5a3 authored by safarte's avatar safarte
Browse files

readme

parent 23bdb342
No related branches found
No related tags found
No related merge requests found
...@@ -17,3 +17,49 @@ yarn install ...@@ -17,3 +17,49 @@ yarn install
## Usage ## Usage
To run this website locally execute `yarn start` in the working directory. To run this website locally execute `yarn start` in the working directory.
## API
`GET /users => [Object]` -> Lists all users
`GET /users/id => Object` -> Get the info about the user with asked id
`GET /boards => [Object]` -> Lists all boards
`GET /boards/id => Object` -> Get the info about the board with asked id
`GET /messages?board=id => [Object]` -> Get the messages from the board with asked id
To post a message from specified user on specified board:
```json
POST /messages
body:
{
content: "blabla",
userId: 42,
boardId: 1
}
```
To register a new user (returns the user):
```json
POST /users => Object
body:
{
username: "blabla",
paswword: "verysecure"
}
```
To login an user (returns a list containing the matching users):
```json
POST /login => [Object]
body:
{
username: "blabla",
paswword: "verysecure"
}
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment