예제 #1
0
        /// <summary>
        /// 删除用户组
        /// </summary>
        /// <param name="reqData"></param>
        /// <returns></returns>
        public XAIResDeleteGroup DeleteGroup(XAIReqDeleteGroup reqData)
        {
            LogModule.Info("XAI->BIDU:DeleteGroup--->入参:" + reqData.ToJson());
            string resJson;

            try
            {
                resJson = client.GroupDelete(reqData.GroupId).ToJson();
            }
            catch (Exception ex)
            {
                throw new XAIException(7100, "请求人脸识别服务异常,请重试!" + ex.Message);
            }
            LogModule.Info("XAI->BIDU:DeleteGroup--->出参:" + resJson);
            var res = resJson.ToEntity <BIDUResponse>();

            if (res.error_code != 0)
            {
                throw new XAIException(7100, typeof(BIDUErrorCodeEnum).GetEnumName(res.error_code.ToInt()));
            }
            return(new XAIResDeleteGroup()
            {
            });
        }
예제 #2
0
 public static BaseResponse DeleteGroup(string groupId)
 {
     return(Execute(client.GroupDelete(groupId)));
 }