Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BaseURL = "https://qyapi.weixin.qq.com" Methods = map[string]HTTPAction{ "GetAccessToken": HTTPAction{ Method: "GET", URL: "/cgi-bin/gettoken?corpid={{.CropID}}&corpsecret={{.Secret}}", }, "MessageSend": HTTPAction{ Method: "POST", URL: "/cgi-bin/message/send?access_token={{.Token}}", }, } )
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { Secret string AgentID int CropID string Token string // contains filtered or unexported fields }
func GetAPIFromFile ¶
func (*API) SendMarkdownToUser ¶
type Config ¶
type Config struct { CropID string `json:"cropid"` Agent int `json:"agentid"` Secret string `json:"secret"` }
Config wxwork config
type HTTPAction ¶
type ImageMsg ¶
type ImageMsg struct { MsgBase Image struct { MediaID string `json:"media_id"` } `json:"image"` Safe int `json:"safe"` EnableIDTrans int `json:"enable_id_trans"` }
ImageMsg image msg
type MarkdownMsg ¶
type MarkdownMsg struct { MsgBase Markdown struct { Content string `json:"content"` } `json:"markdown"` }
MarkdownMsg markdown msg
func NewMarkdownMsg ¶
func NewMarkdownMsg(content string) *MarkdownMsg
type MsgBase ¶
type MsgBase struct { ToUser string `json:"touser"` ToParty string `json:"toparty"` ToTag string `json:"totag"` MsgType string `json:"msgtype"` AgentID int `json:"agentid"` }
MsgBase msg base struct
Click to show internal directories.
Click to hide internal directories.