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

Overview

DtJava

介绍

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

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

文档

查看wiki首页

安装

  • 通过Maven方式安装使用
<dependency>
    <groupId>com.github.tingyugetc520groupId>
    <artifactId>dt-javaartifactId>
    <version>0.1.2version>
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事件回调
You might also like...

Make Slack and Facebook Bots in Java.

Make Slack and Facebook Bots in Java.

JBot Make bots in Java. JBot is a java framework (inspired by Howdyai's Botkit) to make Slack and Facebook bots in minutes. It provides all the boiler

Dec 18, 2022

An in-memory file system for Java 7+

Jimfs Jimfs is an in-memory file system for Java 7 and above, implementing the java.nio.file abstract file system APIs. Getting started The latest rel

Jan 3, 2023

API gateway for REST and SOAP written in Java.

Membrane Service Proxy Reverse HTTP proxy (framework) written in Java, that can be used as an API gateway as a security proxy for HTTP based integrati

Dec 31, 2022

A lightweight, simple FTP server. Pure Java, no dependencies.

MinimalFTP A lightweight, simple FTP server. Pure Java, no libraries. Features Although it's named "minimal", it supports a bunch of features: 100% Ja

Jan 5, 2023

Detect uses of legacy Java APIs

Modernizer Maven Plugin Modernizer Maven Plugin detects uses of legacy APIs which modern Java versions supersede. These modern APIs are often more per

Dec 12, 2022

A lightweight command processing pipeline ❍ ⇢ ❍ ⇢ ❍ for your Java awesome app.

PipelinR PipelinR is a lightweight command processing pipeline ❍ ⇢ ❍ ⇢ ❍ for your awesome Java app. PipelinR has been battle-proven on production, as

Jan 8, 2023

An extensible Java framework for building XML and non-XML streaming applications

Smooks Framework This is the Git source code repository for the Smooks Project. Build Status Building Pre-requisites JDK 8 Apache Maven 3.2.x Maven gi

Dec 1, 2022

Java XML library. A really cool one. Obviously.

XMLBeam This is a Java XML library with an extraordinary expressive API. By using XPath for read and write operations, many operations take only one l

Aug 25, 2022

The open-source Java obfuscation tool working with Ant and Gradle by yWorks - the diagramming experts

The open-source Java obfuscation tool working with Ant and Gradle by yWorks - the diagramming experts

yGuard yGuard is an open-source Java obfuscation tool. With yGuard it is easy as pie ( 🍰 ) to configure obfuscation through an extensive ant task. yG

Jan 2, 2023
Comments
  • 异步路由是否需要返回结果?

    异步路由是否需要返回结果?

    下方的代码都调用了future.get()方法来阻塞获取结果,但实际上有必要吗?万一我们的其中一个异步处理超过了钉钉规定的1500ms响应时间,那异步的作用就不是很大,仅仅是多个回调之间会并行,我看wxjava中之所以调用是因为它要结束session调用sessionEndAccess方法,而钉钉的没有这些,是否有必要管异步路由的结果? https://github.com/tingyugetc520/DtJava/blob/4d4e286b2a125386f0313381da2595f66f466d19/src/main/java/com/github/tingyugetc520/ali/dingtalk/message/DtMessageRouter.java#L142-L155


    又考虑了下,如果全部设置成异步不判定结果都返回true的也有个麻烦,就是如果异步失败的话需要自己记录失败,而无法仅仅通过获取推送失败的事件列表这个接口来获取全部失败的推送,需要加上自己记录的失败才是全部的失败记录。

    opened by nadirvishun 0
Releases(v0.1.2)
Owner
null
CodeLocator is a toolset that includes Android SDK and Android Studio plugins

CodeLocator is a toolset that includes Android SDK and Android Studio plugins. It has the following functions(Support Mac Only):

Bytedance Inc. 948 Jan 5, 2023
Modern Java - A Guide to Java 8

Modern Java - A Guide to Java 8 This article was originally posted on my blog. You should also read my Java 11 Tutorial (including new language and AP

Benjamin Winterberg 16.1k Jan 5, 2023
icecream-java is a Java port of the icecream library for Python.

icecream-java is a Java port of the icecream library for Python.

Akshay Thakare 20 Apr 7, 2022
JPassport works like Java Native Access (JNA) but uses the Foreign Linker API instead of JNI. Similar to JNA, you declare a Java interface that is bound to the external C library using method names.

JPassport works like Java Native Access (JNA) but uses the Foreign Linker API instead of JNI. Similar to JNA, you declare a Java interface t

null 28 Dec 30, 2022
There are two versions of assignments(Java or C++) for the CS143-Compiler course, this repo is my Java-version solution.

Intro There are two versions of assignments(Java or C++) for the CS143-Compiler course, this repo is my Java-version solution. Course resources: This

F4DE 3 Dec 15, 2022
From Java To Kotlin - Your Cheat Sheet For Java To Kotlin

From Java To Kotlin From Java To Kotlin - Your Cheat Sheet For Java To Kotlin 中文支持 Português Español Print to Console Java System.out.print("Amit Shek

MindOrks 5.8k Dec 29, 2022
Ultra-fast SQL-like queries on Java collections

CQEngine - Collection Query Engine CQEngine – Collection Query Engine – is a high-performance Java collection which can be searched with SQL-like quer

Niall Gallagher 1.6k Dec 30, 2022
Design patterns implemented in Java

Design patterns implemented in Java Read in different language : CN, KR, FR, TR, AR Introduction Design patterns are the best formalized practices a p

Ilkka Seppälä 79k Dec 31, 2022
Feature Flags for Java made easy

✨ ✨ ✨ FF4J - Feature Flipping for Java ✨ ✨ ✨ FF4j, is an implementation of the Feature Toggle pattern. ?? Features Feature Toggle: Enable. and disable

FF4j 1.1k Dec 25, 2022
A Java to iOS Objective-C translation tool and runtime.

J2ObjC: Java to Objective-C Translator and Runtime Project site: https://j2objc.org J2ObjC blog: https://j2objc.blogspot.com Questions and discussion:

Google 5.9k Dec 29, 2022