workwx

package module
v0.0.0-...-8bdd9f4 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: MIT Imports: 8 Imported by: 0

README

workwx

企业微信golang sdk

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	Token     string
	ExpiresAt time.Time
}

type App

type App struct {
	*WorkWx
	AppID     int64
	AppSecret string
	// contains filtered or unexported fields
}

App 应用,企业微信每个应用是分开的

func (*App) AddTagUsers

func (c *App) AddTagUsers(req *TagUsers) (*TagUsersResp, *Error)

AddTagUsers 增加标签成员

func (*App) BatchDeleteUser

func (c *App) BatchDeleteUser(userIdList []string) *Error

BatchDeleteUser 批量删除成员

func (*App) CreateAppChat

func (c *App) CreateAppChat(req *CreateAppChatReq) (string, *Error)

CreateAppChat 创建群聊会话

func (*App) CreateDepartment

func (c *App) CreateDepartment(req *Department) (uint32, *Error)

CreateDepartment 创建部门

func (*App) CreateTag

func (c *App) CreateTag(req *Tag) (int64, *Error)

CreateTag 创建标签

func (*App) CreateUser

func (c *App) CreateUser(req User) *Error

CreateUser 创建成员

func (*App) DelTagUsers

func (c *App) DelTagUsers(req *TagUsers) (*TagUsersResp, *Error)

DelTagUsers 删除标签成员

func (*App) DeleteDepartment

func (c *App) DeleteDepartment(id uint32) *Error

DeleteDepartment 删除部门

func (*App) DeleteTag

func (c *App) DeleteTag(tagId int64) *Error

DeleteTag 删除标签

func (*App) DeleteUser

func (c *App) DeleteUser(userID string) *Error

DeleteUser 删除用户

func (*App) GetAccessToken

func (c *App) GetAccessToken() (string, *Error)

GetAccessToken 获取AccessToken

func (*App) GetAccessTokenFromServer

func (c *App) GetAccessTokenFromServer() (*AccessToken, *Error)

func (*App) GetAppChat

func (c *App) GetAppChat(chatId string) (*ChatInfo, *Error)

GetAppChat 获取群聊会话

func (*App) GetAuthUserDetail

func (c *App) GetAuthUserDetail(userTicket string) (*AuthUserDetail, *Error)

GetAuthUserDetail 获取访问用户敏感信息

func (*App) GetDepartment

func (c *App) GetDepartment(id uint32) (*Department, *Error)

GetDepartment 获取部门信息,只能返回id\parent_id\order

func (*App) GetDepartmentList

func (c *App) GetDepartmentList(id uint32) ([]*Department, *Error)

GetDepartmentList 获取子部门ID列表,只能返回id\parent_id\order

func (*App) GetJoinQrcode

func (c *App) GetJoinQrcode(sizeType uint8) (string, *Error)

GetJoinQrcode 获取加入企业二维码

func (*App) GetOAuth2Url

func (c *App) GetOAuth2Url(req *GetOAuth2UrlReq) string

GetOAuth2Url 构造网页授权链接

func (*App) GetTag

func (c *App) GetTag(tagId int64) (*GetTagResp, *Error)

GetTag 获取标签成员

func (*App) GetTagList

func (c *App) GetTagList() ([]*Tag, *Error)

GetTagList 获取标签列表

func (*App) GetUser

func (c *App) GetUser(userID string) (*GetUserResp, *Error)

GetUser 读取成员

func (*App) GetUserIdByEmail

func (c *App) GetUserIdByEmail(req *GetUserIdByEmailReq) (string, *Error)

GetUserIdByEmail 邮箱获取userid

func (*App) GetUserIdByMobile

func (c *App) GetUserIdByMobile(mobile string) (string, *Error)

GetUserIdByMobile 手机号获取userid

func (*App) GetUserIdList

func (c *App) GetUserIdList(req *GetUserIdListReq) (*GetUserIdListResp, *Error)

GetUserIdList 获取成员ID列表

func (*App) GetUserInfoByAuthCode

func (c *App) GetUserInfoByAuthCode(code string) (*AuthUserInfo, *Error)

GetUserInfoByAuthCode 通过code获取用户信息

func (*App) OpenIdToUserId

func (c *App) OpenIdToUserId(openId string) (string, *Error)

OpenIdToUserId openid转userid

func (*App) SendAppChatMessage

func (c *App) SendAppChatMessage(m AppChatMessage) *Error

SendAppChatMessage 应用推送消息到群聊会话

func (*App) SendMessage

func (c *App) SendMessage(m Message) (*SendMessageResp, *Error)

SendMessage 发送应用消息

func (*App) UpdateAppChat

func (c *App) UpdateAppChat(req *UpdateAppChatReq) *Error

UpdateAppChat 修改群聊会话

func (*App) UpdateDepartment

func (c *App) UpdateDepartment(req *Department) *Error

UpdateDepartment 更新部门

func (*App) UpdateTag

func (c *App) UpdateTag(req *Tag) *Error

UpdateTag 更新标签名字

func (*App) UpdateUser

func (c *App) UpdateUser(req User) *Error

UpdateUser 更新用户

func (*App) UserIdToOpenId

func (c *App) UserIdToOpenId(userId string) (string, *Error)

UserIdToOpenId userid转openid

type AppChatCommonMessage

type AppChatCommonMessage struct {
	ChatId  string `json:"chatid"`
	MsgType string `json:"msgtype"`
}

func (AppChatCommonMessage) AppChatSendAble

func (m AppChatCommonMessage) AppChatSendAble() bool

type AppChatFileMessage

type AppChatFileMessage struct {
	AppChatCommonMessage
	SafeMessage
	CommonFile
}

AppChatFileMessage 文件消息

type AppChatImageMessage

type AppChatImageMessage struct {
	AppChatCommonMessage
	SafeMessage
	CommonImage
}

AppChatImageMessage 图片消息

type AppChatMarkdownMessage

type AppChatMarkdownMessage struct {
	AppChatCommonMessage
	CommonMarkdown
}

AppChatMarkdownMessage markdown消息

type AppChatMessage

type AppChatMessage interface {
	AppChatSendAble() bool
}

type AppChatMpNewsMessage

type AppChatMpNewsMessage struct {
	AppChatCommonMessage
	CommonMpNews
}

AppChatMpNewsMessage 图文消息

type AppChatNewsMessage

type AppChatNewsMessage struct {
	AppChatCommonMessage
	CommonNews
}

AppChatNewsMessage 图文消息

type AppChatTextCardMessage

type AppChatTextCardMessage struct {
	AppChatCommonMessage
	CommonTextCard
}

AppChatTextCardMessage 文本卡片消息

type AppChatTextMessage

type AppChatTextMessage struct {
	AppChatCommonMessage
	SafeMessage
	CommonText
}

AppChatTextMessage 文本消息

type AppChatVideoMessage

type AppChatVideoMessage struct {
	AppChatCommonMessage
	SafeMessage
	CommonVideo
}

AppChatVideoMessage 视频消息

type AppChatVoiceMessage

type AppChatVoiceMessage struct {
	AppChatCommonMessage
	CommonVoice
}

AppChatVoiceMessage 语音消息

type AuthUserDetail

type AuthUserDetail struct {
	UserId   string `json:"userid"`
	Gender   string `json:"gender"`
	Avatar   string `json:"avatar"`
	QrCode   string `json:"qr_code"`
	Mobile   string `json:"mobile"`
	Email    string `json:"email"`
	BizEmail string `json:"biz_mail"`
	Address  string `json:"address"`
}

AuthUserDetail 用户敏感信息

type AuthUserInfo

type AuthUserInfo struct {
	//成员UserID,用户为企业成员时返回
	UserID string `json:"userid"`

	//成员票据,最大为512字节,有效期为1800s,用户为企业成员时返回
	UserTicket string `json:"user_ticket"`

	//非企业成员的标识,对当前企业唯一。不超过64字节。用户为非企业成员时返回
	OpenID string `json:"Openid"`

	//外部联系人id,当且仅当用户是企业的客户,且跟进人在应用的可见范围内时返回。用户为非企业成员时返回
	ExternalUserID string `json:"external_userid"`
}

AuthUserInfo 鉴权用户信息

type BatchDeleteUserReq

type BatchDeleteUserReq struct {
	UserIDList []string `json:"useridlist"`
}

BatchDeleteUserReq 批量删除成员

type ChatBot

type ChatBot struct {
	WebHookUrl string
}

ChatBot 群机器人

func NewChatBot

func NewChatBot(webHookUrl string) *ChatBot

func (*ChatBot) Send

func (b *ChatBot) Send(m ChatBotMessage) *Error

type ChatBotCommonMessage

type ChatBotCommonMessage struct {
	MsgType string `json:"msgtype"`
}

func (ChatBotCommonMessage) ChatBotSendAble

func (c ChatBotCommonMessage) ChatBotSendAble() bool

type ChatBotFileMessage

type ChatBotFileMessage struct {
	ChatBotCommonMessage
	CommonFile
}

type ChatBotImageMessage

type ChatBotImageMessage struct {
	ChatBotCommonMessage
	Image struct {
		Base64 string `json:"base64"`
		Md5    string `json:"md5"`
	} `json:"image"`
}

type ChatBotMarkdownMessage

type ChatBotMarkdownMessage struct {
	ChatBotCommonMessage
	CommonMarkdown
}

type ChatBotMessage

type ChatBotMessage interface {
	ChatBotSendAble() bool
}

type ChatBotNewsMessage

type ChatBotNewsMessage struct {
	ChatBotCommonMessage
	CommonNews
}

type ChatBotTextMessage

type ChatBotTextMessage struct {
	ChatBotCommonMessage
	Text struct {
		Content             string   `json:"content"`
		MentionedList       []string `json:"mentioned_list"`
		MentionedMobileList []string `json:"mentioned_mobile_list"`
	} `json:"text"`
}

type ChatBotVoiceMessage

type ChatBotVoiceMessage struct {
	ChatBotCommonMessage
	CommonVoice
}

type ChatInfo

type ChatInfo struct {
	ChatId   string   `json:"chatid"`
	Name     string   `json:"name"`
	Owner    string   `json:"owner"`
	UserList []string `json:"userlist"`
}

ChatInfo 群聊会话

type CommonFile

type CommonFile struct {
	File struct {
		MediaId string `json:"media_id"`
	} `json:"file"`
}

type CommonImage

type CommonImage struct {
	Image struct {
		MediaId string `json:"media_id"`
	} `json:"image"`
}

type CommonMarkdown

type CommonMarkdown struct {
	Markdown struct {
		Content string `json:"content"`
	} `json:"markdown"`
}

type CommonMessage

type CommonMessage struct {
	ToUser                 string `json:"touser,omitempty"`
	ToParty                string `json:"toparty,omitempty"`
	ToTag                  string `json:"totag,omitempty"`
	MsgType                string `json:"msgtype"`
	AgentId                int64  `json:"agentid"`
	EnableDuplicateCheck   uint8  `json:"enable_duplicate_check,omitempty"`
	DuplicateCheckInterval uint8  `json:"duplicate_check_interval,omitempty"`
}

CommonMessage 通用消息结构

func (CommonMessage) SendAble

func (m CommonMessage) SendAble() bool

type CommonMpNews

type CommonMpNews struct {
	MpNews struct {
		Articles []struct {
			Title            string `json:"title"`
			ThumbMediaId     string `json:"thumb_media_id"`
			Author           string `json:"author"`
			ContentSourceUrl string `json:"content_source_url"`
			Content          string `json:"content"`
			Digest           string `json:"digest"`
		} `json:"articles"`
	} `json:"mpnews"`
}

type CommonNews

type CommonNews struct {
	News struct {
		Articles []struct {
			Title       string `json:"title"`
			Description string `json:"description"`
			URL         string `json:"url"`
			PicUrl      string `json:"picurl"`
			AppId       string `json:"appid"`
			PagePath    string `json:"pagepath"`
		} `json:"articles"`
	} `json:"news"`
}

type CommonResp

type CommonResp struct {
	ErrCode int    `json:"errcode"`
	ErrMsg  string `json:"errmsg"`
}

CommonResp 企业微信返回参数公共部分

func (*CommonResp) GetError

func (x *CommonResp) GetError() error

func (*CommonResp) GetErrorCode

func (x *CommonResp) GetErrorCode() int

func (*CommonResp) IsOK

func (x *CommonResp) IsOK() bool

type CommonText

type CommonText struct {
	Text struct {
		Content string `json:"content"`
	} `json:"text"`
}

type CommonTextCard

type CommonTextCard struct {
	TextCard struct {
		Title       string `json:"title"`
		Description string `json:"description"`
		URL         string `json:"url"`
		BtnTxt      string `json:"btntxt"`
	} `json:"textcard"`
}

type CommonVideo

type CommonVideo struct {
	Video struct {
		MediaId     string `json:"media_id"`
		Title       string `json:"title"`
		Description string `json:"description"`
	} `json:"video"`
}

type CommonVoice

type CommonVoice struct {
	Voice struct {
		MediaId string `json:"media_id"`
	} `json:"voice"`
}

type CreateAppChatReq

type CreateAppChatReq struct {
	Name     string   `json:"name"`
	Owner    string   `json:"owner"`
	UserList []string `json:"userlist"`
	ChatId   string   `json:"chatid"`
}

CreateAppChatReq 创建群聊会话请求参数

type CreateAppChatResp

type CreateAppChatResp struct {
	CommonResp
	ChatId string `json:"chatid"`
}

CreateAppChatResp 创建群聊会话返回

type CreateDepartmentResp

type CreateDepartmentResp struct {
	CommonResp
	Id uint32 `json:"id"`
}

CreateDepartmentResp 创建部门返回

type CreateTagResp

type CreateTagResp struct {
	CommonResp
	TagId int64 `json:"tagid"`
}

CreateTagResp 创建标签请求参数

type Department

type Department struct {
	Name     string `json:"name"`
	NameEn   string `json:"name_en,omitempty"`
	ParentId uint32 `json:"parentid"`
	Order    uint32 `json:"order"`
	Id       uint32 `json:"id,omitempty"`
}

Department 部门

type DeptUser

type DeptUser struct {
	UserId     string `json:"userid"`
	Department uint32 `json:"department"`
}

DeptUser 用户-部门关系列表

type Error

type Error struct {
	Code int
	Msg  string
}

Error 企业微信错误,区别于系统error

func NewError

func NewError(code int, msg string) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) GetCode

func (e *Error) GetCode() int

func (*Error) GetMsg

func (e *Error) GetMsg() string

type FileMessage

type FileMessage struct {
	CommonMessage
	SafeMessage
	CommonFile
}

FileMessage 文件消息

func NewFileMessage

func NewFileMessage(agentId int64, mediaId string, safe uint8) FileMessage

type GetAppChatResp

type GetAppChatResp struct {
	CommonResp
	ChatInfo *ChatInfo `json:"chat_info"`
}

GetAppChatResp 获取群聊会话返回

type GetAuthUserDetailReq

type GetAuthUserDetailReq struct {
	UserTicket string `json:"user_ticket"`
}

GetAuthUserDetailReq 获取访问用户敏感信息请求包体

type GetAuthUserDetailResp

type GetAuthUserDetailResp struct {
	CommonResp
	AuthUserDetail
}

GetAuthUserDetailResp 获取访问用户敏感信息返回结果

type GetDepartmentListResp

type GetDepartmentListResp struct {
	CommonResp
	Departments []*Department `json:"department_id"`
}

GetDepartmentListResp 获取子部门ID列表返回

type GetJoinQrcodeResp

type GetJoinQrcodeResp struct {
	CommonResp
	JoinQrcode string `json:"join_qrcode"`
}

GetJoinQrcodeResp 获取加入企业二维码返回结果

type GetOAuth2UrlReq

type GetOAuth2UrlReq struct {
	RedirectUri string
	Scope       string
	State       string
	AgentId     int64
}

GetOAuth2UrlReq 构造网页授权链接请求链接

type GetTagListResp

type GetTagListResp struct {
	CommonResp
	TagList []*Tag `json:"taglist"`
}

GetTagListResp 获取标签列表返回

type GetTagResp

type GetTagResp struct {
	CommonResp
	TagName  string `json:"tagname"`
	UserList []struct {
		UserId string `json:"userid"`
		Name   string `json:"name"`
	} `json:"userlist"`
	PartyList []int64 `json:"partylist"`
}

GetTagResp 获取标签及成员返回

type GetTokenResp

type GetTokenResp struct {
	CommonResp
	Token     string `json:"access_token"`
	ExpiresIn int64  `json:"expires_in"`
}

GetTokenResp 企业微信获取token返回参数

type GetUserIdByEmailReq

type GetUserIdByEmailReq struct {
	Email     string `json:"email"`
	EmailType uint8  `json:"email_type"`
}

GetUserIdByEmailReq 邮箱获取userid请求参数

type GetUserIdByEmailResp

type GetUserIdByEmailResp struct {
	CommonResp
	UserId string `json:"userid"`
}

GetUserIdByEmailResp 邮箱获取userid返回

type GetUserIdByMobileReq

type GetUserIdByMobileReq struct {
	Mobile string `json:"mobile"`
}

GetUserIdByMobileReq 手机号获取userid请求参数

type GetUserIdByMobileResp

type GetUserIdByMobileResp struct {
	CommonResp
	UserId string `json:"userid"`
}

GetUserIdByMobileResp 手机号获取userid返回

type GetUserIdListReq

type GetUserIdListReq struct {
	Cursor string `json:"cursor"`
	Limit  uint32 `json:"limit"`
}

GetUserIdListReq 获取成员ID列表请求参数

type GetUserIdListResp

type GetUserIdListResp struct {
	CommonResp
	NextCursor string      `json:"next_cursor"`
	DeptUsers  []*DeptUser `json:"dept_user"`
}

GetUserIdListResp 获取成员ID列表返回

type GetUserInfoByAuthCodeResp

type GetUserInfoByAuthCodeResp struct {
	CommonResp
	AuthUserInfo
}

GetUserInfoByAuthCodeResp 通过code获取用户信息返回信息

type GetUserResp

type GetUserResp struct {
	CommonResp
	User
}

GetUserResp 获取成员信息

type ICommonResp

type ICommonResp interface {
	IsOK() bool
	GetError() error
	GetErrorCode() int
}

type IdTrans

type IdTrans struct {
	EnableIdTrans int `json:"enable_id_trans,omitempty"`
}

IdTrans id转译

type ImageMessage

type ImageMessage struct {
	CommonMessage
	SafeMessage
	CommonImage
}

ImageMessage 图片消息

func NewImageMessage

func NewImageMessage(agentId int64, mediaId string, safe uint8) ImageMessage

type MarkdownMessage

type MarkdownMessage struct {
	CommonMessage
	CommonMarkdown
}

MarkdownMessage markdown消息

func NewMarkdownMessage

func NewMarkdownMessage(agentId int64, content string) MarkdownMessage

type Message

type Message interface {
	SendAble() bool
}

Message 消息接口

type MpNewsMessage

type MpNewsMessage struct {
	CommonMessage
	SafeMessage
	IdTrans
	CommonMpNews
}

MpNewsMessage 图文消息

type NewsMessage

type NewsMessage struct {
	CommonMessage
	IdTrans
	CommonNews
}

NewsMessage 图文消息

type OpenIdToUserIdReq

type OpenIdToUserIdReq struct {
	OpenId string `json:"openid"`
}

OpenIdToUserIdReq openid转userid请求参数

type OpenIdToUserIdResp

type OpenIdToUserIdResp struct {
	CommonResp
	UserId string `json:"userid"`
}

OpenIdToUserIdResp openid转userid返回结果

type SafeMessage

type SafeMessage struct {
	Safe uint8 `json:"safe"`
}

SafeMessage 保密消息

type SendMessageResp

type SendMessageResp struct {
	CommonResp
	InvalidUser    string `json:"invaliduser"`
	InvalidParty   string `json:"invalidparty"`
	UnlicensedUser string `json:"unlicenseduser"`
	MsgId          string `json:"msgid"`
	ResponseCode   string `json:"response_code"`
}

SendMessageResp 发送应用消息返回

type Tag

type Tag struct {
	TagName string `json:"tagname"`
	TagId   int64  `json:"tagid"`
}

Tag 标签

type TagUsers

type TagUsers struct {
	TagId     int64    `json:"tagid"`
	UserList  []string `json:"userlist"`
	PartyList []int64  `json:"partylist"`
}

TagUsers 标签成员请求参数

type TagUsersResp

type TagUsersResp struct {
	CommonResp
	InvalidList  string  `json:"invalidlist"`
	InvalidParty []int64 `json:"invalidparty"`
}

TagUsersResp 增加/删除标签成员返回

type TextCardMessage

type TextCardMessage struct {
	CommonMessage
	IdTrans
	CommonTextCard
}

TextCardMessage 文本卡片消息

type TextMessage

type TextMessage struct {
	CommonMessage
	SafeMessage
	IdTrans
	CommonText
}

TextMessage 文本消息

func NewTextMessage

func NewTextMessage(agentId int64, content string, safe uint8) TextMessage

type UpdateAppChatReq

type UpdateAppChatReq struct {
	ChatId      string   `json:"chatid"`
	Name        string   `json:"name"`
	Owner       string   `json:"owner"`
	AddUserList []string `json:"add_user_list,omitempty"`
	DelUserList []string `json:"del_user_list,omitempty"`
}

UpdateAppChatReq 修改群聊会话请求参数

type User

type User struct {
	UserID              string   `json:"userid"`
	Name                string   `json:"name"`
	Alias               string   `json:"alias"`
	Mobile              string   `json:"mobile"`
	Department          []int    `json:"department"`
	Order               []int    `json:"order"`
	Position            string   `json:"position"`
	Gender              string   `json:"gender"`
	Email               string   `json:"email"`
	BizMail             string   `json:"biz_mail"`
	IsLeaderInDept      []int    `json:"is_leader_in_dept"`
	DirectLeader        []string `json:"direct_leader"`
	Telephone           string   `json:"telephone"`
	Avatar              string   `json:"avatar"`       //读取成员才返回
	ThumbAvatar         string   `json:"thumb_avatar"` //读取成员才返回
	Address             string   `json:"address"`
	OpenUserId          string   `json:"open_userid"` //读取成员才返回
	MainDepartment      int      `json:"main_department"`
	Status              int      `json:"status"`  //读取成员才返回
	QrCode              string   `json:"qr_code"` //读取成员才返回
	ExternalPosition    string   `json:"external_position"`
	UserExtAttr         `json:"extattr"`
	UserExternalProfile `json:"external_profile"`
	//以下添加更新操作才有此参数
	Enable        int    `json:"enable"`
	AvatarMediaId string `json:"avatarMediaId"`
	//添加成员才有此参数
	ToInvite bool `json:"to_invite"`
}

User 成员信息

type UserExtAttr

type UserExtAttr struct {
	Attrs []struct {
		Type int    `json:"type"`
		Name string `json:"name"`
		Text struct {
			Value string `json:"value"`
		} `json:"text,omitempty"`
		Web struct {
			URL   string `json:"url"`
			Title string `json:"title"`
		} `json:"web,omitempty"`
	} `json:"attrs"`
}

UserExtAttr 用户扩展属性

type UserExternalProfile

type UserExternalProfile struct {
	ExternalCorpName string `json:"external_corp_name"`
	WechatChannels   struct {
		NickName string `json:"nickname"`
		Status   int    `json:"status"`
	} `json:"wechat_channels"`
	ExternalAttr []struct {
		Type int    `json:"type"`
		Name string `json:"name"`
		Text struct {
			Value string `json:"value"`
		} `json:"text,omitempty"`
		Web struct {
			URL   string `json:"url"`
			Title string `json:"title"`
		} `json:"web,omitempty"`
		MiniProgram struct {
			Appid    string `json:"appid"`
			PagePath string `json:"pagepath"`
			Title    string `json:"title"`
		} `json:"miniprogram,omitempty"`
	} `json:"external_attr"`
}

UserExternalProfile 成员对外属性

type UserIdToOpenIdReq

type UserIdToOpenIdReq struct {
	UserId string `json:"userid"`
}

UserIdToOpenIdReq userid转openid请求参数

type UserIdToOpenIdResp

type UserIdToOpenIdResp struct {
	CommonResp
	OpenId string `json:"openid"`
}

UserIdToOpenIdResp userid转openid返回结果

type VideoMessage

type VideoMessage struct {
	CommonMessage
	SafeMessage
	CommonVideo
}

VideoMessage 视频消息

func NewVideoMessage

func NewVideoMessage(agentId int64, mediaId, description string, title string, safe uint8) VideoMessage

type VoiceMessage

type VoiceMessage struct {
	CommonMessage
	CommonVoice
}

VoiceMessage 语音消息

func NewVoiceMessage

func NewVoiceMessage(agentId int64, mediaId string) VoiceMessage

type WorkWx

type WorkWx struct {
	// 企业 ID
	CorpID string
}

WorkWx 企业微信客户端

func New

func New(corpID string) *WorkWx

New 新建企业微信客户端

func (*WorkWx) WithApp

func (c *WorkWx) WithApp(appID int64, appSecret string) *App

WithApp 创建企业微信应用客户端

Jump to

Keyboard shortcuts

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