MCPcopy Index your code
hub / github.com/dearcode/candy / LoadFriendList

Method LoadFriendList

client/candy.go:237–251  ·  view source on GitHub ↗

LoadFriendList 加载好友列表

()

Source from the content-addressed store, hash-verified

235
236// LoadFriendList 加载好友列表
237func (c *CandyClient) LoadFriendList() (string, error) {
238 req := &meta.GateLoadFriendListRequest{}
239 resp, err := c.api.LoadFriendList(context.Background(), req)
240 if err != nil {
241 return emptyString, err
242 }
243
244 friendList := &FriendList{Users: resp.Users}
245 data, err := encodeJSON(friendList)
246 if err != nil {
247 return emptyString, err
248 }
249
250 return string(data), resp.Header.Error()
251}
252
253// FindUser 支持模糊查询,返回对应用户的列表
254func (c *CandyClient) FindUser(user string) (string, error) {

Callers

nothing calls this directly

Calls 3

encodeJSONFunction · 0.85
LoadFriendListMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected