Appearance
点赞
获取点赞列表
GET /resource_likes
权限
- 需要认证
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
isILike | query | string | false | 我点赞的 |
targetId | query | string | false | 被点赞资源id |
targetType | query | string | false | 被点赞资源类型 |
sort | query | string | false | 排序字段 |
offset | query | string | false | 分页偏移值, 默认0 |
limit | query | string | false | 每一页数量, 默认10 |
响应
json
{
"data": [
{
"id": "1",
"targetId": "3",
"targetType": "knowledge",
"userId": "272",
"createdTime": "2020-12-07T21:56:38+08:00"
},
{
"id": "5",
"targetId": "39",
"targetType": "knowledge",
"userId": "272",
"createdTime": "2020-12-07T22:20:46+08:00"
},
{
"id": "6",
"targetId": "38",
"targetType": "knowledge",
"userId": "272",
"createdTime": "2020-12-07T22:23:08+08:00"
},
{
"id": "7",
"targetId": "56",
"targetType": "knowledge",
"userId": "1228",
"createdTime": "2020-12-07T23:13:03+08:00"
},
{
"id": "8",
"targetId": "61",
"targetType": "knowledge",
"userId": "0",
"createdTime": "2020-12-07T23:36:04+08:00"
},
{
"id": "9",
"targetId": "61",
"targetType": "knowledge",
"userId": "0",
"createdTime": "2020-12-07T23:37:13+08:00"
},
{
"id": "10",
"targetId": "61",
"targetType": "knowledge",
"userId": "0",
"createdTime": "2020-12-07T23:37:25+08:00"
},
{
"id": "11",
"targetId": "61",
"targetType": "knowledge",
"userId": "0",
"createdTime": "2020-12-07T23:37:33+08:00"
},
{
"id": "12",
"targetId": "75",
"targetType": "knowledge",
"userId": "1232",
"createdTime": "2020-12-08T15:39:53+08:00"
},
{
"id": "13",
"targetId": "61",
"targetType": "knowledge",
"userId": "0",
"createdTime": "2020-12-09T10:51:34+08:00"
}
],
"paging": {
"total": 30,
"offset": 0,
"limit": 10
}
}
字段说明
名称 | 类型 | 必选 | 约束 | 说明 |
---|---|---|---|---|
» id | integer(int64) | false | none | none |
» targetId | integer(int64) | false | none | none |
» targetType | string | false | none | none |
» userId | integer(int64) | false | none | none |
» createdTime | integer(int64) | false | none | none |
点赞资源
POST /resource_like
权限
- 需要认证
请求参数Body请求参数
json
{
"targetId": 1,
"targetType": "knowledge",
"userId": 2
}
GET 获取点赞
GET /resource_like/{id}
权限
- 需要认证
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
id | path | string | true | none |
响应
json
{
"id": "1",
"targetId": "3",
"targetType": "knowledge",
"userId": "272",
"createdTime": "2020-12-07T21:56:38+08:00"
}
参数说明
名称 | 类型 | 必选 | 约束 | 说明 |
---|---|---|---|---|
» id | integer(int64) | false | none | none |
» targetId | integer(int64) | false | none | none |
» targetType | string | false | none | none |
» userId | integer(int64) | false | none | none |
» createdTime | integer(int64) | false | none | none |
取消收藏
DELETE /resource_like/{id}
权限
- 需要认证
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
id | path | string | true | none |
响应
json
{
"success": true
}