Package com.foxinmy.weixin4j.tuple
Class MpNews
- java.lang.Object
-
- com.foxinmy.weixin4j.tuple.MpNews
-
- All Implemented Interfaces:
MassTuple
,NotifyTuple
,Tuple
,Serializable
public class MpNews extends Object implements MassTuple, NotifyTuple
图文对象(mpnews消息与news消息类似,不同的是图文消息内容存储在微信后台,并且支持保密选项。每个应用每天最多可以发送100次)可用于「公众平台的群发消息」「客服消息」
- 当用于发送公众平台的群发消息和客服消息时:其中mediaId与articles请至少保持一个有值
- 当用于发送企业号的客服消息时:其中articles必须有值
- Since:
- JDK 1.6
- Author:
- jinyu(foxinmy@gmail.com)
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MpNews
addArticle(MpArticle... articles)
MpNews
addArticle(String thumbMediaId, String title, String content)
MpNews
addFirstArticle(MpArticle article)
MpNews
addLastArticle(MpArticle article)
List<MpArticle>
getArticles()
List<MpArticle>
getFullArticles()
String
getMediaId()
String
getMessageType()
消息类型boolean
isMaxCount()
MpNews
removeFirstArticle()
MpNews
removeLastArticle()
String
toString()
-
-
-
Method Detail
-
getMessageType
public String getMessageType()
Description copied from interface:Tuple
消息类型- Specified by:
getMessageType
in interfaceTuple
- Returns:
-
addArticle
public MpNews addArticle(String thumbMediaId, String title, String content)
- Parameters:
thumbMediaId
- 缩略图title
- 标题content
- 内容
-
removeFirstArticle
public MpNews removeFirstArticle()
-
removeLastArticle
public MpNews removeLastArticle()
-
isMaxCount
public boolean isMaxCount()
-
getMediaId
public String getMediaId()
-
-