C# Class Senparc.Weixin.MP.AdvancedAPIs.TemplateApi

模板消息接口
Mostrar archivo Open project: JeffreySu/WeiXinMPSDK

Public Methods

Method Description
Addtemplate ( string accessTokenOrAppId, string template_id_short, int timeOut = Config.TIME_OUT ) : Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.AddtemplateJsonResult

获得模板ID

AddtemplateAsync ( string accessTokenOrAppId, string template_id_short, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获得模板ID

DelPrivateTemplate ( string accessTokenOrAppId, string template_id, int timeOut = Config.TIME_OUT ) : WxJsonResult

删除模板

DelPrivateTemplateAsync ( string accessTokenOrAppId, string template_id, int timeOut = Config.TIME_OUT ) : Task

【异步方法】删除模板

GetIndustry ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.GetIndustryJsonResult

获取设置的行业信息

GetIndustryAsync ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : Task

【异步方法】获取设置的行业信息

GetPrivateTemplate ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : GetPrivateTemplateJsonResult

获取模板列表

GetPrivateTemplateAsync ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : Task

【异步办法】 获取模板列表

SendTemplateMessage ( string accessTokenOrAppId, string openId, string templateId, string url, object data, int timeOut = Config.TIME_OUT ) : SendTemplateMessageResult

模板消息接口

SendTemplateMessageAsync ( string accessTokenOrAppId, string openId, string templateId, string url, object data, int timeOut = Config.TIME_OUT ) : Task

【异步方法】模板消息接口

SetIndustry ( string accessTokenOrAppId, IndustryCode industry_id1, IndustryCode industry_id2, int timeOut = Config.TIME_OUT ) : WxJsonResult

设置所属行业

SetIndustryAsync ( string accessTokenOrAppId, IndustryCode industry_id1, IndustryCode industry_id2, int timeOut = Config.TIME_OUT ) : Task

【异步方法】设置所属行业

Method Details

Addtemplate() public static method

获得模板ID
public static Addtemplate ( string accessTokenOrAppId, string template_id_short, int timeOut = Config.TIME_OUT ) : Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.AddtemplateJsonResult
accessTokenOrAppId string
template_id_short string 模板库中模板的编号,有“TM**”和“OPENTMTM**”等形式
timeOut int
return Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.AddtemplateJsonResult

AddtemplateAsync() public static method

【异步方法】获得模板ID
public static AddtemplateAsync ( string accessTokenOrAppId, string template_id_short, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
template_id_short string 模板库中模板的编号,有“TM**”和“OPENTMTM**”等形式
timeOut int
return Task

DelPrivateTemplate() public static method

删除模板
public static DelPrivateTemplate ( string accessTokenOrAppId, string template_id, int timeOut = Config.TIME_OUT ) : WxJsonResult
accessTokenOrAppId string
template_id string 公众帐号下模板消息ID
timeOut int
return Senparc.Weixin.Entities.WxJsonResult

DelPrivateTemplateAsync() public static method

【异步方法】删除模板
public static DelPrivateTemplateAsync ( string accessTokenOrAppId, string template_id, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
template_id string 公众帐号下模板消息ID
timeOut int
return Task

GetIndustry() public static method

获取设置的行业信息
public static GetIndustry ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.GetIndustryJsonResult
accessTokenOrAppId string
timeOut int
return Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage.GetIndustryJsonResult

GetIndustryAsync() public static method

【异步方法】获取设置的行业信息
public static GetIndustryAsync ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
timeOut int
return Task

GetPrivateTemplate() public static method

获取模板列表
public static GetPrivateTemplate ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : GetPrivateTemplateJsonResult
accessTokenOrAppId string
timeOut int
return GetPrivateTemplateJsonResult

GetPrivateTemplateAsync() public static method

【异步办法】 获取模板列表
public static GetPrivateTemplateAsync ( string accessTokenOrAppId, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
timeOut int
return Task

SendTemplateMessage() public static method

模板消息接口
public static SendTemplateMessage ( string accessTokenOrAppId, string openId, string templateId, string url, object data, int timeOut = Config.TIME_OUT ) : SendTemplateMessageResult
accessTokenOrAppId string
openId string
templateId string
url string
data object
timeOut int 代理请求超时时间(毫秒)
return SendTemplateMessageResult

SendTemplateMessageAsync() public static method

【异步方法】模板消息接口
public static SendTemplateMessageAsync ( string accessTokenOrAppId, string openId, string templateId, string url, object data, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
openId string
templateId string
url string
data object
timeOut int 代理请求超时时间(毫秒)
return Task

SetIndustry() public static method

设置所属行业
public static SetIndustry ( string accessTokenOrAppId, IndustryCode industry_id1, IndustryCode industry_id2, int timeOut = Config.TIME_OUT ) : WxJsonResult
accessTokenOrAppId string
industry_id1 IndustryCode 公众号模板消息所属行业编号
industry_id2 IndustryCode 公众号模板消息所属行业编号
timeOut int
return Senparc.Weixin.Entities.WxJsonResult

SetIndustryAsync() public static method

【异步方法】设置所属行业
public static SetIndustryAsync ( string accessTokenOrAppId, IndustryCode industry_id1, IndustryCode industry_id2, int timeOut = Config.TIME_OUT ) : Task
accessTokenOrAppId string
industry_id1 IndustryCode 公众号模板消息所属行业编号
industry_id2 IndustryCode 公众号模板消息所属行业编号
timeOut int
return Task