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

Method UpdateOption

work/checkin/checkin.go:345–358  ·  view source on GitHub ↗

UpdateOption 修改打卡规则 see https://developer.work.weixin.qq.com/document/path/98041#%E4%BF%AE%E6%94%B9%E6%89%93%E5%8D%A1%E8%A7%84%E5%88%99

(req *UpdateOptionRequest)

Source from the content-addressed store, hash-verified

343// UpdateOption 修改打卡规则
344// see https://developer.work.weixin.qq.com/document/path/98041#%E4%BF%AE%E6%94%B9%E6%89%93%E5%8D%A1%E8%A7%84%E5%88%99
345func (r *Client) UpdateOption(req *UpdateOptionRequest) error {
346 var (
347 accessToken string
348 err error
349 )
350 if accessToken, err = r.GetAccessToken(); err != nil {
351 return err
352 }
353 var response []byte
354 if response, err = util.PostJSON(fmt.Sprintf(updateOptionURL, accessToken), req); err != nil {
355 return err
356 }
357 return util.DecodeWithCommonError(response, "UpdateOption")
358}
359
360// ClearOptionRequest 清空打卡规则数组元素请求
361type ClearOptionRequest struct {

Callers

nothing calls this directly

Calls 3

PostJSONFunction · 0.92
DecodeWithCommonErrorFunction · 0.92
GetAccessTokenMethod · 0.65

Tested by

no test coverage detected