MCPcopy
hub / github.com/silenceper/wechat / AccountPaging

Method AccountPaging

work/kf/account.go:156–171  ·  view source on GitHub ↗

AccountPaging 分页获取客服账号列表 see https://developer.work.weixin.qq.com/document/path/94661

(req *AccountPagingRequest)

Source from the content-addressed store, hash-verified

154// AccountPaging 分页获取客服账号列表
155// see https://developer.work.weixin.qq.com/document/path/94661
156func (r *Client) AccountPaging(req *AccountPagingRequest) (*AccountListSchema, error) {
157 var (
158 accessToken string
159 err error
160 )
161 if accessToken, err = r.ctx.GetAccessToken(); err != nil {
162 return nil, err
163 }
164 var response []byte
165 if response, err = util.PostJSON(fmt.Sprintf(accountListAddr, accessToken), req); err != nil {
166 return nil, err
167 }
168 result := &AccountListSchema{}
169 err = util.DecodeWithError(response, result, "AccountPaging")
170 return result, err
171}
172
173// AddContactWayOptions 获取客服账号链接
174// 1.若scene非空,返回的客服链接开发者可拼接scene_param=SCENE_PARAM参数使用,用户进入会话事件会将SCENE_PARAM原样返回。其中SCENE_PARAM需要urlencode,且长度不能超过128字节。

Callers

nothing calls this directly

Calls 3

PostJSONFunction · 0.92
DecodeWithErrorFunction · 0.92
GetAccessTokenMethod · 0.65

Tested by

no test coverage detected