# 直播

# 创建直播

# 接口调用说明:

POST https://lxapi.lexiangla.com/cgi-bin/v1/lives

# 请求document

{
    "data":{
        "type":"live",
        "attributes":{
            "title":"s2",
            "started_at":"2020-02-15 14:00",
            "intro":"简介",
            "content":"内容",
            "push_method":"pc",
            "vertical": 0,
            "privilege_type":1,
            "auto_transfer_class": true,
            "class_category_id": "63f009d4da8511e982470242ac180006",
            "course_category_id": "22c81ad852c011ea970e0242ac130006"
        },
        "relationships":{
            "streamer":{
                "data":[
                    {
                        "type":"staff",
                        "id":"xxx"
                    }
                ]
            },
            "managers":{
                "data":[
                    {
                        "type":"staff",
                        "id":"xxx"
                    },
                    {
                        "type":"staff",
                        "id":"xxx"
                    }
                ]
            },
            "privilege":{
                "data":[
                    {
                        "type":"staff",
                        "id":"xxx"
                    }
                ]
            }
        }
    }
}

# 参数说明:

参数 是否必须 默认值 说明
live.type 资源对象类型,为live,表示资源为直播
live.title 直播的标题
live.intro 直播的简介
live.content 直播详情
live.pic 直播的封面
live.push_method wechat work 直播类型(wechat work, pc)
live.started_at 直播的开始时间
live.privilege_type 0 0表示公开
1表示部分人可见,需要配合 privilege 参数使用
live.live_type 0 0表示直播不对外可访问;1表示直播对外可访问
live.vertical 0 0表示横屏直播;1表示竖屏直播;pc推荐设置横屏直播
live.password 允许直播对外可访问时,可以选择设置密码,4位数字类字符串,如"0000"
live.auto_transfer_class false 是否开启直播回放;为true表示开启
live.class_category_id auto_transfer_classtrue时,需要制定直播的直播所属的课程分类。
live.course_category_id auto_transfer_classtrue时,需要制定直播的直播所属的课程素材分类。
relationships.managers 直播主持人
relationships.streamer 直播讲师
relationships.privilege 部分人可见

# SDK封装方法使用示例:

$attributes = [
    'title' => '通过开放接口创建的直播',
    'started_at' => '2020-02-14 05:20',
    'streamer_ids' => ['STAFF_ID1'],
];
$options = [
    'intro' => '简介',
    'content' => '内容',
    'pic' => 'https://lexiangla.com',
    'push_method' => 'pc',
    'manager_ids' => ['STAFF_ID2', 'STAFF_ID3'],
    'privilege' => [
       ['type' => 'department', 'id' => 1],
       ['type' => 'contacttag', 'id' => 1],
   ]
];
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->postLive(StaffID, $attributes, $options);

# 响应document

# 201 Created 状态码
{
    "data":{
        "type":"live",
        "id":"cc2fb1a8554f11eab5940a58ac130e6f",
        "links":{
            "platform":{
                "href":"https://lexiangla.com/lives/cc2fb1a8554f11eab5940a58ac130e6f"
            },
            "manager":{
                "href":"https://lexiangla.com/lives/cc2fb1a8554f11eab5940a58ac130e6f/settings"
            }
        },
        "attributes":{
            "title":"s2",
            "started_at":"2020-02-15 14:00:00",
            "status":"init",
            "push_url":"rtmp://livepush.lexiangla.com/live/xxxxxx?txSecret=xxxx&txTime=xx",
            "created_at":"2020-02-22 16:46:20",
            "updated_at":"2020-02-22 16:46:20",
            "visit_count":0,
            "push_method":"pc",
		    "live_type": 0,
			"video_duration": 0,
			"watch_duration": 0,
			"vertical": 0,
			"wx_code": "",
			"wx_open_code": ""
        }
    },
    "links":{
        "self":{
			"platform": "https://lexiangla.com/lives/169548aed7c111eaaf3752c8567837af",
			"manager": "https://lexiangla.com/lives/169548aed7c111eaaf3752c8567837af/settings",
			"qrcodeurl": "https://lexiangla.com/livepush?room_id=169548aed7c111eaaf3752c8567837af&company_from=xxx",
			"open": ""
        }
    }
}

# 参数说明

参数 说明
live.type 资源对象类型,为live,表示资源为直播
live.id 直播实体ID
title 直播的标题
status 直播的状态(init:初始化, waiting:等待, pushing:推流状态, finished:完成, forbidden:无权限访问)
push_method 直播类型(wechat work, pc)
push_url pc推流地址
live_type 是否为公开直播;0表示直播不对外可访问;1表示直播对外可访问
vertical 0表示横屏直播;1表示竖屏直播;pc推荐设置横屏直播
wx_code 小程序码(需要等待一分钟左右通过获取单场直播信息获取到小程序码,乐享网站及小程序外无用直接使用此小程序码图片地址
wx_open_code 微信公开直播的手机端查看小程序码 (需要等待一分钟左右通过获取单场直播信息获取到小程序码,乐享网站及小程序外无用直接使用此小程序码图片地址)
started_at 直播的开始时间
created_at 直播的创建时间
updated_at 直播的更新时间
visit_count 直播的访问量
video_duration 直播的时长
relationships.owner 直播的创建人
relationships.streamer 直播讲师
links.platform 当前直播的查看地址
links.manager 当前直播的管理地址

# 编辑直播

# 接口调用说明:

PATCH https://lxapi.lexiangla.com/cgi-bin/v1/lives/{LiveID}

# 请求document

{
    "data":{
        "type":"live",
        "attributes":{
            "title":"s2",
            "started_at":"2020-02-15 14:00",
            "intro":"简介",
            "content":"内容",
            "push_method":"pc",
            "privilege_type":1
        },
        "relationships":{
            "streamer":{
                "data":[
                    {
                        "type":"staff",
                        "id":"xxx"
                    }
                ]
            },
            "managers":{
                "data":[
                    {
                        "type":"staff",
                        "id":"xxx"
                    },
                    {
                        "type":"staff",
                        "id":"xxx"
                    }
                ]
            },
            "privilege":{
                "data":[
                    {
                        "type":"staff",
                        "id":"xxx"
                    }
                ]
            }
        }
    }
}

# 参数说明:(参数缺省时不会发生变化)

参数 是否必须 默认值 说明
LiveID 资源对象类型为live的资源对象ID,即直播ID
live.title 直播的标题
live.intro 直播的简介
live.content 直播详情
live.pic 直播的封面
live.push_method 直播类型(wechat work, pc)
live.live_type 0 0表示直播不对外可访问;1表示直播对外可访问
live.vertical 0 0表示横屏直播;1表示竖屏直播;pc推荐设置横屏直播
live.started_at 直播的开始时间
live.privilege_type 0 0表示公开
1表示部分人可见,需要配合 privilege 参数使用
relationships.managers 直播主持人
relationships.streamer 直播讲师
relationships.privilege 部分人可见

# SDK封装方法使用示例:

$options = [
    'title' => '通过开放接口创建的直播',
    'started_at' => '2020-02-14 05:20',
    'streamer_ids' => ['STAFF_ID1'],
    'intro' => '简介',
    'content' => '内容',
    'pic' => 'https://lexiangla.com',
    'push_method' => 'pc',
    'manager_ids' => ['STAFF_ID2', 'STAFF_ID3'],
    'privilege' => [
       ['type' => 'department', 'id' => 1],
       ['type' => 'contacttag', 'id' => 1],
   ]
];
$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->patchLive(StaffID, LiveID, $options);

# 响应document

# 200 OK 状态码
{
    "data":{
        "type":"live",
        "id":"cc2fb1a8554f11eab5940a58ac130e6f",
        "links":{
            "platform":{
                "href":"https://lexiangla.com/lives/cc2fb1a8554f11eab5940a58ac130e6f"
            },
            "manager":{
                "href":"https://lexiangla.com/lives/cc2fb1a8554f11eab5940a58ac130e6f/settings"
            }
        },
        "attributes":{
            "title":"s2",
            "started_at":"2020-02-15 14:00:00",
            "status":"init",
            "push_url":"rtmp://livepush.lexiangla.com/live/xxxxxx?txSecret=xxxx&txTime=xx",
            "created_at":"2020-02-22 16:46:20",
            "updated_at":"2020-02-22 16:46:20",
            "visit_count":0,
            "push_method":"pc",
            "video_duration":0,
            "watch_duration":0,
            "wx_code":""
        }
    },
    "links":{
        "self":{
            "href":"https://lxapi.lexiangla.com/cgi-bin/v1/lives/cc2fb1a8554f11eab5940a58ac130e6f"
        }
    }
}

# 参数说明

参数 说明
live.type 资源对象类型,为live,表示资源为直播
live.id 直播实体ID
title 直播的标题
status 直播的状态(init:初始化, waiting:等待, pushing:推流状态, finished:完成, forbidden:无权限访问)
push_method 直播类型(wechat work, pc)
push_url pc推流地址
live_type 是否为公开直播;0表示直播不对外可访问;1表示直播对外可访问
vertical 0表示横屏直播;1表示竖屏直播;pc推荐设置横屏直播
wx_code 小程序码(乐享网站及小程序外无用直接使用此小程序码图片地址
started_at 直播的开始时间
created_at 直播的创建时间
updated_at 直播的更新时间
visit_count 直播的访问量
video_duration 直播的时长
relationships.owner 直播的创建人
relationships.streamer 直播讲师
links.platform 当前直播的查看地址
links.open 微信公开直播的pc端查看地址
links.manager 当前直播的管理地址

# 删除直播

# 接口调用说明:

DELETE https://lxapi.lexiangla.com/cgi-bin/v1/lives/{LiveID}

# 参数说明:

参数 是否必须 默认值 说明
LiveID 资源对象类型为 live 的资源对象ID,即直播ID

# SDK封装方法使用示例:

$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->deleteLive(StaffID, LiveID');

# 响应document

# 204 No Content 状态码

# 获取直播列表

# 接口调用说明:

GET https://lxapi.lexiangla.com/cgi-bin/v1/lives

# 参数说明:

支持分页参数和排序:(通用说明?

参数 是否必须 默认值 说明
page 1 当前页数
per_page 20 每页返回的数量

# SDK封装方法使用示例:

$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->get('lives', [
    'page'=> 1,
    'per_page' => 3,
]);

# 响应document

# 200 OK 状态码
{
    "data": [
        {
            "type": "live",
            "id": "34a8a812e28111e9aedd0a58ac130342",
            "attributes": {
                "title": "测试直播",
                "started_at": "2019-09-29 14:18:00",
                "status": "init",
                "push_method": "pc",
                "push_url": "",
                "wx_code": "",
                "created_at": "2019-09-29 14:20:17",
                "updated_at": "2019-09-29 14:20:28",
                "visit_count": 2,
                "video_duration": 0
            },
            "relationships": {
                "owner": {
                    "data": {
                        "type": "staff",
                        "id": "ThreeZhang"
                    }
                },
                "streamer": {
                    "data": {
                        "type": "staff",
                        "id": "FourLee"
                    }
                }
            }
        }
    ],
    "links": {
        "first": "https://lxapi.lexiangla.com/cgi-bin/v1/lives?per_page=1&page=1",
        "last": "https://lxapi.lexiangla.com/cgi-bin/v1/lives?per_page=1&page=2",
        "prev": null,
        "next": "https://lxapi.lexiangla.com/cgi-bin/v1/lives?per_page=1&page=3"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 225,
        "path": "https://lxapi.lexiangla.com/cgi-bin/v1/lives",
        "per_page": 1,
        "to": 1,
        "total": 225
    },
    "included": [
        {
            "type": "staff",
            "id": "ThreeZhang",
            "attributes": {
                "name": "张三",
                "english_name": "ThreeZhang",
                "organization": "开发组"
            }
        },
        {
            "type": "staff",
            "id": "FourLee",
            "attributes": {
                "name": "李四",
                "english_name": "FourLee",
                "organization": "开发组"
            }
        }
    ]
}

# 参数说明

参数 说明
live.type 资源对象类型,为live,表示资源为直播
live.id 直播实体ID
title 直播的标题
status 直播的状态(init:初始化, waiting:等待, pushing:推流状态, finished:完成, forbidden:无权限访问)
push_method 直播类型(wechat work, pc)
push_url pc推流地址
wx_code 小程序码(乐享网站及小程序外无用直接使用此小程序码图片地址
started_at 直播的开始时间
created_at 直播的创建时间
updated_at 直播的更新时间
visit_count 直播的访问量
video_duration 直播的时长
relationships.owner 直播的创建人
relationships.streamer 直播讲师

# 获取单场直播信息

# 接口调用说明:

GET https://lxapi.lexiangla.com/cgi-bin/v1/lives/{liveID}

# 参数说明:

支持分页参数和排序:(通用说明?

参数 是否必须 默认值 说明
liveID 直播ID

# SDK封装方法使用示例:

$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->get('lives/254ef3a690d911ea87a68a420c870857');

# 响应document

# 200 OK 状态码
{
    "data": {
        "type": "live",
        "id": "254ef3a690d911ea87a68a420c870857",
        "attributes": {
            "title": "小程序竖屏-字幕 刚创建的就没聊天室啊",
            "started_at": "2020-05-08 11:07:00",
            "visit_count": 876026,
            "status": "finished",
            "push_method": "wechat work",
            "push_url": "rtmp://livepush.lexiangla.com/live/254ef3a690d911ea87a68a420c870857?txSecret=123&txTime=123",
            "wx_code": "https://lexiang4public-10029162.cos.ap-shanghai.myqcloud.com/123/assets/2020/5/254ef3a690d911ea87a68a420c870857.jpeg",
            "created_at": "2020-05-08 11:08:09",
            "updated_at": "2020-05-08 15:42:01",
            "video_duration": 3716,
            "transfer_status": 1
        },
        "links": {
            "platform": "https://lexiangla.com/lives/254ef3a690d911ea87a68a420c870857?company_from=xxx",
            "manager": "https://lexiangla.com/lives/254ef3a690d911ea87a68a420c870857/settings?company_from=xxx",
            "qrcodeurl": "https://lexiangla.com/livepush?room_id=254ef3a690d911ea87a68a420c870857?company_from=xxx",
            "open": "https://lexiangla.com/open-live/lives/032c055acd9411eaa893ee110638af1a?company_from=xxx"
        },
        "relationships": {
            "owner": {
                "data": {
                    "type": "staff",
                    "id": "ThreeZhang"
                }
            },
            "streamer": {
                "data": {
                    "type": "staff",
                    "id": "FourLee"
                }
            },
            "clazz": {
                "data": {
                    "type": "clazz",
                    "id": "d3dc774c90ff11eab5515254008ea09d"
                }
            }
        }
    },
    "included": [
        {
            "type": "staff",
            "id": "ThreeZhang",
            "attributes": {
                "name": "张三",
                "english_name": null,
                "organization": "开发组 "
            }
        },
        {
            "type": "staff",
            "id": "FourLee",
            "attributes": {
                "name": "李四",
                "english_name": null,
                "organization": "测试组"
            }
        },
        {
            "type": "clazz",
            "id": "d3dc774c90ff11eab5515254008ea09d",
            "attributes": {
                "title": "直播回放 | 签到直播",
                "type": 1,
                "cover_img": "",
                "participants_count": null
            },
            "links": {
                "platform": "https://lexiangla.com/classes/d3dc774c90ff11eab5515254008ea09d?type=1",
                "manager": "https://lexiangla.com/classes/d3dc774c90ff11eab5515254008ea09d/settings?type=1"
            }
        }
    ],
    "links": {
        "self": "https://lxapi.lexiangla.com/cgi-bin/v1/lives/254ef3a690d911ea87a68a420c870857"
    }
}

# 参数说明:

参数 说明
live.type 资源对象类型,为lives,表示资源为直播
live.id 直播实体ID
title 直播的标题
status 直播的状态(init:初始化, waiting:等待, pushing:推流状态, finished:完成, forbidden:无权限访问)
push_method 直播类型(wechat work, pc)
push_url pc推流地址
live_type 是否为公开直播;0表示直播不对外可访问;1表示直播对外可访问
vertical 是否为竖屏直播;0表示直播为横屏直播;1表示直播为竖屏直播
wx_code 小程序码(乐享网站及小程序外无用直接使用此小程序码图片地址)
wx_open_code 微信公开直播的手机端查看小程序码(乐享网站及小程序外无用直接使用此小程序码图片地址)
started_at 直播的开始时间
created_at 直播的创建时间
updated_at 直播的更新时间
visit_count 直播的访问量
video_duration 直播的时长
relationships.owner 直播的创建人
relationships.streamer 直播讲师
relationships.clazz 直播回放关联的课程信息
links.platform 当前直播的查看地址
links.open 微信公开直播的pc端查看地址
links.manager 当前直播的管理地址

# 获取单场直播记录

# 接口调用说明:

GET https://lxapi.lexiangla.com/cgi-bin/v1/lives/{liveID}/staffs?with_playback={with_playback}

# 参数说明:

支持分页参数和排序:(通用说明?

参数 是否必须 默认值 说明
page 1 当前页数
per_page 20 每页返回的数量
liveID 直播ID
with_playback 0 是否获取回放观看时长

# SDK封装方法使用示例:

$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->get('lives/6b096940e0f711e9ae480a58ac1302ce/staffs', [
    'page'=> 1,
    'per_page' => 3,
    'with_playback' => 1,
]);

# 响应document

# 200 OK 状态码
{
    "data": [
        {
            "type": "staff",
            "id": "TwoWang",
            "attributes": {
                "name": "王二",
                "english_name": "TwoWang",
                "organization": "开发组",
                "online_duration": 1090,
                "learn_time": 300,
                "valid_time": 289
            }
        }
    ],
    "links": {
        "first": "https://lxapi.lexiangla.com/cgi-bin/v1/lives/6b096940e0f711e9ae480a58ac1302ce/staffs?page=1",
        "last": "https://lxapi.lexiangla.com/cgi-bin/v1/lives/6b096940e0f711e9ae480a58ac1302ce/staffs?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://lxapi.lexiangla.com/cgi-bin/v1/lives/6b096940e0f711e9ae480a58ac1302ce/staffs",
        "per_page": 20,
        "to": 1,
        "total": 1
    }
}

# 参数说明:

参数 说明
name 员工姓名
english_name 员工英文名
organization 员工部门
online_duration 直播观看时长(单位:s)
learn_time 总回放观看时长(单位:s, 仅with_playback=1且回放已生成时返回)
valid_time 有效回放观看时长(单位:s, 仅with_playback=1且回放已生成时返回)

# 获取员工观看直播记录

# 接口调用说明:

GET https://lxapi.lexiangla.com/cgi-bin/v1/staffs/{staffID}/lives

# 参数说明:

支持分页参数和排序:(通用说明?

参数 是否必须 默认值 说明
sort -created_at 排序参数,支持按直播的created_at排序
page 1 当前页数
per_page 20 每页返回的数量
staffID 企业微信提供的员工ID

# SDK封装方法使用示例:

$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->get('/staffs/fewefwe/lives', [
    'page'=> 1,
    'per_page' => 3,
]);

# 响应document

# 200 OK 状态码
{
    "data": [
        {
            "type": "live",
            "id": "5ff26d50dead11e9a0b00a58ac130286",
            "attributes": {
                "title": "测试统计",
                "video_duration": 0,
                "online_duration": 586,
                "started_at": "2019-09-27 15:21:00",
                "created_at": "2019-09-27 15:21:26",
                "updated_at": "2019-10-06 11:05:00"
            }
        }
    ],
    "links": {
        "first": "https://lxapi.lexiangla.com/cgi-bin/v1/staffs/ruivenliu/lives?per_page=1&page=1",
        "last": "https://lxapi.lexiangla.com/cgi-bin/v1/staffs/ruivenliu/lives?per_page=1&page=24",
        "prev": "https://lxapi.lexiangla.com/cgi-bin/v1/staffs/ruivenliu/lives?per_page=1&page=1",
        "next": "https://lxapi.lexiangla.com/cgi-bin/v1/staffs/ruivenliu/lives?per_page=1&page=3"
    },
    "meta": {
        "current_page": 2,
        "from": 2,
        "last_page": 24,
        "path": "https://lxapi.lexiangla.com/cgi-bin/v1/staffs/fewefwe/lives",
        "per_page": 1,
        "to": 2,
        "total": 24
    }
}

# 参数说明

参数 说明
live.type 资源对象类型,为lives,表示资源为直播
live.id 直播实体ID
live.title 直播的标题
live.video_duration 直播时长
live.started_at 直播开始时间
live.created_at 直播创建时间
live.updated_at 直播的更新时间
live.online_duration 直播观看时长

# 获取直播签到列表

# 接口调用说明:

GET https://lxapi.lexiangla.com/cgi-bin/v1/lives/{liveID}/checkins

# 参数说明:

支持分页参数和排序:(通用说明?

参数 是否必须 默认值 说明
page 1 当前页数
per_page 20 每页返回的数量
liveID 直播ID

# SDK封装方法使用示例:

$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->get('lives/6b096940e0f711e9ae480a58ac1302ce/checkins', [
    'page'=> 1,
    'per_page' => 3,
]);

# 响应document

# 200 OK 状态码
{
    "data": [
        {
            "type": "live_checkin",
            "id": "022164fd3400458bb4cc7837104f360a",
            "attributes": {
                "title": "第一次签到",
                "begin_at": "2020-05-06 10:42:00",
                "end_at": "2020-05-06 10:50:00",
                "participants_count": 46
            },
            "relationships": {
                "owner": {
                    "data": {
                        "type": "staff",
                        "id": "ThreeZhang"
                    }
                }
            }
        },
        {
            "type": "live_checkin",
            "id": "9c4586f50cb148419c9b6fa480d51742",
            "attributes": {
                "title": "第二次签到",
                "begin_at": "2020-05-06 10:52:07",
                "end_at": "2020-05-06 10:55:00",
                "participants_count": 23
            },
            "relationships": {
                "owner": {
                    "data": {
                        "type": "staff",
                        "id": "ThreeZhang"
                    }
                }
            }
        },
        {
            "type": "live_checkin",
            "id": "8a1b892b5a4946b8a0268494d13314db",
            "attributes": {
                "title": "第三次签到",
                "begin_at": "2020-05-06 11:00:42",
                "end_at": "2020-05-06 11:20:00",
                "participants_count": 9
            },
            "relationships": {
                "owner": {
                    "data": {
                        "type": "staff",
                        "id": "FourLee"
                    }
                }
            }
        }
    ],
    "links": {
        "first": "https://lxapi.lexiangla.com/cgi-bin/v1/lives/5a61411e8f4111eabc129eab142eb664/checkins?page=1",
        "last": "https://lxapi.lexiangla.com/cgi-bin/v1/lives/5a61411e8f4111eabc129eab142eb664/checkins?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://lxapi.lexiangla.com/cgi-bin/v1/lives/5a61411e8f4111eabc129eab142eb664/checkins",
        "per_page": 20,
        "to": 5,
        "total": 5
    },
    "included": [
        {
            "type": "staff",
            "id": "ThreeZhang",
            "attributes": {
                "name": "张三",
                "english_name": null,
                "organization": "开发组"
            }
        },
        {
            "type": "staff",
            "id": "FourLee",
            "attributes": {
                "name": "李四",
                "english_name": null,
                "organization": "测试组"
            }
        }
    ]
}

# 参数说明

参数 说明
live_checkin.title 签到标题
live_checkin.begin_at 签到开始时间
live_checkin.end_at 签到结束时间
live_checkin.participants_count 签到人数
live_checkin.created_at 签到创建时间
relationships.owner 签到创建者

# 获取单次签到成员信息

# 接口调用说明:

GET https://lxapi.lexiangla.com/cgi-bin/v1/lives/{liveID}/checkins/{checkinID}/staffs

# 参数说明:

支持分页参数和排序:(通用说明?

参数 是否必须 默认值 说明
page 1 当前页数
per_page 20 每页返回的数量
liveID 直播ID
checkinID 签到ID

# SDK封装方法使用示例:

$Lxapi = new \Lexiangla\Openapi\Api(AppKey, AppSecret);
$response = $Lxapi->get('lives/5a61411e8f4111eabc129eab142eb664/checkins/022164fd3400458bb4cc7837104f360a/staffs', [
    'page'=> 1,
    'per_page' => 3,
]);

# 响应document

# 200 OK 状态码
{
    "data": [
        {
            "type": "staff",
            "id": "ThreeZhang",
            "attributes": {
                "name": "张三",
                "english_name": null,
                "organization": "开发组",
                "checkin_at": "2020-05-06 10:43:10"
            }
        },
        {
            "type": "staff",
            "id": "FourLee",
            "attributes": {
                "name": "李四",
                "english_name": null,
                "organization": "测试组",
                "checkin_at": "2020-05-06 10:42:51"
            }
        },
        {
            "type": "staff",
            "id": "FiveWang",
            "attributes": {
                "name": "王五",
                "english_name": null,
                "organization": "设计组 ",
                "checkin_at": "2020-05-06 10:43:04"
            }
        }
    ],
    "links": {
        "first": "https://lxapi.lexiangla.com/cgi-bin/v1/lives/5a61411e8f4111eabc129eab142eb664/checkins/022164fd3400458bb4cc7837104f360a/staffs?page=1",
        "last": "https://lxapi.lexiangla.com/cgi-bin/v1/lives/5a61411e8f4111eabc129eab142eb664/checkins/022164fd3400458bb4cc7837104f360a/staffs?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://lxapi.lexiangla.com/cgi-bin/v1/lives/5a61411e8f4111eabc129eab142eb664/checkins/022164fd3400458bb4cc7837104f360a/staffs",
        "per_page": 20,
        "to": 3,
        "total": 3
    }
}

# 参数说明

参数 说明
staff.id 员工ID
staff.name 员工姓名
staff.english_name 员工英文名
staff.organization 员工部门
staff.checkin_at 员工签到时间