Information required to register a user
Post https://bw-guess-who.herokuapp.com/api/register
{
username: "",
password:""
}
Id is added automatically on the backend, along with points (automatically 0) and level (Beginner); This is how your item would be returned:
{
"id": 1,
"username": "totz",
"password": "$2a$10$GP91a3OevPYabel5rMkbBOo/oLCDbSTlIGBJApvg8/InmZBvnfmne",
"points": 0,
"level": "Beginner"
}
Post https://bw-guess-who.herokuapp.com/api/login
Login should be pretty basic:
{
username: "",
password: ""
}
Get
https://bw-guess-who.herokuapp.com/api/users
This should be just a basic get request
Get
https://bw-guess-who.herokuapp.com/api/games
It should just be a basic get request
Post
https://bw-guess-who.herokuapp.com/api/games
You'll want to format it like this...
{
"game_name": "",
"instigator_id": ""
}
Set instigator_id as your user's id.
Delete
https://bw-guess-who.herokuapp.com/api/users
Get
https://bw-guess-who.herokuapp.com/api/games/:id
Delete
https://bw-guess-who.herokuapp.com/api/games/:id
It is a Post using this format:
{ username: "" }
It will be a get request:
https://bw-guess-who.herokuapp.com/api/games/:id/friends