Skip to content

mpaolodr/plants-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Documentation

Backend Deployment

Frameworks

  • bcryptjs
  • cloudinary
  • cors
  • datauri
  • dotenv
  • express
  • helmet
  • jsonwebtoken
  • knex
  • knex-cleaner
  • multer
  • sqlite3

Routes

  • Authentication

    /api/auth

    Method Endpoint Action Required Fields
    POST /register registers a new user username, password, phone_number
    POST /login signs registered users in username, password
  • Users

    /api/users

    Method Endpoint Action Required Fields
    GET /:id get user data userid
    PUT /:id edit user password, username or phone number password, username, phone_number
    GET /:id/plants get user's plants userid(only used for api call)
    POST /:id/plants add plant to user data userid(only used for api call), nickname(str), phone_number(str), species_name(str, not required), image(not required)
    GET /:id/plants/:plantid get plant by id userid(only used for api call) plantid(only used for api call)
    PUT /:id/plants/:plantid edit plant information userid(only used for api call), plantid(only used for api call), nickname(str), phone_number(str), species_name(str, not required), image(not required)
    DELETE /:id/plants/:plantid delete plant plantid(only used for api call) userid(only used for api call)

FOR IOS

user register

{
  "username": "string",
  "password": "string",
  "phone_number": "string"
}

returns:

{
  "user": {
    "id": integer,
    "username": "string"
  },
  "token": "string"
}

plant(multipart/form-data)

{
  "nickname": "string",
  "h2o_frequency": "string",
  "species_name": "string",
  "image": file
}

returns:

[
  {
    id: integer,
    "nickname": "string",
    "h2o_frequency": "string",
    "image": "string",
    "species_name": "string"
  }
]

About

Water My Plants is an application that allows users to add plants and keep track of their watering schedule.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published