MoodIO is a (set of) application(s) to get an insight in the mental and possibly phisical state of people. Primarily aimed at children to assist their doctor in evaluating their well being.
TODO
The application knows three environments, testing
, development
and
production
. Depending on the environment, some aspects may behave
differently. You can set the environment by setting the NODE_ENV
variable in
the shell starting the application.
In addition, the database configuration can be created using environment
variables as well. For this, you can use DB_USERNAME
, DB_PASSWORD
,
DB_DATABASE
, DB_HOST
and DB_DIALECT
. Keep in mind that the config
generation only runs if the config/database.json
does not exist yet.
POST /auth/login
Request Body | Type |
---|---|
username | String |
password | String |
POST /auth/logout
Request Body | Type |
---|
POST /auth/refresh
Request Body | Type |
---|
POST /auth/register
Request Body | Type |
---|---|
username | String |
password | String |
GET /
Request Body | Type |
---|
POST /
Request Body | Type |
---|---|
genreName | String |
DELETE /
Request Body | Type |
---|---|
genreName | String |
POST /dislike
Request Body | Type |
---|---|
genreName | String |
DELETE /dislike
Request Body | Type |
---|---|
genreName | String |
POST /like
Request Body | Type |
---|---|
genreName | String |
DELETE /like
Request Body | Type |
---|---|
genreName | String |
GET /
Request Body | Type |
---|
POST /
Request Body | Type |
---|---|
mood | String |
PUT /
Request Body | Type |
---|---|
newMood | String |
DELETE /
Request Body | Type |
---|---|
mood | String |
GET /:moodId
Request Body | Type |
---|
GET /my
Request the current user's current mood.
Request Body | Type |
---|
POST /my
Changes the mood and puts the mood into history
Request Body | Type |
---|---|
moodId | Integer |
GET /recent
First ten moods in history
Request Body | Type |
---|
GET /recent/:count
The x amount
Request Body | Type |
---|
GET /
Request Body | Type |
---|
PUT /
Request Body | Type |
---|---|
username | String |
password | String |
GET /:userId
Request Body | Type |
---|
PUT /:userId
Request Body | Type |
---|---|
username | String |
password | String |
GET /:id
Request Body | Type |
---|
GET /:id/scale
Request Body | Type |
---|
GET /:id/:userId
Request Body | Type |
---|
POST /
Request Body | Type |
---|---|
name | String |
description | String |
scaleItems | String (Comma Seperated Values) |
POST /:id
Request Body | Type |
---|---|
songId | INT |
moodId | INT |
scaleScore | String |
PUT /
Request Body | Type |
---|---|
updateItems | Array (id, name, description, scaleItems) |
PATCH /
Request Body | Type |
---|---|
removeItems | Array (id) |
GET /recent
Returns the previously listened to song of the current user.
Request Body | Type |
---|
GET /recent/:count
Returns a list of the previously listened to songs of the current user. The
size of the list is dependant on :count
.
Request Body | Type |
---|
- Indent using tabs.
- Alignment using spaces, if you want alignment at all.
TODO