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

Method AccountList

work/kf/account.go:128–146  ·  view source on GitHub ↗

AccountList 获取客服账号列表

()

Source from the content-addressed store, hash-verified

126
127// AccountList 获取客服账号列表
128func (r *Client) AccountList() (info AccountListSchema, err error) {
129 var (
130 accessToken string
131 data []byte
132 )
133 if accessToken, err = r.ctx.GetAccessToken(); err != nil {
134 return
135 }
136 if data, err = util.HTTPGet(fmt.Sprintf(accountListAddr, accessToken)); err != nil {
137 return
138 }
139 if err = json.Unmarshal(data, &info); err != nil {
140 return
141 }
142 if info.ErrCode != 0 {
143 return info, NewSDKErr(info.ErrCode, info.ErrMsg)
144 }
145 return info, nil
146}
147
148// AccountPagingRequest 分页获取客服账号列表请求
149type AccountPagingRequest struct {

Callers

nothing calls this directly

Calls 3

HTTPGetFunction · 0.92
NewSDKErrFunction · 0.70
GetAccessTokenMethod · 0.65

Tested by

no test coverage detected