You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Successful response will will return an accessToken to be used as Bearer for authenticating below post requests.
Get individual post
GET /api/post/get/:id
Parameter
Type
Description
Bearer accessToken
varchar
Required.
id
number
Required. id of the post as last parameter in request
Create a new post
POST /api/post/new
Parameter
Type
Description
Bearer accessToken
varchar
Required.
Will return post object which contains post details including a google cloud url for each post image & a createAt attribute.
Post response object will also contain a userId which = the user that created the post. This userId is a foreignkey on our posts postgres table linking the two together.
Images are currently static.
Edit a posts description
POST /api/post/update/:id
Parameter
Type
Description
Bearer accessToken
varchar
Required.
id
number
Required. id of the post as last parameter in request
description
string
Required. New description
Will return post object with edited description.
Add a friend to current users friendslist
POST /api/friend/add
Parameter
Type
Description
Bearer accessToken
varchar
Required.
friendId
number
Required. id of the friend you would like to add
Will return a http response 200.
Remove a friend from current users friendslist
DELETE /api/friend/remove
Parameter
Type
Description
Bearer accessToken
varchar
Required.
friendId
number
Required. id of the friend you would like to remove
Will return a http response 200.
Get current users friendslist
GET /api/friend/flist
Parameter
Type
Description
Bearer accessToken
varchar
Required.
Will return an array of friend objects which includes the friends name & email