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

com.seejoke.wechat.entity.msgbuilder.ImageBuilder Maven / Gradle / Ivy

package com.seejoke.wechat.entity.msgbuilder;

import com.seejoke.wechat.api.WxConsts;
import com.seejoke.wechat.entity.WxMessage;

/**
 * 图片消息builder
 * 
 * 用法: WxCustomMessage m = WxCustomMessage.IMAGE().mediaId(...).toUser(...).build();
 * 
* * @author diaodiaofly * */ public final class ImageBuilder extends BaseBuilder { private String mediaId; public ImageBuilder() { this.msgType = WxConsts.CUSTOM_MSG_IMAGE; } public ImageBuilder mediaId(String media_id) { this.mediaId = media_id; return this; } @Override public WxMessage build() { WxMessage m = super.build(); m.setMediaId(this.mediaId); return m; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy