Ensuring that all your plants are consistently watered is actually pretty difficult. Water My Plants is an app that helps to solve those problems.
With an easy to use interface for creating a plant watering schedule tailored to each individual plant, WaterMyPlants will remind users when it's time to feed that foliage and quench your plants' thirst.
Detailed Endpoints Doc: https://jren-watermyplants.herokuapp.com/swagger-ui.html#/
Method | Endpoint | Body (required) | Comments | Notes |
---|---|---|---|---|
register POST | /api/auth/register | username, password, phonenumber | Creates a new user in the database. | |
login POST | /api/auth/login | username, password | axios.post('https://jren-watermyplants.herokuapp.com/api/auth/login', <br>'grant_type=password&username=${form.username}&password=${form.password}', {<br>headers: <br>{'Basic ${btoa('lambda-client:lambda-secret')},<br>'Content-Type': 'application/x-www-form-urlencoded}) |
Returns a access token. (res.data.access_token) |
logout GET | /api/auth/logout | AxiosWithAuth (required) | Revokes the token of current user |
For GET, DELETE: headers: {Authorization: 'Bearer ${token}'}
For POST, PUT, PATCH : headers: {Authorization: 'Bearer ${token}', Content-type: 'application/json'}
Method | Endpoint | Body (required) | Comments | Notes |
---|---|---|---|---|
get current user info GET | /api/users/info | Returns info of current user | ||
update user PUT | /api/users/:id | username, password, phonenumber | Updates the user with user id | |
delete user DELETE | /api/users/:id | Deletes the user with user id |
Method | Endpoint | Body (required) | Comments | Notes |
---|---|---|---|---|
get plants GET | /api/plants | Fetches all plants of current user | ||
add plant POST | /api/plants | nickname, species, h2ofrequency, image | add plant to current user's plants | |
update plant PUT | /api/plants/:id | nickname, species, h2ofrequency, image | Update plant with plant id | |
delete plant by Id DELETE | /api/plants/:id | Delete Plant by Id |