mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-04 12:52:27 +08:00
企业微信保持代码风格统一,接口URL不导出 (#660)
* 企业微信-客户联系-统计管理 * 企业微信-客户联系-统计管理 * 企业微信-客户联系-统计管理 * debug * rollback * debug * debug * 获取用户信息 * token * json.Marshal错误输出 * debug * bugfix * 企业微信-通讯录管理相关接口 * 企业微信-通讯录管理 * 企业微信-通讯录管理 * 企业微信-通讯录管理 * 企业微信-[联系我]方式新增和查询 * 企业微信-[联系我]方式新增和获取 * 企业微信-[联系我]方式更新 * 企业微信-[联系我]方式列表、删除 * json.Marshal错误输出 * 已实现接口bug修改 * 历史接口bugfix * 历史接口bugfix * comment * 企业微信:客户联系-消息推送;素材管理-上传图片 * fix * 企业微信-获取群发记录列表 * 历史接口bugfix * 1.企业微信-客户联系-消息推送-入群欢迎语素材管理 2.企业微信-通讯录管理-成员管理-获取成员ID列表 * golangci-lint * gofmt * 方法访问命名 * 企业微信-批量获取客户详情入参优化 * 企业微信-通讯录管理-标签管理-创建/更新/删除标签 * 请求地址常量无需导出 * 企业微信保持代码风格统一,接口URL不导出 --------- Co-authored-by: wang.yu <wangyu@uniondrug.com> Co-authored-by: markwang <www.wang61@qq.com>
This commit is contained in:
@@ -7,11 +7,10 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// UploadImgURL 上传图片
|
||||
UploadImgURL = "https://qyapi.weixin.qq.com/cgi-bin/media/uploadimg?access_token=%s"
|
||||
|
||||
// UploadTempFile 上传临时素材
|
||||
UploadTempFile = "https://qyapi.weixin.qq.com/cgi-bin/media/upload?access_token=%s&type=%s"
|
||||
// uploadImgURL 上传图片
|
||||
uploadImgURL = "https://qyapi.weixin.qq.com/cgi-bin/media/uploadimg?access_token=%s"
|
||||
// uploadTempFile 上传临时素材
|
||||
uploadTempFile = "https://qyapi.weixin.qq.com/cgi-bin/media/upload?access_token=%s&type=%s"
|
||||
)
|
||||
|
||||
// UploadImgResponse 上传图片响应
|
||||
@@ -39,7 +38,7 @@ func (r *Client) UploadImg(filename string) (*UploadImgResponse, error) {
|
||||
return nil, err
|
||||
}
|
||||
var response []byte
|
||||
if response, err = util.PostFile("media", filename, fmt.Sprintf(UploadImgURL, accessToken)); err != nil {
|
||||
if response, err = util.PostFile("media", filename, fmt.Sprintf(uploadImgURL, accessToken)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
result := &UploadImgResponse{}
|
||||
@@ -61,7 +60,7 @@ func (r *Client) UploadTempFile(filename string, mediaType string) (*UploadTempF
|
||||
return nil, err
|
||||
}
|
||||
var response []byte
|
||||
if response, err = util.PostFile("media", filename, fmt.Sprintf(UploadTempFile, accessToken, mediaType)); err != nil {
|
||||
if response, err = util.PostFile("media", filename, fmt.Sprintf(uploadTempFile, accessToken, mediaType)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
result := &UploadTempFileResponse{}
|
||||
|
||||
Reference in New Issue
Block a user