use of com.dingtalk.api.request.OapiV2DepartmentListsubRequest in project MaxKey by dromara.
the class DingtalkOrganizationService method requestDepartmentList.
public OapiV2DepartmentListsubResponse requestDepartmentList(String access_token, Long deptId) throws ApiException {
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/v2/department/listsub");
OapiV2DepartmentListsubRequest req = new OapiV2DepartmentListsubRequest();
req.setDeptId(deptId);
req.setLanguage("zh_CN");
OapiV2DepartmentListsubResponse rspDepts = client.execute(req, access_token);
_logger.trace("response : " + rspDepts.getBody());
return rspDepts;
}
Aggregations