Followship API
追蹤指定使用者
POST hostname/api/followships
Request Body
Name
Type
Description
id*
integer
追蹤對象的ID
{
"status": "success",
"data": {
"id": integer,
"followingId": integer,
"followerId": integer,
"createdAt": timestamp
},
"message": "成功追蹤對方"
}{
"code" : 500,
"status": "error",
"message": "系統出錯"
}{
"code" : 404,
"status": "error",
"message": "追蹤對象不存在"
}{
"status": "error",
"message": "使用者不允許追蹤自己"
}{
"code" : 403,
"status": "error",
"message": "該對象已被追蹤,不可重複追蹤"
}{
"code" : 403,
"status": "error",
"message": "存取被拒"
}取消追蹤指定使用者
DELETE hostname/api/followships/:id
Path Parameters
Name
Type
Description
id*
string
想要取消追蹤對象的ID
{
"status": "success",
"data": {
"id": integer,
"followingId": integer,
"followerId": integer,
"createdAt": timestamp
},
"message": "成功取消追蹤對方"
}{
"code": 500,
"status": "error",
"message": "系統出錯"
}{
"code": 404,
"status": "error",
"message": "追蹤對象不存在"
}{
"status": "error",
"message": "使用者不能取消追蹤自己"
}{
"code": 403,
"status": "error",
"message": "該對象從未被追蹤,不可取消追蹤"
}{
"code" : 403,
"status": "error",
"message": "存取被拒"
}Last updated