Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client 素材管理接口实例
func (*Client) UploadAttachment ¶
func (r *Client) UploadAttachment(filename string, mediaType string, attachmentType int) (*UploadAttachmentResponse, error)
UploadAttachment 上传附件资源 @see https://developer.work.weixin.qq.com/document/path/95098 @mediaType 媒体文件类型,分别有图片(image)、视频(video)、普通文件(file) @attachment_type 附件类型,不同的附件类型用于不同的场景。1:朋友圈;2:商品图册
func (*Client) UploadImg ¶
func (r *Client) UploadImg(filename string) (*UploadImgResponse, error)
UploadImg 上传图片 @see https://developer.work.weixin.qq.com/document/path/90256
func (*Client) UploadTempFile ¶
func (r *Client) UploadTempFile(filename string, mediaType string) (*UploadTempFileResponse, error)
UploadTempFile 上传临时素材 @see https://developer.work.weixin.qq.com/document/path/90253 @mediaType 媒体文件类型,分别有图片(image)、语音(voice)、视频(video),普通文件(file)
type UploadAttachmentResponse ¶
type UploadAttachmentResponse struct { util.CommonError MediaID string `json:"media_id"` CreateAt int64 `json:"created_at"` Type string `json:"type"` }
UploadAttachmentResponse 上传资源附件响应
type UploadImgResponse ¶
type UploadImgResponse struct { util.CommonError URL string `json:"url"` }
UploadImgResponse 上传图片响应
type UploadTempFileResponse ¶
type UploadTempFileResponse struct { util.CommonError MediaID string `json:"media_id"` CreateAt string `json:"created_at"` Type string `json:"type"` }
UploadTempFileResponse 上传临时素材响应
Click to show internal directories.
Click to hide internal directories.