All Downloads are FREE. Search and download functionalities are using the official Maven repository.

me.chanjar.weixin.cp.api.WxCpMessageService Maven / Gradle / Ivy

There is a newer version: 4.6.7.B
Show newest version
package me.chanjar.weixin.cp.api;

import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.cp.bean.message.WxCpLinkedCorpMessage;
import me.chanjar.weixin.cp.bean.message.WxCpMessage;
import me.chanjar.weixin.cp.bean.message.WxCpMessageSendResult;
import me.chanjar.weixin.cp.bean.message.WxCpMessageSendStatistics;

/**
 * 消息推送接口.
 *
 * @author Binary Wang
 * @date 2020 -08-30
 */
public interface WxCpMessageService {
  /**
   * 
   * 发送消息
   * 详情请见: https://work.weixin.qq.com/api/doc/90000/90135/90236
   * 
* * @param message 要发送的消息对象 * @return the wx cp message send result * @throws WxErrorException the wx error exception */ WxCpMessageSendResult send(WxCpMessage message) throws WxErrorException; /** *
   * 查询应用消息发送统计
   * 请求方式:POST(HTTPS)
   * 请求地址:https://qyapi.weixin.qq.com/cgi-bin/message/get_statistics?access_token=ACCESS_TOKEN
   *
   * 详情请见: https://work.weixin.qq.com/api/doc/90000/90135/92369
   * 
* * @param timeType 查询哪天的数据,0:当天;1:昨天。默认为0。 * @return 统计结果 * @throws WxErrorException the wx error exception */ WxCpMessageSendStatistics getStatistics(int timeType) throws WxErrorException; /** *
   * 互联企业的应用支持推送文本、图片、视频、文件、图文等类型。
   *
   * 请求地址:https://qyapi.weixin.qq.com/cgi-bin/linkedcorp/message/send?access_token=ACCESS_TOKEN
   * 文章地址:https://work.weixin.qq.com/api/doc/90000/90135/90250
   * 
* * @param message 要发送的消息对象 * @return the wx cp message send result * @throws WxErrorException the wx error exception */ WxCpMessageSendResult sendLinkedCorpMessage(WxCpLinkedCorpMessage message) throws WxErrorException; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy