POST https://lxapi.lexiangla.com/cgi-bin/v1/shares
document
创建轻享(在指定K吧)
{
"data": {
"attributes": {
"content": "接口创建轻享,发表K吧",
"media_type": "link",
"media_data": {
"pic_url": "https://lexiangla.com//favicon.ico",
"link": "https://lexiangla.com",
"title": "接口创建"
}
},
"relationships": {
"module": {
"type": "team",
"id": "8d9ff3eedab611e9a4540a58ac1303ea"
},
"topics": [
{
"type": "topic",
"id": 1
},
{
"type": "topic",
"id": 2
}
]
}
}
}
$options = [
"content" => "php创建轻享,发表K吧",
"media_type" => "link",
"media_data" => [
"pic_url" => "https://lexiangla.com/favicon.ico",
"link" => "https://lexiangla.com",
"title" => "链接标题",
],
"team_id" => "8d9ff3eedab611e9a4540a58ac1303ea",
"topic_ids" => [1, 2],
];
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->postShare($staff_id, $options);
multimedia
多媒体内容,其中图片 (opens new window)和视频 (opens new window)都需要先调用乐享开放接口上传获取资源地址和ID。
当多媒体类型为链接时,即当 media_type
为link
时,media_data
的请求:
创建轻享(轻享广场)
{
"data": {
"attributes": {
"content": "接口创建link",
"media_type": "link",
"media_data": {
"pic_url": "https://lexiangla.com//favicon.ico",
"link": "https://lexiangla.com",
"title": "接口创建"
}
}
}
}
$options = [
"content" => "php创建link",
"media_type" => "link",
"media_data" => [
"pic_url" => "https://lexiangla.com/favicon.ico",
"link" => "https://lexiangla.com",
"title" => "链接标题",
]
]
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->postShare($staff_id, $options);
当多媒体类型为图片时,即当 media_type
为 image
时,media_data
的请求:
创建轻享(上传图片)
{
"data": {
"attributes": {
"content": "接口创建image",
"media_type": "image",
"media_data": [
{
"url": "https://lexiangla.com/assets/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"url": "https://lexiangla.com/assets/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
]
},
"relationships": {
"topics": [
{
"type": "topic",
"id": 1
},
{
"type": "topic",
"id": 2
}
]
}
}
}
$options = [
"content" => "php创建image",
"media_type" => "image",
"media_data" => [
"image_url" => [
"https://tencent.lexiangla.com/wiki/logo.png",
"https://tencent.lexiangla.com/wiki/logo.png",
"https://tencent.lexiangla.com/wiki/logo.png",
],
],
];
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->postShare($staff_id, $options);
当多媒体类型为视频时,即当 media_type
为 video
时,media_data
的请求:
创建轻享(上传视频)
{
"data": {
"attributes": {
"content": "接口创建video",
"media_type": "video",
"media_data": {
"id": "31505e48111a11ec9a215a4b680fb277"
}
},
"relationships": {
"topics": [
{
"type": "topic",
"id": 1
},
{
"type": "topic",
"id": 2
}
]
}
}
}
$options = [
"content" => "php创建video",
"media_type" => "video",
"media_data" => [
"video_id" => "31505e48111a11ec9a215a4b680fb277",
],
"topic_id" => [1, 2],
];
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->postShare($staff_id, $options);
参数名称 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
data.type | 是 | 无 | 必须为share,表示轻享 |
data.attributes.content | 否 | 空 | 轻享正文内容,若无则要求必须有多媒体内容 |
data.attributes.media_type | 否 | 无 | 多媒体的类型如 image,video,link 等,其中 image 和 video 等类型需要提前访问内容多媒体接口获取。 |
data.attributes.media_data | 是 | 无 | 多媒体内容,详细的见下文 |
data.relationships.module | 否 | 无 | 轻享所属的板块,默认为全公司,type为team时,表示在归属k吧 |
data.relationships.module.type | 否 | 无 | 目前支持team |
data.relationships.module.team.id | 否 | 无 | k吧id |
data.relationships.topics | 否 | 无 | 关联的话题数组 |
data.relationships.topics.id | 是 | 无 | 话题id,需要先调用下文话题接口获得话题id |
data.relationships.topics.type | 是 | 无 | 必须为topic 表示为话题 |
当 media_type
为 link
时, media_data
字段类型为对象,参数说明:
参数名称 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
pic_url | 是 | 无 | 链接显示的图片 |
link | 是 | 空 | 链接内容 |
title | 是 | 无 | 链接标题 |
当 media_type
为 image
时,media_data
字段类型为对象,参数说明:
参数名称 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
url | 是 | 无 | 图片地址 |
当 media_type
为 video
时,media_data
字段类型为对象,参数说明:
参数名称 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
id | 是 | 无 | 视频 id |
document
{
"data": {
"type": "share",
"id": "01e55c266ddb11ec9a84de3fb47cb719",
"attributes": {
"content": "接口创建video",
"summary": "接口创建video",
"created_at": "2022-01-05 11:53:13",
"media_type": "video",
"media_data": {
"id": "dcc75aec6dd611ec99755e20051aadd1",
"vod_cover_url": "https://xxxxxxxxxx.vod2.myqcloud.com/8b973c82vodtransgzp1252005255/38d7d380387702294095xxxxxx/coverBySnapshot/coverBySnapshot_10_0.jpg"
}
},
"relationships": {
"owner": {
"data": {
"type": "staff",
"id": "sanzhang"
}
},
"topics": {
"data": [
{
"type": "topic",
"id": 1
},
{
"type": "topic",
"id": 2
}
]
}
}
},
"included": [
{
"type": "staff",
"id": "sanzhang",
"attributes": {
"name": "张三",
"english_name": null,
"organization": "测试组"
}
},
{
"type": "topic",
"id": 1,
"attributes": {
"content": "测试"
}
},
{
"type": "topic",
"id": 2,
"attributes": {
"content": "测试2"
}
}
],
"links": {
"self": "https://lxapi.lexiangla.com/cgi-bin/v1/shares/01e55c266ddb11ec9a84de3fb4xxxxxx"
}
}
参数 | 说明 |
---|---|
attributes.content | 轻享的内容 |
attributes.summary | 轻享详情摘要 |
attributes.created_at | 轻享的创建时间 |
attributes.media_type | 多媒体的类型;如 image,video,link 等 |
relationships.owner.id | 轻享的创建人id |
relationships.topic.id | 轻享的话题id |
included.attributes.name | 轻享创建者的的名字 |
included.attributes.english_name | 轻享创建者的的英文名 |
included.attributes.organization | 轻享创建者的所属部门 |
DELETE https://lxapi.lexiangla.com/cgi-bin/v1/shares/{share_id}
参数 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
share_id | 是 | 无 | 轻享的id |
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->deleteShare($staff_id, $share_id);
document
[]
{
"errors":[
{
"detail":"不存在ID为``的share资源"
}
]
}
GET https://lxapi.lexiangla.com/cgi-bin/v1/shares/{share_id}
参数 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
share_id | 是 | 无 | 轻享id |
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->forStaff($staff_id)->get("/shares/$share_id");
document
{
"data": {
"type": "share",
"id": "a3f77f086dd611ec81f302932a06edd3",
"attributes": {
"content": "创建轻享",
"summary": "创建轻享",
"multimedia": null,
"is_top": false,
"like_count": 1,
"like_type_count": [
1
],
"reply_count": 1,
"created_at": "2022-01-05 11:21:58"
},
"relationships": {
"owner": {
"data": {
"type": "staff",
"id": "sanzhang"
}
},
"likes": {
"data": [
{
"type": "share_like",
"id": "d0282bf46dd611ecbd18769b5d2021e1"
}
]
},
"topics": {
"data": [
{
"type": "topic",
"id": 1
}
]
}
}
},
"included": [
{
"type": "staff",
"id": "sanzhang",
"attributes": {
"name": "张三",
"english_name": null,
"organization": "设计部"
}
},
{
"type": "share_like",
"id": "d0282bf46dd611ecbd18769b5d2021e1",
"attributes": {
"like_type": "GRINNING_FACE"
},
"relationships": {
"staff": {
"data": {
"type": "staff",
"id": "sili"
}
}
}
},
{
"type": "topic",
"id": 1,
"attributes": {
"content": "测试"
}
}
],
"links": {
"self": "https://lxapi.lexiangla.com/cgi-bin/v1/shares/a3f77f086dd611ec81f302932axxxxxx"
}
}
参数 | 说明 |
---|---|
attributes.content | 轻享的内容 |
attributes.summary | 轻享详情摘要 |
attributes.created_at | 轻享的创建时间 |
attributes.multimedia | 多媒体内容;如:图片、视频或链接 |
attributes.is_top | 轻享是否置顶 |
attributes.like_count | 轻享点赞总数 |
attributes.like_type_count | 轻享每种表情点赞的数(点赞后,接口获取同步有点延缓) |
attributes.reply_count | 轻享评论数(不统计评论回复) |
relationships.owner.id | 轻享的创建人id |
relationships.likes.id | 轻享的点赞id |
relationships.topic.id | 轻享的话题id |
included.attributes.name | 轻享创建者的的名字 |
included.attributes.english_name | 轻享创建者的的英文名 |
included.attributes.organization | 轻享创建者的所属部门 |
GET https://lxapi.lexiangla.com/cgi-bin/v1/shares
支持分页参数和排序:(通用说明?)
支持时间范围过滤
参数 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
module_type | 否 | 无 | 为team,表示获取某k吧归属下的轻享 |
module_id | 否 | 无 | module_type为team时,为k吧id |
per_page | 否 | 有 | 分页参数,默认为 20 |
page | 否 | 有 | 默认为 1 |
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->forStaff($staff_id)->get("/shares", [
//"module_type" => "team",
//"module_id" => "$module_id",
]);
document
{
"data": [
{
"type": "share",
"id": "f8f683e66dd611ecb108fe63efce4656",
"attributes": {
"content": "创建轻享2",
"summary": "创建轻享2",
"multimedia": null,
"is_top": false,
"like_count": 0,
"like_type_count": null,
"reply_count": 0,
"created_at": "2022-01-05 11:24:20"
},
"relationships": {
"owner": {
"data": {
"type": "staff",
"id": "LX001"
}
},
"topics": {
"data": [
{
"type": "topic",
"id": 1
},
{
"type": "topic",
"id": 2
}
]
}
}
},
{
"type": "share",
"id": "ddcd7f846dd611ec978b7ea090660e22",
"attributes": {
"content": "",
"summary": "",
"is_top": false,
"like_count": 0,
"like_type_count": null,
"reply_count": 0,
"created_at": "2022-01-05 11:23:35",
"media_type": "video",
"media_data": {
"id": "dcc75aec6dd611ec99755e20051aadd1",
"vod_cover_url": "https://xxxxxxxxxx.vod2.myqcloud.com/8b973c82vodtransgzp1252005255/38d7d38038770229409587xxxx/coverBySnapshot/coverBySnapshot_10_0.jpg"
}
},
"relationships": {
"owner": {
"data": {
"type": "staff",
"id": "sanzhang"
}
}
}
},
{
"type": "share",
"id": "ca861fe46dd611ecb25ac2ffd8959bd0",
"attributes": {
"content": "<img class=\"lx-expression\" src=\"//static.lexiang-asset.com/build/img/face-v2/expression14-e606e20783.png\" alt=\"/微笑 \"/><img class=\"lx-expression\" src=\"//static.lexiang-asset.com/build/img/face-v2/expression14-e606e20783.png\" alt=\"/微笑 \"",
"summary": "/微笑 /微笑",
"multimedia": null,
"is_top": false,
"like_count": 1,
"like_type_count": [
1
],
"reply_count": 0,
"created_at": "2022-01-05 11:23:02"
},
"relationships": {
"owner": {
"data": {
"type": "staff",
"id": "sanzhang"
}
}
}
},
{
"type": "share",
"id": "c55206326dd611eca21b8abea22628c9",
"attributes": {
"content": "",
"summary": "",
"is_top": false,
"like_count": 1,
"like_type_count": [
1
],
"reply_count": 0,
"created_at": "2022-01-05 11:22:54",
"media_type": "image",
"media_data": [
{
"url": "https://lexiangla.com/assets/c43545986dd611eca3d7ee848940xxxx",
"origin_url": "https://image.lexiang-asset.com/company_01dde298016211eba859525400xxxxxx/assets/2022/01/c3b9d8ae-6dd6-11ec-8cd5-1a6bcc957e15.jpg?sign=zoOAfmxSezzBGPkpPCxGHhoXUhJhPTEwMDI5MTYyJms9QUtJRE4yMmgydDZqV0pscEtMYWdsVVRSaWx6czFycjZvYWZ2JmU9MTY0MTk1Nzc3MiZ0PTE2NDEzNTI5NzImcj0xMjkyODE0NjIzJmY9L2NvbXBhbnlfMDFkZGUyOTgwMTYyMTFlYmE4NTk1MjU0MDAyZjEwMjAvYXNzZXRzLzIwMjIvMDEvYzNiOWQ4YWUtNmRkNi0xMWVjLThjZDUtMWE2YmNjOTU3ZTE1LmpwZyZiPWxleGlhbmctMTAwMjkxNjI="
},
{
"url": "https://lexiangla.com/assets/c438feb86dd611eca99e7e7a6a53xxxx",
"origin_url": "https://image.lexiang-asset.com/company_01dde298016211eba859525400xxxxxx/assets/2022/01/c3ba932a-6dd6-11ec-9877-1a6bcc957e15.jpg?sign=4r5r7NKvM+cmAv/9gyeMVqPaOXlhPTEwMDI5MTYyJms9QUtJRE4yMmgydDZqV0pscEtMYWdsVVRSaWx6czFycjZvYWZ2JmU9MTY0MTk1Nzc3MiZ0PTE2NDEzNTI5NzImcj0xMTMyMDYyOTUyJmY9L2NvbXBhbnlfMDFkZGUyOTgwMTYyMTFlYmE4NTk1MjU0MDAyZjEwMjAvYXNzZXRzLzIwMjIvMDEvYzNiYTkzMmEtNmRkNi0xMWVjLTk4NzctMWE2YmNjOTU3ZTE1LmpwZyZiPWxleGlhbmctMTAwMjkxNjI="
},
{
"url": "https://lexiangla.com/assets/c43719046dd611ecadfe76d605a9xxxx",
"origin_url": "https://image.lexiang-asset.com/company_01dde298016211eba859525400xxxxxx/assets/2022/01/c3bb30c8-6dd6-11ec-a6c7-1a6bcc957e15.jpg?sign=UpH/qWl1Y5EkWqjfv/pPOSIdxaFhPTEwMDI5MTYyJms9QUtJRE4yMmgydDZqV0pscEtMYWdsVVRSaWx6czFycjZvYWZ2JmU9MTY0MTk1Nzc3MiZ0PTE2NDEzNTI5NzImcj0zNjcwNzI4NzAmZj0vY29tcGFueV8wMWRkZTI5ODAxNjIxMWViYTg1OTUyNTQwMDJmMTAyMC9hc3NldHMvMjAyMi8wMS9jM2JiMzBjOC02ZGQ2LTExZWMtYTZjNy0xYTZiY2M5NTdlMTUuanBnJmI9bGV4aWFuZy0xMDAyOTE2Mg=="
}
]
},
"relationships": {
"owner": {
"data": {
"type": "staff",
"id": "sanzhang"
}
}
}
},
{
"type": "share",
"id": "a3f77f086dd611ec81f302932a06edd3",
"attributes": {
"content": "创建轻享",
"summary": "创建轻享",
"multimedia": null,
"is_top": false,
"like_count": 1,
"like_type_count": [
1
],
"reply_count": 1,
"created_at": "2022-01-05 11:21:58"
},
"relationships": {
"owner": {
"data": {
"type": "staff",
"id": "sanzhang"
}
},
"topics": {
"data": [
{
"type": "topic",
"id": 1
}
]
}
}
}
],
"links": {
"first": "https://lxapi.lexiangla.com/cgi-bin/v1/shares?page=1",
"last": "https://lxapi.lexiangla.com/cgi-bin/v1/shares?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://lxapi.lexiangla.com/cgi-bin/v1/shares",
"per_page": 20,
"to": 5,
"total": 5
},
"included": [
{
"type": "staff",
"id": "sanzhang",
"attributes": {
"name": "张三",
"english_name": null,
"organization": "测试部"
}
},
{
"type": "topic",
"id": 1,
"attributes": {
"content": "测试"
}
},
{
"type": "topic",
"id": 2,
"attributes": {
"content": "测试2"
}
}
]
}
参数 | 说明 |
---|---|
attributes.content | 轻享的内容 |
attributes.summary | 轻享详情摘要 |
attributes.created_at | 轻享的创建时间 |
attributes.multimedia | 多媒体内容,可参考创建轻享类型的说明 |
attributes.media_type | 多媒体的类型,如 image,video,link 等 |
attributes.media_data | 多媒体内容 |
attributes.is_top | 轻享是否置顶 |
attributes.like_count | 轻享点赞总数 |
attributes.like_type_count | 轻享每种表情点赞的数(点赞后,接口获取同步有点延缓) |
attributes.reply_count | 轻享评论数(不统计评论回复) |
relationships.owner.id | 轻享的创建人id |
relationships.likes.id | 轻享的点赞id |
relationships.topic.id | 轻享的话题id |
included.attributes.name | 轻享创建者的的名字 |
included.attributes.english_name | 轻享创建者的的英文名 |
included.attributes.organization | 轻享创建者的所属部门 |
POST https://lxapi.lexiangla.com/cgi-bin/v1/shares/{share_id}/replies
document
创建轻享评论
{
"data": {
"attributes": {
"content": "接口添加评论"
}
}
}
$attributes = [
"content" => "php添加评论"
];
$shares_id = {share_id};
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->postShareReply($staff_id, $shares_id, $attributes);
创建轻享评论的回复
{
"data": {
"attributes": {
"content": "接口回复"
},
"relationships": {
"parent": {
"type": "share_reply",
"id": "8d9090a8055b11ecb0c14e09c0d10e53"
}
}
}
}
$attributes = [
"content" => "php回复"
];
$shares_id = {share_id};
$options = [
"parent_reply_id" => "8d9090a8055b11ecb0c14e09c0d10e53"
];
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->postShareReply($staff_id, $shares_id, $attributes,$options);
参数 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
data.type | 是 | 无 | 必须为 share_reply |
data.relationships.parent | 否 | 无 | 父轻享评论,若为空,则为轻享一级评论 |
data.relationships.parent.id | 否 | 无 | 父轻享评论id |
data.relationships.parent.type | 否 | 无 | 固定为share_reply |
document
{
"data": {
"type": "share_reply",
"id": "ae2242d06f9611ec90d7a2eef8c877a5",
"attributes": {
"content": "接口测试评论回复",
"summary": "接口测试评论回复",
"created_at": "2022-01-07 16:49:09",
"updated_at": "2022-01-07 16:49:09"
},
"relationships": {
"owner": {
"data": {
"type": "staff",
"id": "sanzhang"
}
}
}
},
"included": [
{
"type": "staff",
"id": "sanzhang",
"attributes": {
"name": "张三",
"english_name": null,
"organization": "设计部 "
}
}
]
}
参数 | 说明 |
---|---|
attributes.content | 轻享的内容 |
attributes.summary | 轻享详情摘要 |
attributes.created_at | 轻享的创建时间 |
attributes.updated_at | 轻享的更新时间 |
relationships.owner.id | 轻享的创建人id |
included.attributes.name | 轻享创建者的的名字 |
included.attributes.english_name | 轻享创建者的的英文名 |
included.attributes.organization | 轻享创建者的所属部门 |
DELETE https://lxapi.lexiangla.com/cgi-bin/v1/shares/{share_id}/replies/{reply_id}
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->deleteShareReply($staff_id, $share_id, $reply_id)
document
[]
GET https://lxapi.lexiangla.com/cgi-bin/v1/shares/{share_id}/replies
支持分页参数和排序:(通用说明?)
支持时间范围过滤
参数 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
per_page | 否 | 有 | 分页参数,默认为 20 |
page | 否 | 有 | 默认为 1 |
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->forStaff($staff_id)->get("/shares/$share_id/replies");
document
{
"data": [
{
"type": "share_reply",
"id": "26c9d7546dfb11ec967e1a2888xxxxxx",
"attributes": {
"content": "接口评论",
"summary": "接口评论",
"created_at": "2022-01-05 15:43:19",
"updated_at": "2022-01-05 15:43:19"
},
"relationships": {
"owner": {
"data": {
"type": "staff",
"id": "sanzhang"
}
}
}
},
{
"type": "share_reply",
"id": "e5df41306e0311ec93c47ea090xxxxxx",
"attributes": {
"content": "回复接口的评论",
"summary": "回复接口的评论",
"created_at": "2022-01-05 16:45:56",
"updated_at": "2022-01-05 16:45:56"
},
"relationships": {
"parent": {
"data": {
"type": "share_reply",
"id": "26c9d7546dfb11ec967e1a2888xxxxxx"
}
},
"owner": {
"data": {
"type": "staff",
"id": "sili"
}
}
}
}
],
"links": {
"first": "https://lxapi.lexiangla.com/cgi-bin/v1/shares/ee9f30186dfa11ecab427a5917xxxxxx/replies?page=1",
"last": "https://lxapi.lexiangla.com/cgi-bin/v1/shares/ee9f30186dfa11ecab427a5917xxxxxx/replies?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://lxapi.lexiangla.com/cgi-bin/v1/shares/ee9f30186dfa11ecab427a5917xxxxxx/replies",
"per_page": 20,
"to": 2,
"total": 2
},
"included": [
{
"type": "share_reply",
"id": "26c9d7546dfb11ec967e1a2888xxxxxx",
"attributes": {
"content": "接口评论",
"summary": "接口评论",
"created_at": "2022-01-05 15:43:19",
"updated_at": "2022-01-05 15:43:19"
},
"relationships": {
"owner": {
"data": {
"type": "staff",
"id": "sanzhang"
}
}
}
},
{
"type": "staff",
"id": "sanzhang",
"attributes": {
"name": "张三",
"english_name": null,
"organization": "测试部"
}
},
{
"type": "staff",
"id": "sili",
"attributes": {
"name": "李四",
"english_name": null,
"organization": "开发部"
}
}
]
}
参数 | 说明 |
---|---|
attributes.content | 轻享的内容 |
attributes.summary | 轻享详情摘要 |
attributes.created_at | 轻享的创建时间 |
attributes.updated_at | 轻享的更新时间 |
relationships.owner.id | 轻享的创建人id |
included.attributes.name | 轻享创建者的的名字 |
included.attributes.english_name | 轻享创建者的的英文名 |
included.attributes.organization | 轻享创建者的所属部门 |
POST https://lxapi.lexiangla.com/cgi-bin/v1/shares/{share_id}/likes
document
{
"data": {
"type": "share_like",
"attributes": {
"like_type": "THUMBS_UP"
}
}
}
data.attributes.like_type
可以是以下五种点赞表情类型:
表情名称 | 表情 |
---|---|
THUMBS_UP | ![]() |
RED_HEART | ![]() |
GRINNING_FACE | ![]() |
TEARS_OF_JOY | ![]() |
CLAPPING_HANDS | ![]() |
$attributes = [
"like_type" => "GRINNING_FACE",
];
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->postShareLike($staff_id, $share_id, $attributes);
document
{
"data": {
"type": "share_like",
"id": "d0282bf46dd611ecbd18769b5d2021e1",
"attributes": {
"like_type": "TEARS_OF_JOY"
}
}
}
####参数说明:
参数 | 说明 |
---|---|
data.type.id | 轻享点赞id |
attributes.like_type | 点赞表情类型 |
DELETE https://lxapi.lexiangla.com/cgi-bin/v1/shares/{share_id}/likes/{like_id}
####参数说明:
参数 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
share_id | 是 | 无 | 轻享 id |
like_id | 是 | 无 | 点赞 id |
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->deleteShareLike($staff_id, $share_id, $like_id);
document
[]
POST https://lxapi.lexiangla.com/cgi-bin/v1/topics
document
{
"data":{
"type":"topic",
"attributes":{
"content":"创建轻享话题"
}
}
}
####参数说明:
参数名称 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
data.type | 是 | 无 | 必须为 topic 表示话题 |
data.attributes.content | 是 | 无 | 轻享话题内容 |
$attributes = [
"content" => "创建轻享话题"
];
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->postShareTopic($staff_id, $attributes);
document
{
"data": {
"type": "topic",
"id": 3,
"attributes": {
"content": "创建轻享话题"
}
},
"links": {
"self": "https://lxapi.lexiangla.com/cgi-bin/v1/topics/3"
}
}
####参数说明:
参数 | 说明 |
---|---|
data.type.id | 轻享话题id |
attributes.content | 轻享话题内容 |
GET https://lxapi.lexiangla.com/cgi-bin/v1/topics/{topic_id}
参数名称 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
topic_id | 是 | 无 | 表示查询的话题id |
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->get("/topics/$topic_id");
document
{
"data": {
"type": "topic",
"id": 3,
"attributes": {
"content": "创建轻享话题"
}
},
"links": {
"self": "https://lxapi.lexiangla.com/cgi-bin/v1/topics/3"
}
}
####参数说明:
参数 | 说明 |
---|---|
data.type.id | 轻享话题id |
attributes.content | 轻享话题内容 |