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
Request Parameter : id : User primary key in Postgres DB
Payload : id, token : User primary key and non-expired token id
{
"id" : "user id in Postgres DB",
"token" : "published Json Web Token to the user which expiration hour is 1 hour and issuer is hmm"
}
Request Body : Not Required
Input need_to_be_modified fields.
Response :
{
"User data modified !"
}
🔺 Delete a specific user
URI
Method
Description
/user/:id
DELETE
Delete a specific user in the service by user id
Request Parameter : id : User primary key in Postgres DB
Payload : id, token : User primary key and published non-expired token id
{
"id" : "user id in Postgres DB",
"token" : "published Json Web Token to the user which expiration hour is 1 hour and issuer is hmm"
}
Request Body : Not Required
Input need_to_be_modified fields.
Response :
{
"User deleted !"
}
🔸 Get a following and follower list
URI
Method
Description
/follow/:id
GET
Get a list of following-user and follower-user by user id
Request Parameter : id : User primary key in Postgres DB
Payload : id, token : User primary key and published non-expired token id
{
"id" : "user id in Postgres DB",
"token" : "published Json Web Token to the user which expiration hour is 1 hour and issuer is hmm"
}
Request Body : Not Required
Response :
{
"following":[
{
"id" : "user id in Postgres DB",
"name" : "user name",
"profileImageUri" : "user profile image URI and default image is /images/person.png",
"backgroundImageUri" : "user background image URI",
"comment": "user comment"
},
],
"follower": [
{
"id" : "user id in Postgres DB",
"name" : "user name",
"profileImageUri" : "user profile image URI and default image is /images/person.png",
"backgroundImageUri" : "user background image URI",
"comment": "user comment"
},
]
}
🔹 Post a new following
URI
Method
Description
/follow/:id
POST
Add a new following-user into following list
Request Parameter : id : User primary key in Postgres DB
Payload : id, token : User primary key and published non-expired token id
{
"id" : "user id in Postgres DB",
"token" : "published Json Web Token to the user which expiration hour is 1 hour and issuer is hmm"
}
Request Body :
{
"followingName" : "user name who wish to follow"
}
Response :
{
"New followed !"
}
🔺 Delete a specific following
URI
Method
Description
/follow/:id
DELETE
Delete a following-user from following list by user id and friend id
Request Parameter : id : User primary key in Postgres DB
Payload : id, token : User primary key and published non-expired token id
{
"id" : "user id in Postgres DB",
"token" : "published Json Web Token to the user which expiration hour is 1 hour and issuer is hmm"
}
Request Body :
{
"followingName" : "user name who wish to follow"
}
Response :
{
"Unfollow"
}
🔸 Get all messages of user
URI
Method
Description
/message/:id
GET
GET a list of messages that a user sent or received in the service today by user id and message id
Request Parameter : id : User primary key in Postgres DB
Payload : id, token : User primary key and published non-expired token id
{
"id" : "user id in Postgres DB",
"token" : "published Json Web Token to the user which expiration hour is 1 hour and issuer is hmm"
}
Request Body : Not Required
Response :
{
"sent": [
{
"sender" : "user name who sent the message",
"receiver" : "user name who received the message",
"content" : "message",
"type" : "true : message sent"
},
],
"received": [
{
"sender" : "user name who sent the message",
"receiver" : "user name who received the message",
"content" : "message",
"type" : "false : message received"
},
]
}
🔹 Post a new message
URI
Method
Description
/message/:id
POST
Send a message to one of following users and the message is stored as a sent message
Request Parameter : Not Required
Payload : id, token : User primary key and published non-expired token id
{
"id" : "user id in Postgres DB",
"token" : "published Json Web Token to the user which expiration hour is 1 hour and issuer is hmm"
}
Request Body :
{
"targetUserId" : "user id who wish to be sent",
"content" : "message"
}
Response :
{
"Message sent!"
}
Roadmap
See the open issues for a list of proposed features