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