EndPoint list:
POST https://bw-vacation-planner.herokuapp.com/api/auth/register
Requirements:
- unique username
- password
Example sending a request to register a new user
{ "username" : "LordOfTheRings", "password" : "youWillNeverFindMyPassWord!@#$%12" }
POST https://bw-vacation-planner.herokuapp.com/api/auth/login
Requirements:
- existing username
- password
POST https://bw-vacation-planner.herokuapp.com/api/vacations/add
Requirements:
- login token
- location
- title
Not-required:
- dates
- description
Example sending a request to add a new vacation
{ "location": "Africa", "title": "Summer Trip", "dates": "July - August", "description" : "Have fun!" }
GET https://bw-vacation-planner.herokuapp.com/api/vacations/
Requirements:
- login token
GET https://bw-vacation-planner.herokuapp.com/api/vacations/:vacId
Requirements:
- login token
- vacation id(vacId) in url
POST https://bw-vacation-planner.herokuapp.com/api/vacations/:vacId/adduser
Requirements:
- login token
- username to add
- vacation id(vacId) in url
Example adding a user { "username": "blue" }
DELETE https://bw-vacation-planner.herokuapp.com/api/vacations/:vacId/deleteuser
Requirements:
- login token
- username to delete
- vacation id(vacId) in url
Example deleting a user { "username": "blue" }
PUT https://bw-vacation-planner.herokuapp.com/api/vacations/:vacId/update
Requirements:
- login token
- location
- title
- vacation id(vacId) in url
Not-required:
- date
- description
Example sending a request to update existing vacation
{ "location": "Africa", "title": "Summer Trip", "dates": "July - August", "description" : "Have fun!" }
GET https://bw-vacation-planner.herokuapp.com/api/vacations/:vacId/comments
Requirements:
- login token
- vacation id(vacId) in url
POST https://bw-vacation-planner.herokuapp.com/api/vacations/:vacId/comments/add
Requirements:
- login token
- comment field
- vacation id(vacId) in url
Example sending a request to add a new comment
{ "comment" : "Lets go somewhere!" }
DELETE https://bw-vacation-planner.herokuapp.com/api/vacations/:vacId/comments/:id/delete
Requirements:
- login token
- comment id in url
- vacation id(vacId) in url
GET https://bw-vacation-planner.herokuapp.com/api/vacations/:vacId/suggestions
Requirements:
- login token
- vacation id(vacId) in url
POST https://bw-vacation-planner.herokuapp.com/api/vacations/:vacId/suggestions/add
Requirements:
- login token
- suggestion field
- vacation id(vacId) in url
Example sending a request to add a new suggestion
{ "suggestion" : "Lets go somewhere!" }
DELETE https://bw-vacation-planner.herokuapp.com/api/vacations/:vacId/suggestions/:id/delete
Requirements:
- login token
- suggestion id in url
- vacation id(vacId) in url