The Karma API is a way to give users karma!
- Docker
- Docker Compose
- Port 8080 is available
Simply run export POSTGRES_DB=karma && export POSTGRES_PASSWORD=admin && POSTGRES_USER=admin && docker-compose up
, the API should then be available at localhost:8080
.
Please update these environment variable values with a database user and not the superuser.
Adds a user
{
"email": "example@example.com"
}
{
"user_id": "e799061c-ce77-4082-9d05-8a9dde8a96c4",
"created_at": "TIMESTAMP",
"email": "example@example.com"
}
Retrieves the user
{
"user_id": "e799061c-ce77-4082-9d05-8a9dde8a96c4",
"created_at": "TIMESTAMP",
"email": "example@example.com"
}
Adds a group
{
"name": "My Group"
}
"e799061c-ce77-4082-9d05-8a9dde8a96c4"
{
"group_id": "2a62f4bd-7a81-429c-8b93-7fe9d2fdd5b6",
"group_name": "cool",
"created_at": "2020-06-02T21:03:14.982Z"
}
Retrieves the users karma
[{}, {}]
Adds an entry to the users Karma
{
"from_user_id": "e799061c-ce77-4082-9d05-8a9dde8a96c4",
"to_user_id": "f799061c-de77-7082-5e05-2a9ffe4a91c5",
"group_id": "g799061c-de77-9082-6q90-4v9nnq4e91c5",
"message": "some string here"
}
{
"from_user_id": "e799061c-ce77-4082-9d05-8a9dde8a96c4",
"to_user_id": "f799061c-de77-7082-5e05-2a9ffe4a91c5",
"group_id": "g799061c-de77-9082-6q90-4v9nnq4e91c5",
"message": "some string here"
}