Documentation ¶
Index ¶
- type Client
- func (comp *Client) Delete(ctx context.Context, mediaID string) (*response2.ResponseOfficialAccount, error)
- func (comp *Client) Get(ctx context.Context, mediaID string) (*http.Response, error)
- func (comp *Client) GetNews(ctx context.Context, mediaID string) (*response.ResponseMaterialGetNews, error)
- func (comp *Client) GetVideo(ctx context.Context, mediaID string) (*response.ResponseMaterialGetVideo, error)
- func (comp *Client) List(ctx context.Context, options *request2.RequestMaterialBatchGetMaterial) (*response.ResponseMaterialBatchGetMaterial, error)
- func (comp *Client) Stats(ctx context.Context) (*response.ResponseMaterialGetMaterialCount, error)
- func (comp *Client) UpdateArticle(ctx context.Context, mediaID string, articles request2.RequestAddArticles, ...) (response.ResponseMaterialAddNews, error)
- func (comp *Client) Upload(ctx context.Context, Type string, path string, query *object.StringMap, ...) (interface{}, error)
- func (comp *Client) UploadArticle(ctx context.Context, articles request2.RequestAddArticles) (*response.ResponseMaterialAddNews, error)
- func (comp *Client) UploadArticleImage(ctx context.Context, path string) (*response.ResponseMaterialAddMaterial, error)
- func (comp *Client) UploadByData(ctx context.Context, Type string, name string, data []byte, ...) (interface{}, error)
- func (comp *Client) UploadImage(ctx context.Context, path string) (*response.ResponseMaterialAddMaterial, error)
- func (comp *Client) UploadImageByData(ctx context.Context, data []byte) (*response.ResponseMaterialAddMaterial, error)
- func (comp *Client) UploadThumb(ctx context.Context, path string) (*response.ResponseMaterialAddMaterial, error)
- func (comp *Client) UploadThumbByData(ctx context.Context, data []byte) (*response.ResponseMaterialAddMaterial, error)
- func (comp *Client) UploadVideo(ctx context.Context, path string, title string, description string) (*response.ResponseMaterialAddMaterial, error)
- func (comp *Client) UploadVideoByData(ctx context.Context, data []byte, title string, description string) (*response.ResponseMaterialAddMaterial, error)
- func (comp *Client) UploadVoice(ctx context.Context, path string) (*response.ResponseMaterialAddMaterial, error)
- func (comp *Client) UploadVoiceByData(ctx context.Context, data []byte) (*response.ResponseMaterialAddMaterial, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { *kernel.BaseClient AllowTypes []string }
func RegisterProvider ¶
func RegisterProvider(app kernel.ApplicationInterface) (*Client, error)
func (*Client) Delete ¶
func (comp *Client) Delete(ctx context.Context, mediaID string) (*response2.ResponseOfficialAccount, error)
删除永久素材 https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Deleting_Permanent_Assets.html
func (*Client) Get ¶
获取永久素材图片 https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Getting_Permanent_Assets.html
func (*Client) GetNews ¶
func (comp *Client) GetNews(ctx context.Context, mediaID string) (*response.ResponseMaterialGetNews, error)
获取永久图文素材 https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Getting_Permanent_Assets.html
func (*Client) GetVideo ¶
func (comp *Client) GetVideo(ctx context.Context, mediaID string) (*response.ResponseMaterialGetVideo, error)
获取永久视频消息素材 https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Getting_Permanent_Assets.html
func (*Client) List ¶
func (comp *Client) List(ctx context.Context, options *request2.RequestMaterialBatchGetMaterial) (*response.ResponseMaterialBatchGetMaterial, error)
获取素材列表 https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Get_materials_list.html
func (*Client) UpdateArticle ¶
func (comp *Client) UpdateArticle(ctx context.Context, mediaID string, articles request2.RequestAddArticles, index int) (response.ResponseMaterialAddNews, error)
func (*Client) UploadArticle ¶
func (comp *Client) UploadArticle(ctx context.Context, articles request2.RequestAddArticles) (*response.ResponseMaterialAddNews, error)
func (*Client) UploadArticleImage ¶
func (comp *Client) UploadArticleImage(ctx context.Context, path string) (*response.ResponseMaterialAddMaterial, error)
上传图文消息内的图片获取URL https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html
func (*Client) UploadByData ¶ added in v3.1.7
func (*Client) UploadImage ¶
func (comp *Client) UploadImage(ctx context.Context, path string) (*response.ResponseMaterialAddMaterial, error)
上传永久图片素材 https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html
func (*Client) UploadImageByData ¶ added in v3.1.7
func (comp *Client) UploadImageByData(ctx context.Context, data []byte) (*response.ResponseMaterialAddMaterial, error)
上传永久图片素材 https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html
func (*Client) UploadThumb ¶
func (comp *Client) UploadThumb(ctx context.Context, path string) (*response.ResponseMaterialAddMaterial, error)
上传永久缩略图素材 https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html
func (*Client) UploadThumbByData ¶ added in v3.1.7
func (comp *Client) UploadThumbByData(ctx context.Context, data []byte) (*response.ResponseMaterialAddMaterial, error)
上传永久缩略图素材 https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html
func (*Client) UploadVideo ¶
func (comp *Client) UploadVideo(ctx context.Context, path string, title string, description string) (*response.ResponseMaterialAddMaterial, error)
上传永久视频素材 https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html
func (*Client) UploadVideoByData ¶ added in v3.1.7
func (comp *Client) UploadVideoByData(ctx context.Context, data []byte, title string, description string) (*response.ResponseMaterialAddMaterial, error)
上传永久视频素材 https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html
func (*Client) UploadVoice ¶
func (comp *Client) UploadVoice(ctx context.Context, path string) (*response.ResponseMaterialAddMaterial, error)
上传永久语音素材 https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html
func (*Client) UploadVoiceByData ¶ added in v3.1.7
func (comp *Client) UploadVoiceByData(ctx context.Context, data []byte) (*response.ResponseMaterialAddMaterial, error)
上传永久语音素材 https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html