[POST] https://potluckplanner-backend.herokuapp.com/api/auth/register
Name | Type | Description |
---|---|---|
username | String | The New Users username *Required |
password | String | The New Users password *Required |
organizer | Boolean | Whether User is an Orangizer or not *Required |
Returns the newly added User
[POST] https://potluckplanner-backend.herokuapp.com/api/auth/login
Name | Type | Description |
---|---|---|
username | String | The New Users username *Required |
password | String | The New Users password *Required |
returns the welcome message, user details and token {"message": "welcome, username", "userDeet": { "user_id": integer, "username": "string" }, "token": "token sequence here"}
GET - find all potlucks a user is registered for...
[GET] https://potluckplanner-backend.herokuapp.com/api/guest/:id
Name | Type | Description |
---|---|---|
user_id | Integer | Guest's User_id *Required |
returns an array of potlucks.
[GET] https://potluckplanner-backend.herokuapp.com/api/potluck/
returns all potlucks
[GET] https://potluckplanner-backend.herokuapp.com/api/potluck/:id
Name | Type | Description |
---|---|---|
potluck_id | Integer | Potluck's id *Required |
returns potluck
[GET] https://potluckplanner-backend.herokuapp.com/api/organizer/:id
Name | Type | Description |
---|---|---|
potluck_id | Integer | Potluck's id *Required |
returns all potlucks belonging to organizer
[POST] https://potluckplanner-backend.herokuapp.com/api/organizer/potluck
Requires object with key:value pairs defined in table
Name | Type | Description |
---|---|---|
title | String | The Title of the event *Required |
date | Date | The Date of the event (MM/DD/YYYY) *Required |
time | Time | The Time fo the event (HH:MM:SS) *Required |
location | String | The location of the event *Required |
organizer_id | Integer | The id of the organizer *Required |
returns newly added event
[DELETE] - https://potluckplanner-backend.herokuapp.com/api/organizer/potluck/:id
Name | Type | Description |
---|---|---|
potluck_id | Integer | Potluck's id *Required (param) |
returns deleted event
[PUT] - https://potluckplanner-backend.herokuapp.com/api/organizer/potluck/:id
Name | Type | Description |
---|---|---|
potluck_id | Integer | Potluck's id *Required (param) |
potluck | object | Object containing event details as defined above |
returns updated event
[POST] - https://potluckplanner-backend.herokuapp.com/api/item/potluck/:id ( :id = potluck id )
Name | Type | Description |
---|---|---|
potluck_id | Integer | Potluck's id *Required (param) |
item | string | Object containing event details as defined above |
returns newly created item
[GET] https://potluckplanner-backend.herokuapp.com/api/item/:id ( :id = item id )
Name | Type | Description |
---|---|---|
item_id | Integer | item's id *Required (param) |
returns item
[GET] https://potluckplanner-backend.herokuapp.com/api/item/all/:id ( :id = potluck id )
Name | Type | Description |
---|---|---|
potluck_id | Integer | Potluck's id *Required (param) |
returns array of all items for potluck
[POST] https://potluckplanner-backend.herokuapp.com/api/item/claim/:id ( :id = potluck id )
Name | Type | Description |
---|---|---|
potluck_id | Integer | Potluck's id *Required (param) |
item_id | Integer | Item's id *Required |
returns array of items for specific potluck