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

Method GetCorpStatistic

work/kf/statistic.go:49–64  ·  view source on GitHub ↗

GetCorpStatistic 获取「客户数据统计」企业汇总数据 see https://developer.work.weixin.qq.com/document/path/95489

(req *GetCorpStatisticRequest)

Source from the content-addressed store, hash-verified

47// GetCorpStatistic 获取「客户数据统计」企业汇总数据
48// see https://developer.work.weixin.qq.com/document/path/95489
49func (r *Client) GetCorpStatistic(req *GetCorpStatisticRequest) (*GetCorpStatisticResponse, error) {
50 var (
51 accessToken string
52 err error
53 )
54 if accessToken, err = r.ctx.GetAccessToken(); err != nil {
55 return nil, err
56 }
57 var response []byte
58 if response, err = util.PostJSON(fmt.Sprintf(getCorpStatisticURL, accessToken), req); err != nil {
59 return nil, err
60 }
61 result := &GetCorpStatisticResponse{}
62 err = util.DecodeWithError(response, result, "GetCorpStatistic")
63 return result, err
64}
65
66// GetServicerStatisticRequest 获取「客户数据统计」接待人员明细数据请求
67type GetServicerStatisticRequest struct {

Callers

nothing calls this directly

Calls 3

PostJSONFunction · 0.92
DecodeWithErrorFunction · 0.92
GetAccessTokenMethod · 0.65

Tested by

no test coverage detected