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

Method getUserInfoByID

client/candy.go:214–223  ·  view source on GitHub ↗
(userID int64)

Source from the content-addressed store, hash-verified

212}
213
214func (c *CandyClient) getUserInfoByID(userID int64) (*UserInfo, error) {
215 req := &meta.GateGetUserInfoRequest{Type: 1, UserID: userID}
216 resp, err := c.api.GetUserInfo(context.Background(), req)
217 if err != nil {
218 return nil, err
219 }
220
221 userInfo := &UserInfo{ID: resp.ID, Name: resp.User, NickName: resp.NickName, Avatar: resp.Avatar}
222 return userInfo, resp.Header.Error()
223}
224
225// Friend 添加好友
226func (c *CandyClient) Friend(userID int64, operate int32, msg string) error {

Callers 1

GetUserInfoByIDMethod · 0.95

Calls 2

GetUserInfoMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected