base URL: https://generate-random-acts.herokuapp.com
a GET request to base URL will return a success message if the API is working and has been accessed correctly.
Response
{ api: 'up', }
a POST request to /api/auth/register will create a new user and return an object containing an authentication token.
body = {
"username": "username",
"password": "password"
}
a POST request to /api/auth/login will log in and return an object containing an authentication token.
body = {
"username": "username",
"password": "password"
}
a GET request to /api/users will return a list of all registered users
a GET request to /api/users/:id will return the user linked with the id provided in params.
a GET request to /api/acts will return a list of all acts stored in the acts table.
a POST request to /api/acts and an id of an existing user in the params will add an act to the db.
a GET request to /api/users/:id/contacts will return a list of all contacts associated with a given user.
a POST request to /api/users/:id/contacts will add a contact associated with a specific user ID to the db.