- API documentation
- User/Register
- User/Login
- User/GetUserPersonalData
- User/UpdateUserPersonalDataRequest
- User/UpdateUserPasswordRequest
- User/UpdateUserEmailRequest
- User/Delete
- Avatars/GetAvatar
- Avatars/GetRandomAvatar
- Moods/GetMoods
- Records/Create a record
- Records/Get a record
- Records/Update a record
- Records/Round statistics
- Records/Tabular statistics
- Records/Data deletion
Register a new user account.
Endpoint: user/register
Request Body:
{
"username": "string",
"email": "user@example.com",
"birthdate": "20.12.2000",
"password": "string",
}
Response: None
Authenticate a user and return a token.
Endpoint: user/login
Request Body:
{
"username": "string",
"password": "string"
}
Response:
{
"token": "string"
}
Endpoint: user/getPersonalData
Request header:
{
"token": "string"
}
Request Body: None
Response:
{
"Username": "string",
"FirstName": "string",
"LastName": "string",
"Birthdate": "20.12.2000",
"Sex": "string"
}
Endpoint: user/updateUserPersonalDataRequest
Request header:
{
"token": "string"
}
Request Body:
{
"newUsername": "string",
"newFirstName": "string",
"newLastName": "string",
"newBirthdate": "20.12.2000",
"newSex": "string"
}
Response: None
Endpoint: user/updateUserPasswordRequest
Request header:
{
"token": "string"
}
Request Body:
{
"oldPassword": "string",
"newPassword": "string",
}
Response: None
Endpoint: user/updateUserEmailRequest
Request header:
{
"token": "string"
}
Request Body:
{
"newEmail": "string",
}
Response: None
Endpoint: /settings
Request header:
{
"token": "string"
}
Request Body:
{
"password": "string",
}
Get user's avatar and username.
Endpoint: user/header
Request Header:
{
"token": "string"
}
Response:
{
avatar: "https://i.imgur.com/dWtx5mc.jpeg"
username: "some Tom"
}
Get user's avatar.
Endpoint: /avatar
Request Header:
{
"token": "string"
}
Response:
{
avatar: "https://i.imgur.com/dWtx5mc.jpeg"
}
Get available moods.
Endpoint: /moods
Response:
{
"moods": [
{
"mood_id": "1",
"image": "https://i.imgur.com/aidyse5.png"
},
{
"mood_id": "2",
"image": "https://i.imgur.com/whXdVTH.png"
},
...
]
}
Get a mood record.
Endpoint: /record
Request Header:
{
"token": "string"
}
Request Body:
{
"date": "20.09.2023",
}
Response:
{
"emoji": "https://i.imgur.com/1.jpeg",
"text": "string".
"date": "12.16.2023"
}
Add a new mood record.
Endpoint: /record
Request Header:
{
"token": "string"
}
Request Body:
{
"mood_id": "int",
"text": "string",
"date": "29.04.2023"
}
Response: None
Update an existing mood record.
Endpoint: /record
Request Header:
{
"token": "string"
}
Request Body:
{
"newMood_id": "int",
"newText": "string",
"date": "21.01.2023"
}
Response: None
Endpoint: /statistics/round
Request header:
{
"token": "string"
}
Request body:
{
"month": "4",
"year": "2023"
}
Response:
{
"statistics": [
{
"Image": "https://i.imgur.com/1.jpeg",
"count": "12"
},
{
"Image": "https://i.imgur.com/2.jpeg",
"count": "2"
},
{
"Image": "https://i.imgur.com/3.jpeg",
"count": "3"
},
{
"Image": "https://i.imgur.com/4.jpeg",
"count": "10"
},
{
"Image": "https://i.imgur.com/5.jpeg",
"count": "4"
}
]
}
Endpoint: /statistics/table
Request header:
{
"token": "string"
}
Request body:
{
"month": "4",
"year": "2023"
}
Response:
{
"statistics": [
{
"date": "01.04.2023",
"points": "1"
},
{
"date": "02.04.2023",
"points": "5"
},
],
}
Endpoint: records/delete
Request header:
{
"token": "string"
}
Request Body:
{
"password": "string",
}
Response: None