View Source WeChat.Work.LinkedCorp.Message (wechat v0.12.0)

互联企业-消息推送

互联企业是企业微信提供的满足集团与子公司、企业与上下游供应商进行连接的功能, 企业可以共享通讯录以及应用给互联企业,如需要,你可以前往管理后台-通讯录创建互联企业, 之后你可以在自建应用的可见范围设置互联企业的通讯录; 此接口主要满足开发者给互联企业成员推送消息的诉求。

Link to this section Summary

Link to this section Types

@type opts() :: Enumerable.t()
@type to() :: {:user | :party | :tag, list() | String.t()} | {:all, integer()}

Link to this section Functions

Link to this function

send(client, agent, to, msg_type, msg, opts \\ [])

View Source
Link to this function

send_file(client, agent, to, media_id, opts \\ [])

View Source

发送文件消息 - 官方文档

Link to this function

send_image(client, agent, to, media_id, opts \\ [])

View Source

发送图片消息 - 官方文档

Link to this function

send_markdown(client, agent, to, content, opts \\ [])

View Source

发送markdown消息 - 官方文档

Link to this function

send_message(client, agent, body)

View Source
@spec send_message(WeChat.Work.client(), WeChat.Work.agent(), body :: map()) ::
  WeChat.response()

发送应用消息 - 官方文档

Link to this function

send_miniprogram_notice(client, agent, to, msg, opts \\ [])

View Source
@spec send_miniprogram_notice(
  WeChat.Work.client(),
  WeChat.Work.agent(),
  to(),
  WeChat.Work.Message.msg(),
  opts()
) :: WeChat.response()

发送小程序通知消息 - 官方文档

Link to this function

send_mpnews(client, agent, to, msg, opts \\ [])

View Source

发送图文消息(mpnews) - 官方文档

Link to this function

send_news(client, agent, to, msg, opts \\ [])

View Source

发送图文消息 - 官方文档

Link to this function

send_text(client, agent, to, content, opts \\ [])

View Source

发送文本消息 - 官方文档

Link to this function

send_text_card(client, agent, to, title, description, url, btn_txt, opts \\ [])

View Source
@spec send_text_card(
  WeChat.Work.client(),
  WeChat.Work.agent(),
  to(),
  title :: String.t(),
  description :: String.t(),
  url :: String.t(),
  btn_txt :: String.t(),
  opts()
) :: WeChat.response()

发送文本卡片消息 - 官方文档

Link to this function

send_video(client, agent, to, media_id, title, description, opts \\ [])

View Source
@spec send_video(
  WeChat.Work.client(),
  WeChat.Work.agent(),
  to(),
  WeChat.Work.Material.media_id(),
  title :: String.t(),
  description :: String.t(),
  opts()
) :: WeChat.response()

发送视频消息 - 官方文档

Link to this function

send_voice(client, agent, to, media_id, opts \\ [])

View Source

发送语音消息 - 官方文档

@spec to_all() :: to()
@spec to_party(list()) :: to()
@spec to_tag(list()) :: to()
@spec to_user(list()) :: to()