GET https://lxapi.lexiangla.com/cgi-bin/v1/lecturers/{lecturer_id}/target-list
参数 | 是否必须 | 默认值 | 说明 |
---|---|---|---|
lecturer_id | 是 | 无 | 讲师的id |
type | 是 | 无 | 讲师开课模块,支持:event、live、class。 event 表示面授日程(活动),live表示直播日程(直播),class 表示在线课程(课程) |
document
{
"data": [
{
"type": "event",
"id": "7c990deef38e11ecbc0c525b6479971c",
"attributes": {
"title": "活动",
"started_at": "2037-01-31 08:00:00",
"ended_at": "2038-01-01 08:00:00",
"location": "北京xxx",
"logo": "//static.lexiang-asset.com/build/img/training-4c4f5c0e.png"
},
"links": {
"platform": "https://xxx.lexiangla.com/events/7c990deef38e11ecbc0c525b6479971c"
}
}
{
"type": "event",
"id": "198642f21a9711f0b41a36fcffcf5604",
"attributes": {
"started_at": "2025-05-01 00:00:00",
"ended_at": "2025-06-22 23:59:00",
"location": "测试1测试1测试1试1测试1测试1测试1测试1测试1测试1",
"title": "公开活动111",
"logo": "",
"sequence": 1,
"session_id": "1986f30a1a9711f09d1436fcffcf5604",
"app_source_type": "event"
},
"links": {
"platform": "https://km.lexiangla.net/events/198642f21a9711f0b41a36fcffcf5604"
}
},
],
"links": {
"first": "https://lxapi.lexiangla.com/cgi-bin/v1/lecturers/115c44bcbbbf11ec84958afdd6c3e2cd?type=event&page=1",
"last": "https://lxapi.lexiangla.com/cgi-bin/v1/lecturers/115c44bcbbbf11ec84958afdd6c3e2cd?type=event&page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://lxapi.lexiangla.com/cgi-bin/v1/lecturers/115c44bcbbbf11ec84958afdd6c3e2cd?type=event",
"per_page": 20,
"to": 1,
"total": 1
}
}
参数 | 说明 |
---|---|
id | 活动的id |
attributes.title | 活动的标题 |
attributes.started_at | 活动的开始时间 |
attributes.ended_at | 活动的截止时间 |
attributes.location | 活动地点 |
attributes.logo | 活动的封面图片地址 |
attributes.session_id | 活动的场次id |
attributes.sequence | 活动第几场次 |
document
{
"data": [
{
"type": "live",
"id": "a7b9a958ee1011ec892a3a26a00f57fe",
"attributes": {
"title": "直播1",
"started_at": "2022-06-17 15:38:00",
"visit_count": 14,
"status": "finished",
"pic": "https://image-pub.lexiang-asset.com/company_85535ed0c66311e5a2f8bf5011933e87/assets/2022/06/6316341a-ee10-11ec-9afe-3a26a00f57fe.jpg",
"online_count": 0
}
},
{
"type": "live",
"id": "8f78e764dbff11ecbec23e98edc86956",
"attributes": {
"title": "zhibo2",
"started_at": "2022-05-25 15:51:00",
"visit_count": 13,
"status": "finished",
"pic": "",
"online_count": 0
}
},
{
"type": "live",
"id": "09111ef371da4727ae2e67996eed7971",
"attributes": {
"title": "直播3",
"started_at": "2022-05-24 14:25:00",
"visit_count": 295,
"status": "finished",
"pic": "",
"online_count": 0
}
}
],
"links": {
"first": "https://lxapi.lexiangla.com/cgi-bin/v1/lecturers/115c44bcbbbf11ec84958afdd6c3e2cd?type=live&page=1",
"last": "https://lxapi.lexiangla.com/cgi-bin/v1/lecturers/115c44bcbbbf11ec84958afdd6c3e2cd?type=live&page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://lxapi.lexiangla.com/cgi-bin/v1/lecturers/115c44bcbbbf11ec84958afdd6c3e2cd?type=live",
"per_page": 20,
"to": 3,
"total": 3
}
}
参数 | 说明 |
---|---|
id | 直播的id |
attributes.title | 直播的标题 |
attributes.started_at | 直播的开始时间 |
attributes.visit_count | 直播总观看次数 |
attributes.status | 直播的状态(init:初始化, waiting:等待, pushing:推流状态, finished:完成, forbidden:无权限访问) |
attributes.pic | 直播封面图 |
document
{
"data": [
{
"type": "clazz",
"id": "633584c0d65311eca5896671424c3696",
"attributes": {
"title": "课程1",
"course_count": 1,
"type": 0,
"is_required": 0,
"cover_img": "",
"required_privilege_type": 2,
"optional_privilege_type": 1,
"participants_count": 2
},
"links": {
"platform": "https://xxx.lexiangla.com/classes/633584c0d65311eca5896671424c3696?type=0",
"manager": "https://xxx.lexiangla.com/classes/633584c0d65311eca5896671424c3696/settings?type=0"
}
},
{
"type": "clazz",
"id": "bbb67accd5b411ec9a599e9f7de51ecc",
"attributes": {
"title": "课程2",
"course_count": 2,
"type": 1,
"is_required": 0,
"cover_img": "",
"required_privilege_type": 2,
"optional_privilege_type": 1,
"participants_count": 1
},
"links": {
"platform": "https://xxx.lexiangla.com/classes/bbb67accd5b411ec9a599e9f7de51ecc?type=1",
"manager": "https://xxx.lexiangla.com/classes/bbb67accd5b411ec9a599e9f7de51ecc/settings?type=1"
}
},
{
"type": "clazz",
"id": "9e3dcb6cd5b411ec9df09e9f7de51ecc",
"attributes": {
"title": "课程3",
"course_count": 1,
"type": 0,
"is_required": 0,
"cover_img": "",
"required_privilege_type": 2,
"optional_privilege_type": 1,
"participants_count": 3
},
"links": {
"platform": "https://xxx.lexiangla.com/classes/9e3dcb6cd5b411ec9df09e9f7de51ecc?type=0",
"manager": "https://xxx.lexiangla.com/classes/9e3dcb6cd5b411ec9df09e9f7de51ecc/settings?type=0"
}
},
{
"type": "clazz",
"id": "b5cccbc6d4e111eca2c63a6a72ee00d3",
"attributes": {
"title": "课程4",
"course_count": 1,
"type": 0,
"is_required": 0,
"cover_img": "",
"required_privilege_type": 2,
"optional_privilege_type": 1,
"participants_count": 3
},
"links": {
"platform": "https://xxx.lexiangla.com/classes/b5cccbc6d4e111eca2c63a6a72ee00d3?type=0",
"manager": "https://xxx.lexiangla.com/classes/b5cccbc6d4e111eca2c63a6a72ee00d3/settings?type=0"
}
},
{
"type": "clazz",
"id": "49febb70cf4611ecbe69c6b6967eabfe",
"attributes": {
"title": "课程5",
"course_count": 1,
"type": 0,
"is_required": 0,
"cover_img": "https://xxx.lexiangla.com/assets/452eb80ccf4611ec91a4c6b6967eabfe",
"required_privilege_type": 2,
"optional_privilege_type": 1,
"participants_count": 2
},
"links": {
"platform": "https://xxx.lexiangla.com/classes/49febb70cf4611ecbe69c6b6967eabfe?type=0",
"manager": "https://xxx.lexiangla.com/classes/49febb70cf4611ecbe69c6b6967eabfe/settings?type=0"
}
}
],
"links": {
"first": "https://lxapi.lexiangla.com/cgi-bin/v1/lecturers/115c44bcbbbf11ec84958afdd6c3e2cd?type=class&page=1",
"last": "https://lxapi.lexiangla.com/cgi-bin/v1/lecturers/115c44bcbbbf11ec84958afdd6c3e2cd?type=class&page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://lxapi.lexiangla.com/cgi-bin/v1/lecturers/115c44bcbbbf11ec84958afdd6c3e2cd?type=class",
"per_page": 20,
"to": 5,
"total": 5
}
}
参数 | 说明 |
---|---|
id | 课程的id |
attributes.title | 开课主题 |
attributes.course_count | 子课程数 |
attributes.type | 课程类型 (0独立课程,1章节课程) |
attributes.is_required | 属性:是否为必修,1为必修 |
attributes.cover_img | 课程封面 |
attributes.required_privilege_type | 必修学员范围。0:所有人; 1:部分人; 2.无; |
attributes.optional_privilege_type | 必修学员范围。0:所有人; 1:部分人; 2.无; |
attributes.participants_count | 已学人数 |
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->get("lecturers/". $lecturer_id ."/target-list" ,["type"=>"live"]);
GET https://lxapi.lexiangla.com/cgi-bin/v1/lecturers
支持分页参数和排序:(通用说明?)
支持时间范围过滤
document
{
"data": [
{
"type": "lecturer",
"id": "115c44bcbbbf11ec84958afdd6c3e2cd",
"attributes": {
"status": 1
},
"relationships": {
"level": {
"data": {
"type": "category",
"id": "599bd5b08c6a11ebb61ba660d5429857"
}
},
"category": {
"data": {
"type": "category",
"id": "599e69248c6a11eb8aa8a660d5429857"
}
},
"staff": {
"data": {
"type": "staff",
"id": "zhangsan"
}
}
}
}
],
"links": {
"first": "https://lxapi.lexiangla.com/cgi-bin/v1/lecturers?limit=1&page=1",
"last": "https://lxapi.lexiangla.com/cgi-bin/v1/lecturers?limit=1&page=57",
"prev": null,
"next": "https://lxapi.lexiangla.com/cgi-bin/v1/lecturers?limit=1&page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 57,
"path": "https://lxapi.lexiangla.com/cgi-bin/v1/lecturers?limit=1",
"per_page": 1,
"to": 1,
"total": 57
},
"included": [
{
"type": "staff",
"id": "zhangsan",
"attributes": {
"name": "张三",
"english_name": null,
"organization": "2 "
}
},
{
"type": "category",
"id": "599bd5b08c6a11ebb61ba660d5429857",
"attributes": {
"name": "其他",
"weight": 4
}
},
{
"type": "category",
"id": "599e69248c6a11eb8aa8a660d5429857",
"attributes": {
"name": "其他",
"weight": 15
}
}
]
}
参数 | 说明 |
---|---|
id | 讲师的id |
attributes.status | 状态,0:已停用;1:启用中 |
relationships.level | 级别 |
relationships.category | 分类 |
relationships.staff | 讲师帐号 |
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->get("lecturers");