AddOption 创建打卡规则 see https://developer.work.weixin.qq.com/document/path/98041#%E5%88%9B%E5%BB%BA%E6%89%93%E5%8D%A1%E8%A7%84%E5%88%99
(req *AddOptionRequest)
| 320 | // AddOption 创建打卡规则 |
| 321 | // see https://developer.work.weixin.qq.com/document/path/98041#%E5%88%9B%E5%BB%BA%E6%89%93%E5%8D%A1%E8%A7%84%E5%88%99 |
| 322 | func (r *Client) AddOption(req *AddOptionRequest) error { |
| 323 | var ( |
| 324 | accessToken string |
| 325 | err error |
| 326 | ) |
| 327 | if accessToken, err = r.GetAccessToken(); err != nil { |
| 328 | return err |
| 329 | } |
| 330 | var response []byte |
| 331 | if response, err = util.PostJSON(fmt.Sprintf(addOptionURL, accessToken), req); err != nil { |
| 332 | return err |
| 333 | } |
| 334 | return util.DecodeWithCommonError(response, "AddOption") |
| 335 | } |
| 336 | |
| 337 | // UpdateOptionRequest 修改打卡规则请求 |
| 338 | type UpdateOptionRequest struct { |
nothing calls this directly
no test coverage detected