1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-11 08:12:26 +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:
markwang
2023-04-03 17:06:07 +08:00
committed by GitHub
parent fbda048f62
commit ca0b74e082
12 changed files with 113 additions and 114 deletions

View File

@@ -7,8 +7,8 @@ import (
)
const (
// DepartmentSimpleListURL 获取子部门ID列表
DepartmentSimpleListURL = "https://qyapi.weixin.qq.com/cgi-bin/department/simplelist?access_token=%s&id=%d"
// departmentSimpleListURL 获取子部门ID列表
departmentSimpleListURL = "https://qyapi.weixin.qq.com/cgi-bin/department/simplelist?access_token=%s&id=%d"
)
type (
@@ -36,7 +36,7 @@ func (r *Client) DepartmentSimpleList(departmentID int) ([]*DepartmentID, error)
return nil, err
}
var response []byte
if response, err = util.HTTPGet(fmt.Sprintf(DepartmentSimpleListURL, accessToken, departmentID)); err != nil {
if response, err = util.HTTPGet(fmt.Sprintf(departmentSimpleListURL, accessToken, departmentID)); err != nil {
return nil, err
}
result := &DepartmentSimpleListResponse{}

View File

@@ -7,12 +7,12 @@ import (
)
const (
// UserSimpleListURL 获取部门成员
UserSimpleListURL = "https://qyapi.weixin.qq.com/cgi-bin/user/simplelist?access_token=%s&department_id=%d"
// UserGetURL 读取成员
UserGetURL = "https://qyapi.weixin.qq.com/cgi-bin/user/get?access_token=%s&userid=%s"
// UserListIDURL 获取成员ID列表
UserListIDURL = "https://qyapi.weixin.qq.com/cgi-bin/user/list_id?access_token=%s"
// userSimpleListURL 获取部门成员
userSimpleListURL = "https://qyapi.weixin.qq.com/cgi-bin/user/simplelist?access_token=%s&department_id=%d"
// userGetURL 读取成员
userGetURL = "https://qyapi.weixin.qq.com/cgi-bin/user/get?access_token=%s&userid=%s"
// userListIDURL 获取成员ID列表
userListIDURL = "https://qyapi.weixin.qq.com/cgi-bin/user/list_id?access_token=%s"
)
type (
@@ -41,7 +41,7 @@ func (r *Client) UserSimpleList(departmentID int) ([]*UserList, error) {
return nil, err
}
var response []byte
if response, err = util.HTTPGet(fmt.Sprintf(UserSimpleListURL, accessToken, departmentID)); err != nil {
if response, err = util.HTTPGet(fmt.Sprintf(userSimpleListURL, accessToken, departmentID)); err != nil {
return nil, err
}
result := &UserSimpleListResponse{}
@@ -125,7 +125,7 @@ func (r *Client) UserGet(UserID string) (*UserGetResponse, error) {
return nil, err
}
var response []byte
if response, err = util.HTTPGet(fmt.Sprintf(UserGetURL, accessToken, UserID)); err != nil {
if response, err = util.HTTPGet(fmt.Sprintf(userGetURL, accessToken, UserID)); err != nil {
return nil, err
}
result := &UserGetResponse{}
@@ -166,7 +166,7 @@ func (r *Client) UserListID(req *UserListIDRequest) (*UserListIDResponse, error)
return nil, err
}
var response []byte
if response, err = util.PostJSON(fmt.Sprintf(UserListIDURL, accessToken), req); err != nil {
if response, err = util.PostJSON(fmt.Sprintf(userListIDURL, accessToken), req); err != nil {
return nil, err
}
result := &UserListIDResponse{}