示例#1
0
    def SubmitCheckAttendanceTask(self, request):
        """提交人员考勤任务

        :param request: 调用SubmitCheckAttendanceTask所需参数的结构体。
        :type request: :class:`tencentcloud.tci.v20190318.models.SubmitCheckAttendanceTaskRequest`
        :rtype: :class:`tencentcloud.tci.v20190318.models.SubmitCheckAttendanceTaskResponse`

        """
        try:
            params = request._serialize()
            body = self.call("SubmitCheckAttendanceTask", params)
            response = json.loads(body)
            if "Error" not in response["Response"]:
                model = models.SubmitCheckAttendanceTaskResponse()
                model._deserialize(response["Response"])
                return model
            else:
                code = response["Response"]["Error"]["Code"]
                message = response["Response"]["Error"]["Message"]
                reqid = response["Response"]["RequestId"]
                raise TencentCloudSDKException(code, message, reqid)
        except Exception as e:
            if isinstance(e, TencentCloudSDKException):
                raise
            else:
                raise TencentCloudSDKException(e.message, e.message)
    def SubmitCheckAttendanceTask(self, request):
        """提交人员考勤任务,支持包括点播和直播资源;支持通过DescribeAttendanceResult查询结果,也支持通过NoticeUrl设置考勤回调结果,回调结果结构如下:
        ##### 回调事件结构
         | 参数名称 | 类型 | 描述 |
         | ----  | ---  | ------  |
         | jobid | Integer | 任务ID |
         | person_info | array of PersonInfo | 识别到的人员列表 |
        #####子结构PersonInfo
         | 参数名称 | 类型 | 描述 |
         | ----  | ---  | ------  |
         | traceid | String | 可用于区分同一路视频流下的不同陌生人 |
         | personid | String | 识别到的人员ID,如果是陌生人则返回空串 |
         | libid | String | 识别到的人员所在的库ID,如果是陌生人则返回空串 |
         | timestamp | uint64 | 识别到人脸的绝对时间戳,单位ms |
         | image_url | string | 识别到人脸的事件抓图的下载地址,不长期保存,需要请及时下载 |

        :param request: 调用SubmitCheckAttendanceTask所需参数的结构体。
        :type request: :class:`tencentcloud.tci.v20190318.models.SubmitCheckAttendanceTaskRequest`
        :rtype: :class:`tencentcloud.tci.v20190318.models.SubmitCheckAttendanceTaskResponse`

        """
        try:
            params = request._serialize()
            body = self.call("SubmitCheckAttendanceTask", params)
            response = json.loads(body)
            if "Error" not in response["Response"]:
                model = models.SubmitCheckAttendanceTaskResponse()
                model._deserialize(response["Response"])
                return model
            else:
                code = response["Response"]["Error"]["Code"]
                message = response["Response"]["Error"]["Message"]
                reqid = response["Response"]["RequestId"]
                raise TencentCloudSDKException(code, message, reqid)
        except Exception as e:
            if isinstance(e, TencentCloudSDKException):
                raise
            else:
                raise TencentCloudSDKException(e.message, e.message)