GET https://lxapi.lexiangla.com/cgi-bin/v1/tags
支持分页参数和排序:(通用说明?)
支持时间范围过滤
参数 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
page | 否 | 1 | 当前页数 |
per_page | 否 | 20 | 每页返回的数量 |
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->get('tags',[
'page' => 1,
'per_page' => 20
]);
document
{
"data": [
{
"type": "tag",
"id": "cf4e964851f211eaa03e0a58ac1300a3",
"attributes": {
"name": "标签",
"recommended_at": "2020-01-02 13:14:15"
}
}
],
"links": {
"first": "https://lxapi.lexiangla.com/cgi-bin/v1/tags?per_page=20&page=1",
"last": "https://lxapi.lexiangla.com/cgi-bin/v1/tags?per_page=20&page=329",
"prev": null,
"next": "https://lxapi.lexiangla.com/cgi-bin/v1/tags?per_page=20&page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 329,
"path": "https://lxapi.lexiangla.com/cgi-bin/v1/tags",
"per_page": 2,
"to": 2,
"total": 657
}
}
参数 | 说明 |
---|---|
name | 标签名称 |
recommended_at | 标签推荐时间,null 表示未推荐 |
question_count | 问题数 |
doc_count | 文档数 |
document_subscribers_count | 文档订阅人数 |
question_subscribers_count | 问题订阅人数 |
GET http://lxapi.lexiangla.com/cgi-bin/v1/staffs/{staff_id}/subscribed-tags?target_type={target_type}
参数 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
staff_id | 是 | 无 | 员工帐号 |
target_type | 是 | 无 | question获取订阅的乐问标签,doc获取订阅的文档标签 |
document
{
"data": [
{
"attributes": {
"name": "标签名称"
},
"id": "tag_id",
"type": "tag"
}
]
}
参数 | 说明 |
---|---|
name | 标签名称 |
id | 标签ID |
POST https://lxapi.lexiangla.com/cgi-bin/v1/staffs/{staffs_id}/relationships/subscribed-tags?target_type={target_type}
document
{
"data": [
{
"type": "tag",
"id": "tag_id"
},
{
"type": "tag",
"id": "tag_id2"
}
]
}
参数 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
staffs_id | 是 | 无 | 员工账号 |
target_type | 是 | 无 | question表示新增订阅乐问标签,doc表示新增订阅文档标签 |
type | 是 | 无 | type是固定的"tag" |
tag.id | 是 | 无 | 标签ID,最多支持新增订阅10个标签 |
DELETE https://lxapi.lexiangla.com/cgi-bin/v1/staffs/{staff_id}/relationships/subscribed-tags?target_type={target_type}
document
{
"data": [
{
"type": "tag",
"id": "tag_id"
},
{
"type": "tag",
"id": "tag_id2"
}
]
}
参数 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
staff_id | 是 | 无 | 员工帐号 |
target_type | 是 | 无 | question表示取消订阅乐问标签,doc表示取消订阅文档标签 |
type | 是 | 无 | type是固定的"tag" |
tag.id | 是 | 无 | 标签ID,最多支持取消订阅10个标签 |