Appearance
收藏
获取收藏列表
GET /resource_favorite
权限
- 需要认证
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
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": "9",
"targetType": "offlineCourseTemplate",
"userId": "1207",
"createdTime": "2020-06-30T15:40:29+08:00"
},
{
"id": "3",
"targetId": "23",
"targetType": "offlineCourseTemplate",
"userId": "1106",
"createdTime": "2020-07-30T20:29:22+08:00"
},
{
"id": "4",
"targetId": "15",
"targetType": "offlineCourseTemplate",
"userId": "1106",
"createdTime": "2020-07-30T20:29:40+08:00"
},
{
"id": "5",
"targetId": "3",
"targetType": "knowledge",
"userId": "272",
"createdTime": "2020-12-07T21:56:39+08:00"
},
{
"id": "12",
"targetId": "56",
"targetType": "knowledge",
"userId": "1228",
"createdTime": "2020-12-07T23:13:04+08:00"
},
{
"id": "13",
"targetId": "48",
"targetType": "knowledge",
"userId": "1228",
"createdTime": "2020-12-07T23:13:33+08:00"
},
{
"id": "14",
"targetId": "61",
"targetType": "knowledge",
"userId": "1228",
"createdTime": "2020-12-07T23:19:06+08:00"
},
{
"id": "16",
"targetId": "61",
"targetType": "knowledge",
"userId": "1051",
"createdTime": "2020-12-07T23:48:51+08:00"
},
{
"id": "17",
"targetId": "39",
"targetType": "knowledge",
"userId": "272",
"createdTime": "2020-12-07T23:48:59+08:00"
},
{
"id": "18",
"targetId": "51",
"targetType": "knowledge",
"userId": "1051",
"createdTime": "2020-12-07T23:49:06+08:00"
}
],
"paging": {
"total": 35,
"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_favorite
权限
- 需要认证
请求参数Body请求参数
json
{
"targetId": 1,
"targetType": "knowledge"
}
GET 获取收藏
GET /resource_favorite/{id}
权限
- 需要认证
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
id | path | string | true | none |
响应
json
{
"id": "1",
"targetId": "9",
"targetType": "offlineCourseTemplate",
"userId": "1207",
"createdTime": "2020-06-30T15:40:29+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_favorite/{id}
权限
- 需要认证
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
id | path | string | true | none |
响应
json
{
"success": true
}