资源简介
完整的阿里钉钉集成API(Java)项目,包括了src和demo用例等
代码片段和文件信息
package com.alibaba.dingtalk.openapi.demo;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.alibaba.dingtalk.openapi.demo.auth.AuthHelper;
import com.alibaba.dingtalk.openapi.demo.department.DepartmentHelper;
import com.alibaba.dingtalk.openapi.demo.media.MediaHelper;
import com.alibaba.dingtalk.openapi.demo.message.ConversationMessageDelivery;
import com.alibaba.dingtalk.openapi.demo.message.LightAppMessageDelivery;
import com.alibaba.dingtalk.openapi.demo.message.MessageHelper;
import com.alibaba.dingtalk.openapi.demo.user.User;
import com.alibaba.dingtalk.openapi.demo.user.UserHelper;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONobject;
import com.dingtalk.open.client.api.model.corp.CorpUserDetail;
import com.dingtalk.open.client.api.model.corp.CorpUserDetailList;
import com.dingtalk.open.client.api.model.corp.CorpUserList;
import com.dingtalk.open.client.api.model.corp.Department;
import com.dingtalk.open.client.api.model.corp.MessageBody;
import com.dingtalk.open.client.api.model.corp.MessageBody.OABody.Body;
import com.dingtalk.open.client.api.model.corp.MessageBody.OABody.Body.Form;
import com.dingtalk.open.client.api.model.corp.MessageBody.OABody.Body.Rich;
import com.dingtalk.open.client.api.model.corp.MessageBody.OABody.Head;
import com.dingtalk.open.client.api.model.corp.MessageType;
import com.dingtalk.open.client.api.model.corp.UploadResult;
public class Demo {
public static void main(String[] args) throws Exception {
try {
List departments = new ArrayList();
departments = DepartmentHelper.listDepartments(AuthHelper.getAccessToken() “1“);
JSONobject usersJSON = new JSONobject();
System.out.println(“depart num:“+departments.size());
for(int i = 0;i JSONobject userDepJSON = new JSONobject();
System.out.println(“dep:“+departments.get(i).toString());
long offset = 0;
int size = 5;
CorpUserList corpUserList = new CorpUserList();
while (true) {
corpUserList = UserHelper.getDepartmentUser(AuthHelper.getAccessToken() Long.valueOf(departments.get(i).getId())
offset size null);
System.out.println(JSON.toJSONString(corpUserList));
if (Boolean.TRUE.equals(corpUserList.isHasMore())) {
offset += size;
} else {
break;
}
}
if(corpUserList.getUserlist().size()==0){
continue;
}
for(int j = 0;j String user = JSON.toJSONString(corpUserList.getUserlist().get(j));
userDepJSON.put(j+““ JSONobject.parseobject(user CorpUserDetail.class));
}
usersJSON.put(departments.get(i).getName() userDepJSON);
System.out.println(“user:“+usersJSON.toString());
}
S
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-12-19 18:14 dd\
文件 589 2017-11-03 18:33 dd\.classpath
文件 61 2017-09-05 11:49 dd\.gitignore
文件 879 2017-09-05 11:49 dd\.project
目录 0 2017-12-19 18:14 dd\.settings\
文件 555 2017-09-05 11:49 dd\.settings\.jsdtscope
文件 57 2017-11-03 18:45 dd\.settings\org.eclipse.core.resources.prefs
文件 658 2017-09-05 11:49 dd\.settings\org.eclipse.jdt.core.prefs
文件 456 2017-09-05 11:49 dd\.settings\org.eclipse.wst.common.component
文件 296 2017-09-05 11:49 dd\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2017-09-05 11:49 dd\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2017-09-05 11:49 dd\.settings\org.eclipse.wst.jsdt.ui.superType.name
目录 0 2017-12-19 18:14 dd\build\
目录 0 2017-12-19 18:14 dd\build\classes\
目录 0 2017-12-19 18:14 dd\build\classes\com\
目录 0 2017-12-19 18:14 dd\build\classes\com\alibaba\
目录 0 2017-12-19 18:14 dd\build\classes\com\alibaba\dingtalk\
目录 0 2017-12-19 18:14 dd\build\classes\com\alibaba\dingtalk\openapi\
目录 0 2017-12-19 18:14 dd\build\classes\com\alibaba\dingtalk\openapi\demo\
目录 0 2017-12-19 18:14 dd\build\classes\com\alibaba\dingtalk\openapi\demo\auth\
文件 8004 2017-12-19 18:10 dd\build\classes\com\alibaba\dingtalk\openapi\demo\auth\AuthHelper.class
文件 12831 2017-12-19 18:10 dd\build\classes\com\alibaba\dingtalk\openapi\demo\Demo.class
目录 0 2017-12-19 18:14 dd\build\classes\com\alibaba\dingtalk\openapi\demo\department\
文件 3847 2017-12-19 18:10 dd\build\classes\com\alibaba\dingtalk\openapi\demo\department\DepartmentHelper.class
文件 879 2017-12-19 18:10 dd\build\classes\com\alibaba\dingtalk\openapi\demo\Env.class
目录 0 2017-12-19 18:14 dd\build\classes\com\alibaba\dingtalk\openapi\demo\eventchange\
文件 3124 2017-12-19 18:10 dd\build\classes\com\alibaba\dingtalk\openapi\demo\eventchange\eventChangeHelper.class
目录 0 2017-12-19 18:14 dd\build\classes\com\alibaba\dingtalk\openapi\demo\media\
文件 558 2017-12-19 18:10 dd\build\classes\com\alibaba\dingtalk\openapi\demo\media\MediaHelper$MediaUploadResult.class
文件 2253 2017-12-19 18:10 dd\build\classes\com\alibaba\dingtalk\openapi\demo\media\MediaHelper.class
目录 0 2017-12-19 18:14 dd\build\classes\com\alibaba\dingtalk\openapi\demo\message\
............此处省略197个文件信息
- 上一篇:ThinkinJava双语版
- 下一篇:Android 图片转视频
相关资源
- android创建wifi热点,手机之间可以互相
- Android模拟位置打卡
- Android手机直播推流demo
- 2020最新阿里巴巴编码规范认证 考题分
- 基于Android手机平台的音乐播放器【源
- Android学生信息管理系统54978
- android手机控制电脑
- Android游戏源码算法完整的手机斗地主
- android 手机与单片机之间的蓝牙通信
- 改良完成的jsp程序设计第十章手机销
- IMSI获取,IMEI获取
- android手机屏幕保护程序
- 手机文字识别 Android 图像处理 字符识
- Android遍历手机短信并发送至指定邮箱
- 基于Android的手机通讯录设计书和源代
- 基于Android的手机通讯录代码
- android手机新闻客户端和服务器端源码
- 手机蓝牙控制小车Android源码
- Java和MySQL编写的简单手机销售管理系
- 中兴IPTV 电视直播软件
- 一款不用手动打卡,自动调起钉钉上
- 李工手机串口V2.1
- Android安卓手机串口调试助手
- WiFi模块,ESP8266,网络调试助手,手机
- iso苹果 Android安卓 axure 经典 手机
- 手机通讯录设计项目代码
- Unity打开手机相册完整工程
- Android 获取手机所有已安装的应用,并
- android usb转rs232驱动
- 基于android的手机象棋游戏设计毕业论
评论
共有 条评论