{
"id": string,
"userId": string,
"plant": string,
"envData":
{
"humidity": string,
"temperature": string,
"light": string,
},
"images": string[],
"date": string
}- method:
GET - path:
/post/{postId} - returns:
{ "Posts": []post, //use first element of array "Success": integer, // 1 for success, 0 for failure "Message": string }
- method:
GET - path:
/post/user/{userID} - returns:
{ "Posts": []post, "Success": integer, // 1 for success, 0 for failure "Message": string }
-
path:
/post/new -
method:
POST -
parameters:
-
Header:
Name Description Type x-auth-token authentication token of the user String
{ "userId": string, "plant": string, "envData": { "humidity": string, "temperature": string, "light": string, }, "images": string[], }
-
-
returns:
{ "Posts": []post, // Will return NULL "Success": integer, // 1 for success, 0 for failure "Message": string }
-
path:
/post/{postId} -
method:
DELETE -
params:
-
Header:
Name Description Type x-auth-token authentication token of the user String
-
-
returns:
{ "Posts": []post, // Will return NULL "Success": integer, // 1 for success, 0 for failure "Message": string }
-
path:
/post/vote -
method:
POST -
params:
-
Header:
Name Description Type x-auth-token authentication token of the user String
-
-
returns:
{ "Posts": []post, "success": integer, "message" : string }