WeChat.MiniProgram.SubscribeMessage (wechat v0.1.2)
订阅信息
Link to this section Summary
Link to this section Types
Link to this type
category_id()
Specs
category_id() :: String.t()
类目ID
Link to this type
kid_list()
Specs
kid_list() :: [String.t()]
开发者自行组合好的模板关键词列表
关键词顺序可以自由搭配(例如 [3,5,4] 或 [4,5,3]),最多支持5个,最少2个关键词组合
Link to this type
lang()
Specs
lang() :: String.t()
进入小程序查看”的语言类型
支持:
- 简体中文:
zh_CN
- 英文:
en_US
- 繁体中文:
zh_HK
- 繁体中文:
zh_TW
默认为: zh_CN
Link to this type
miniprogram_state()
Specs
miniprogram_state() :: String.t() | :developer | :trial | :formal
跳转小程序类型
- 开发版:
:developer
- 体验版:
:trial
- 正式版:
:formal
默认为: 正式版
Link to this type
pri_tmpl_id()
Specs
pri_tmpl_id() :: String.t()
个人模板id
Link to this type
scene_desc()
Specs
scene_desc() :: String.t()
服务场景描述
15个字以内
Link to this type
send_data()
Specs
send_data() :: map() | Keyword.t() | Enumerable.t()
Link to this type
send_options()
Specs
send_options() :: %{ page: WeChat.MiniProgram.Code.path(), miniprogram_state: miniprogram_state(), lang: lang() }
Link to this type
template_id()
Specs
template_id() :: String.t()
模板id
Link to this type
tid()
Specs
tid() :: String.t()
模板标题 id
可通过接口获取,也可登录小程序后台查看获取
Link to this section Functions
Link to this function
add_template(client, tid, kid_list, scene_desc \\ "")
Specs
add_template(WeChat.client(), tid(), kid_list(), scene_desc()) :: WeChat.response()
组合模板并添加至帐号下的个人模板库 - 官方文档
Link to this function
delete_template(client, pri_tmpl_id)
Specs
delete_template(WeChat.client(), pri_tmpl_id()) :: WeChat.response()
删除帐号下的个人模板 - 官方文档
Link to this function
get_category(client)
Specs
get_category(WeChat.client()) :: WeChat.response()
获取小程序账号的类目 - 官方文档
Link to this function
get_pub_template_key_words_by_id(client, tid)
Specs
get_pub_template_key_words_by_id(WeChat.client(), tid()) :: WeChat.response()
获取模板标题下的关键词列表 - 官方文档
Link to this function
get_pub_template_titles(client, ids, start \\ 0, limit \\ 30)
Specs
get_pub_template_titles( WeChat.client(), [category_id()], start :: non_neg_integer(), limit :: 1..30 ) :: WeChat.response()
获取帐号所属类目下的公共模板标题 - 官方文档
Link to this function
get_templates(client)
Specs
get_templates(WeChat.client()) :: WeChat.response()
获取当前帐号下的个人模板列表 - 官方文档
Link to this function
send(client, openid, template_id, data, options \\ %{})
Specs
send( WeChat.client(), WeChat.openid(), template_id(), send_data(), send_options() ) :: WeChat.response()
发送订阅消息 - 官方文档