Search in sources :

Example 1 with OapiV2DepartmentListsubRequest

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;
}
Also used : OapiV2DepartmentListsubResponse(com.dingtalk.api.response.OapiV2DepartmentListsubResponse) DefaultDingTalkClient(com.dingtalk.api.DefaultDingTalkClient) DefaultDingTalkClient(com.dingtalk.api.DefaultDingTalkClient) DingTalkClient(com.dingtalk.api.DingTalkClient) OapiV2DepartmentListsubRequest(com.dingtalk.api.request.OapiV2DepartmentListsubRequest)

Aggregations

DefaultDingTalkClient (com.dingtalk.api.DefaultDingTalkClient)1 DingTalkClient (com.dingtalk.api.DingTalkClient)1 OapiV2DepartmentListsubRequest (com.dingtalk.api.request.OapiV2DepartmentListsubRequest)1 OapiV2DepartmentListsubResponse (com.dingtalk.api.response.OapiV2DepartmentListsubResponse)1