Giter Club home page Giter Club logo

wecom-sdk's Introduction

点击立即微信咨询 点击加入QQ交流群

📢如果你感觉这个项目不错,请点击项目右上角的⭐以鼓励作者,谢谢🎉。

🏆简介

wecom-sdk是开源的企业微信开放 API 的 Java 实现,是目前最完整的 Java 开源实现。经过近三年的迭代,目前已经实现了通讯录管理、客户管理、微信客服、素材管理、消息推送、企微机器人、身份验证、应用管理、OA 办公、企业支付等企业微信开放接口,开发人员不需要很高的学习成本就能快速优雅地接入企业微信。

🎨企微机器人样例

/**
 * 企微机器人
 *
 * @throws IOException the io exception
 */
@Test
void webHooks()throws IOException{
        // 发 markdown
        WebhookBody markdownBody=WebhookMarkdownBody.from("这里为markdown消息");
        // 发纯文本
        WebhookBody textBody=WebhookTextBody.from("这里为纯文本");
        // 发图文
        WebhookArticle article=new WebhookArticle("这里为标题","这里为图文链接")
                                   .picurl("这里为封面图链接")
                                   .description("这里为摘要信息");
        WebhookBody newsBody=WebhookNewsBody.from(Collections.singletonList(article));
        // 从base64发图片
        String base64="图片base64";
        String md5="图片base64的md5";
        WebhookBody imageBody1=WebhookImageBody.from(base64,md5);
        // 从流发送图片
        String path="C:\\Users\\Administrator\\Desktop\\0.png";
        InputStream inputStream=Files.newInputStream(Paths.get(path));
        WebhookBody imageBody2=WebhookImageBody.from(inputStream);
        WeComResponse weComResponse=WorkWeChatApi.webhookApi().send("机器人key",markdownBody);
        Assertions.assertTrue(weComResponse.isSuccessful());
        
}

更多示例参见 SpringBootWecomSdkTests.java

🔥特性

  • 支持多个企业微信同时配置作业
  • 集成方便,适用于各种 Java 生态
  • 目前实现企业微信接口200多个,能满足大部分场景的需求
  • 全参数封装,参数高度语义化封装,再也不担心组织参数、解析参数的问题
  • 实现统一回调,所有回调事件可集中异步处理,开发者只需要关心业务逻辑的处理
  • 统一异常处理,企业微信API调用异常统一被WeComException管理
  • 由 SDK 接管 Token 生命周期,开发者无需关心 Token 的管理。

💡目前自建应用可轻松适配,服务商、代开发暂不开源。

✍️技术栈

  • Retrofit2,支持最高版本号2.9.0
  • OkHttp4,支持最高版本号4.12.0
  • Rxjava3,支持最高版本号3.0.0
  • Jackson2,支持最高版本号2.15.2
  • XStream,支持最高版本号1.4.20

🕸️Maven**仓库坐标

  • 普通版本
<dependency>
    <groupId>cn.felord</groupId>
    <artifactId>wecom-sdk</artifactId>
    <version>1.2.5</version>
</dependency>
  • rxjava 版本
<dependency>
    <groupId>cn.felord</groupId>
    <artifactId>rx-wecom-sdk</artifactId>
    <version>1.2.5</version>
</dependency>

📚文档

中文文档:https://felord.cn/wecom/overview.html

📱微信扫码加入交流群

微信扫码入群

🎉特别鸣谢

wecom-sdk's People

Contributors

notfound403 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.