request

package
v2.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2022 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BTN

type BTN struct {
	Key    string `json:"key"`
	Name   string `json:"name"`
	Value  string `json:"value"`
	IsBold bool   `json:"is_bold"`
}

type ContentItem

type ContentItem struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type InteractiveTaskCard

type InteractiveTaskCard struct {
	Title       string `json:"title"`       //  "会议室预订成功通知",
	Description string `json:"description"` //  "4月27日 16:16",
	URl         string `json:"url"`         //  true,
	BTN         []*BTN `json:"content_item"`
}

type MiniProgramNotice

type MiniProgramNotice struct {
	Appid             string         `json:"appid"`               //  "wx123123123123123",
	Page              string         `json:"page"`                //  "pages/index?userid=zhangsan&orderid=123123123",
	Title             string         `json:"title"`               //  "会议室预订成功通知",
	Description       string         `json:"description"`         //  "4月27日 16:16",
	EmphasisFirstItem bool           `json:"emphasis_first_item"` //  true,
	ContentItem       []*ContentItem `json:"content_item"`
}

type RequestFile

type RequestFile struct {
	MediaID string `json:"media_id"` // {"你的快递已到,请携带工卡前往邮件中心领取。\n出发前可查看<a href=\"http://work.weixin.qq.com\">邮件中心视频实况</a>,聪明避开排队。"},
}

type RequestImage

type RequestImage struct {
	MediaID string `json:"media_id"` //  "MEDIA_ID"
}

type RequestMPNews

type RequestMPNews struct {
	Article []*RequestMPNewsArticle `json:"articles"`
}

type RequestMPNewsArticle

type RequestMPNewsArticle struct {
	Title            string `json:"title"`              // "Title",
	ThumbMediaID     string `json:"thumb_media_id"`     // "MEDIA_ID",
	Author           string `json:"author"`             // "Author",
	ContentSourceURL string `json:"content_source_url"` // "URL",
	Content          string `json:"content"`            // "Content",
	Digest           string `json:"digest"`             // "Digest description"
}

type RequestMarkdown

type RequestMarkdown struct {
	Content string `json:"content"` // {"您的会议室已经预定,稍后会同步到`邮箱`

}

type RequestMessageSend

type RequestMessageSend struct {
	// touser、toparty、totag不能同时为空
	ToUser  string `json:"touser"`  // "UserID1|UserID2|UserID3",
	ToParty string `json:"toparty"` // "PartyID1|PartyID2",
	ToTag   string `json:"totag"`   // "TagID1 | TagID2",
	MsgType string `json:"msgtype"` // "text",
	AgentID int    `json:"agentid"` // 1,

	Safe                   int `json:"safe"`                     //  0,
	EnableIDTrans          int `json:"enable_id_trans"`          //  0,
	EnableDuplicateCheck   int `json:"enable_duplicate_check"`   //  0,
	DuplicateCheckInterval int `json:"duplicate_check_interval"` //  1800
}

func (*RequestMessageSend) GetAgentID

func (request *RequestMessageSend) GetAgentID() int

func (*RequestMessageSend) SetAgentID

func (request *RequestMessageSend) SetAgentID(agentID int) RequestMessageSendInterface

type RequestMessageSendFile

type RequestMessageSendFile struct {
	RequestMessageSend
	File *RequestFile `json:"file"`
}

type RequestMessageSendImage

type RequestMessageSendImage struct {
	RequestMessageSend
	Image *RequestImage `json:"image"`
}

type RequestMessageSendInteractiveTaskCard

type RequestMessageSendInteractiveTaskCard struct {
	RequestMessageSend
	InteractiveTaskCard *InteractiveTaskCard `json:"interactive_taskcard"`
}

type RequestMessageSendInterface

type RequestMessageSendInterface interface {
	GetAgentID() int
	SetAgentID(agentID int) RequestMessageSendInterface
}

https://developer.work.weixin.qq.com/document/path/90236#文件消息

type RequestMessageSendMPNews

type RequestMessageSendMPNews struct {
	RequestMessageSend
	MPNews *RequestMPNews `json:"mpnews"`
}

type RequestMessageSendMarkdown

type RequestMessageSendMarkdown struct {
	RequestMessageSend
	Markdown *RequestMarkdown `json:"markdown"`
}

type RequestMessageSendMiniProgramNotice

type RequestMessageSendMiniProgramNotice struct {
	RequestMessageSend
	MiniProgramNotice *MiniProgramNotice `json:"miniprogram_notice"`
}

type RequestMessageSendNews

type RequestMessageSendNews struct {
	RequestMessageSend
	News *RequestNews `json:"news"`
}

type RequestMessageSendTemplateCard

type RequestMessageSendTemplateCard struct {
	RequestMessageSend
	TemplateCard *RequestTemplateCard `json:"template_card"`
}

type RequestMessageSendText

type RequestMessageSendText struct {
	RequestMessageSend
	Text *RequestText `json:"text"`
}

type RequestMessageSendTextCard

type RequestMessageSendTextCard struct {
	RequestMessageSend
	TextCard *RequestTextCard `json:"textcard"`
}

type RequestMessageSendVideo

type RequestMessageSendVideo struct {
	RequestMessageSend
	Video *RequestVideo `json:"video"`
}

type RequestMessageSendVoice

type RequestMessageSendVoice struct {
	RequestMessageSend
	Voice *RequestVoice `json:"voice"`
}

type RequestNews

type RequestNews struct {
	Article []*RequestNewsArticle `json:"articles"`
}

type RequestNewsArticle

type RequestNewsArticle struct {
	Title       string `json:"title"`       // "领奖通知",
	Description string `json:"description"` // "<div class=\"gray\">2016年9月26日</div> <div class=\"normal\">恭喜你抽中iPhone 7一台,领奖码:xxxx</div><div class=\"highlight\">请于2016年10月10日前联系行政同事领取</div>",
	URL         string `json:"url"`         // "URL",
	PicURL      string `json:"picurl"`      // 多"
	AppID       string `json:"appid"`
	PagePath    string `json:"pagepath"`
}

type RequestTemplateCard

type RequestTemplateCard struct {
	CardType              string                                   `json:"card_type"`
	Source                *TemplateCardSource                      `json:"source"`
	ActionMenu            *TemplateCardActionMenu                  `json:"action_menu"`
	TaskID                string                                   `json:"task_id"`
	MainTitle             *TemplateCardMainTitle                   `json:"main_title"`
	QuoteArea             *TemplateCardQuoteArea                   `json:"quote_area"`
	EmphasisContent       *TemplateCardEmphasisContent             `json:"emphasis_content"`
	SubTitleText          string                                   `json:"sub_title_text"`
	HorizontalContentList []*TemplateCardHorizontalContentListItem `json:"horizontal_content_list"`
	JumpList              []*TemplateCardJumpListItem              `json:"jump_list"`
	CardAction            *TemplateCardAction                      `json:"card_action"`
	ImageTextArea         *TemplateCardImageTextArea               `json:"image_text_area"`
	CardImage             *TemplateCardImage                       `json:"card_image"`
	VerticalContentList   []*TemplateCardVerticalContentListItem   `json:"vertical_content_list"`
	ButtonSelection       *TemplateCardButtonSelection             `json:"button_selection"`
	ButtonList            []*TemplateCardButtonListItem            `json:"button_list"`
	Checkbox              *TemplateCardCheckbox                    `json:"checkbox"`
	SubmitButton          *TemplateCardSubmitButton                `json:"submit_button"`
	SelectList            []*TemplateCardSelectList                `json:"select_list"`
}

type RequestText

type RequestText struct {
	Content string `json:"content"` // {"你的快递已到,请携带工卡前往邮件中心领取。\n出发前可查看<a href=\"http://work.weixin.qq.com\">邮件中心视频实况</a>,聪明避开排队。"},
}

type RequestTextCard

type RequestTextCard struct {
	Title       string `json:"title"`       // "领奖通知",
	Description string `json:"description"` // "<div class=\"gray\">2016年9月26日</div> <div class=\"normal\">恭喜你抽中iPhone 7一台,领奖码:xxxx</div><div class=\"highlight\">请于2016年10月10日前联系行政同事领取</div>",
	Url         string `json:"url"`         // "URL",
	BtnTXT      string `json:"btntxt"`      // 多"
}

type RequestVideo

type RequestVideo struct {
	MediaID     string `json:"media_id"`    //  "MEDIA_ID",
	Title       string `json:"title"`       // "Title",
	Description string `json:"description"` // "Description"
}

type RequestVoice

type RequestVoice struct {
	MediaID string `json:"media_id"` // {"你的快递已到,请携带工卡前往邮件中心领取。\n出发前可查看<a href=\"http://work.weixin.qq.com\">邮件中心视频实况</a>,聪明避开排队。"},
}

type TemplateCardAction

type TemplateCardAction struct {
	Type     int    `json:"type"`
	Url      string `json:"url"`
	AppID    string `json:"appid"`
	Pagepath string `json:"pagepath"`
}

type TemplateCardActionListItem

type TemplateCardActionListItem struct {
	Text string `json:"text"`
	Key  string `json:"key"`
}

type TemplateCardActionMenu

type TemplateCardActionMenu struct {
	Desc       string                        `json:"desc"`
	ActionList []*TemplateCardActionListItem `json:"action_list"`
}

type TemplateCardButtonListItem

type TemplateCardButtonListItem struct {
	Text  string `json:"text"`
	Style int    `json:"style"`
	Key   string `json:"key"`
}

type TemplateCardButtonSelection

type TemplateCardButtonSelection struct {
	QuestionKey string                        `json:"question_key"`
	Title       string                        `json:"title"`
	OptionList  []*TemplateCardOptionListItem `json:"option_list"`
	SelectedID  string                        `json:"selected_id"`
}

type TemplateCardCheckbox

type TemplateCardCheckbox struct {
	QuestionKey string                                `json:"question_key"`
	OptionList  []*TemplateCardCheckboxOptionListItem `json:"option_list"`
	Mode        int                                   `json:"mode"`
}

type TemplateCardCheckboxOptionListItem

type TemplateCardCheckboxOptionListItem struct {
	ID        string `json:"id"`
	Text      string `json:"text"`
	IsChecked bool   `json:"is_checked"`
}

type TemplateCardEmphasisContent

type TemplateCardEmphasisContent struct {
	Title string `json:"title"`
	Desc  string `json:"desc"`
}

type TemplateCardHorizontalContentListItem

type TemplateCardHorizontalContentListItem struct {
	Keyname string `json:"keyname"`
	Value   string `json:"value"`
	Type    int    `json:"type,omitempty"`
	Url     string `json:"url,omitempty"`
	MediaID string `json:"media_id,omitempty"`
	UserID  string `json:"userid,omitempty"`
}

type TemplateCardImage

type TemplateCardImage struct {
	Url         string  `json:"url"`
	AspectRatio float64 `json:"aspect_ratio"`
}

type TemplateCardImageTextArea

type TemplateCardImageTextArea struct {
	Type     int    `json:"type"`
	Url      string `json:"url"`
	Title    string `json:"title"`
	Desc     string `json:"desc"`
	ImageUrl string `json:"image_url"`
}

type TemplateCardJumpListItem

type TemplateCardJumpListItem struct {
	Type     int    `json:"type"`
	Title    string `json:"title"`
	Url      string `json:"url,omitempty"`
	AppID    string `json:"appid,omitempty"`
	Pagepath string `json:"pagepath,omitempty"`
}

type TemplateCardMainTitle

type TemplateCardMainTitle struct {
	Title string `json:"title"`
	Desc  string `json:"desc"`
}

type TemplateCardOptionListItem

type TemplateCardOptionListItem struct {
	ID   string `json:"id"`
	Text string `json:"text"`
}

type TemplateCardQuoteArea

type TemplateCardQuoteArea struct {
	Type      int    `json:"type"`
	Url       string `json:"url"`
	Title     string `json:"title"`
	QuoteText string `json:"quote_text"`
}

type TemplateCardSelectList

type TemplateCardSelectList struct {
	QuestionKey string                        `json:"question_key"`
	Title       string                        `json:"title"`
	SelectedID  string                        `json:"selected_id"`
	OptionList  []*TemplateCardOptionListItem `json:"option_list"`
}

type TemplateCardSource

type TemplateCardSource struct {
	IconUrl   string `json:"icon_url"`
	Desc      string `json:"desc"`
	DescColor int    `json:"desc_color"`
}

type TemplateCardSubmitButton

type TemplateCardSubmitButton struct {
	Text string `json:"text"`
	Key  string `json:"key"`
}

type TemplateCardVerticalContentListItem

type TemplateCardVerticalContentListItem struct {
	Title string `json:"title"`
	Desc  string `json:"desc"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL