|
|
@@ -48,3 +48,25 @@ func (r *UserDeleteResp) ParseResponse(resp *http.Response) error { |
|
|
func (c *Client) UserDelete(req *UserDelete) error { |
|
|
func (c *Client) UserDelete(req *UserDelete) error { |
|
|
return JSONAPINoData(c.cfg, http.DefaultClient, req) |
|
|
return JSONAPINoData(c.cfg, http.DefaultClient, req) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const UserBatchGetStatsPath = "/v1/user/batchGetStats" |
|
|
|
|
|
|
|
|
|
|
|
type UserBatchGetStats struct { |
|
|
|
|
|
UserIDs []cdssdk.UserID `json:"userIDs" binding:"required"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (r *UserBatchGetStats) MakeParam() *sdks.RequestParam { |
|
|
|
|
|
return sdks.MakeJSONParam(http.MethodPost, UserBatchGetStatsPath, r) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type UserBatchGetStatsResp struct { |
|
|
|
|
|
Stats []*cdssdk.UserStats `json:"stats"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (r *UserBatchGetStatsResp) ParseResponse(resp *http.Response) error { |
|
|
|
|
|
return sdks.ParseCodeDataJSONResponse(resp, r) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (c *Client) UserBatchGetStats(req *UserBatchGetStats) (*UserBatchGetStatsResp, error) { |
|
|
|
|
|
return JSONAPI(c.cfg, http.DefaultClient, req, &UserBatchGetStatsResp{}) |
|
|
|
|
|
} |