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

Method ClearOption

work/checkin/checkin.go:369–382  ·  view source on GitHub ↗

ClearOption 清空打卡规则数组元素 see https://developer.work.weixin.qq.com/document/path/98041#%E6%B8%85%E7%A9%BA%E6%89%93%E5%8D%A1%E8%A7%84%E5%88%99%E6%95%B0%E7%BB%84%E5%85%83%E7%B4%A0

(req *ClearOptionRequest)

Source from the content-addressed store, hash-verified

367// ClearOption 清空打卡规则数组元素
368// see https://developer.work.weixin.qq.com/document/path/98041#%E6%B8%85%E7%A9%BA%E6%89%93%E5%8D%A1%E8%A7%84%E5%88%99%E6%95%B0%E7%BB%84%E5%85%83%E7%B4%A0
369func (r *Client) ClearOption(req *ClearOptionRequest) error {
370 var (
371 accessToken string
372 err error
373 )
374 if accessToken, err = r.GetAccessToken(); err != nil {
375 return err
376 }
377 var response []byte
378 if response, err = util.PostJSON(fmt.Sprintf(clearOptionURL, accessToken), req); err != nil {
379 return err
380 }
381 return util.DecodeWithCommonError(response, "ClearOption")
382}
383
384// DelOptionRequest 删除打卡规则请求
385type DelOptionRequest struct {

Callers

nothing calls this directly

Calls 3

PostJSONFunction · 0.92
DecodeWithCommonErrorFunction · 0.92
GetAccessTokenMethod · 0.65

Tested by

no test coverage detected