Giter Site home page Giter Site logo

tingyugetc520 / dtjava Goto Github PK

View Code? Open in Web Editor NEW
46.0 2.0 14.0 5.6 MB

DtJava(钉钉 Java SDK),DingTalk(钉钉)的后端开发SDK。

License: Apache License 2.0

Java 100.00%
dingtalk dingtalk-sdk dingtalk-java-sdk dtjava dingding dingding-java dingding-sdk

dtjava's Introduction

DtJava

介绍

DtJava(DingTalk Java SDK-钉钉SDK) 封装了钉钉凭证、通讯录管理、消息通知等服务端接口,让开发者可以使用简单的配置,提供简洁的 API 以供方便快速地调用钉钉接口。

注意:目前SDK主要是以企业内建应用为主,ISV应用后面会陆续支持。

文档

查看wiki首页

Demo示例可 查看DEMO项目 ,包括事件消息回调处理等等。

安装

  • 通过Maven方式安装使用
<dependency>
    <groupId>com.github.tingyugetc520</groupId>
    <artifactId>dt-java</artifactId>
    <version>0.1.2</version>
</dependency>

目前已发布0.1.2版本

  • 直接下载源码使用
git clone https://github.com/tingyugetc520/DtJava.git

源码下载完成后,放置在您的项目中使用,同时请注意相关依赖的问题。

使用

可前往查看DEMO项目

// 钉钉应用配置
DtDefaultConfigImpl config = new DtDefaultConfigImpl();
config.setCorpId("corpId");
config.setAgentId(agentId);
config.setAppKey("appKey");
config.setAppSecret("appSecret");

// DtService为SDK使用入口,后续接口使用均需要DtService
DtServiceImpl dtService = new DtServiceImpl();
dtService.setDtConfigStorage(config);

// 查询用户
DtUser user = dtService.getUserService().getById(userId);
log.info("dt user:{}", user);

// 发送工作消息通知
DtCorpConversationMessage message = DtCorpConversationMessage.builder()
			.agentId(config.getAgentId())
			.userIds(Lists.newArrayList("userId"))
			.msg(DtMessage.TEXT().content("this is content").build())
			.build();
dtService.getCorpConversationMsgService().send(message);

更多的示例可 查看DEMO项目 ,包括事件消息回调处理等等。

封装进度(企业内建应用)

  • HTTP代理,支持正向代理与反向代理
  • 获取凭证
  • 身份验证
  • 通讯录管理(只读)
  • 消息通知-工作消息通知
  • HTTP事件回调

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.