github.com/chanxuehong/wechat@v0.0.0-20230222024006-36f0325263cd/mp/poi/del.go (about) 1 package poi 2 3 import ( 4 "github.com/chanxuehong/wechat/mp/core" 5 ) 6 7 // Delete 删除门店. 8 func Delete(clt *core.Client, poiId int64) (err error) { 9 const incompleteURL = "https://api.weixin.qq.com/cgi-bin/poi/delpoi?access_token=" 10 11 var request = struct { 12 PoiId int64 `json:"poi_id"` 13 }{ 14 PoiId: poiId, 15 } 16 var result core.Error 17 if err = clt.PostJSON(incompleteURL, &request, &result); err != nil { 18 return 19 } 20 if result.ErrCode != core.ErrCodeOK { 21 err = &result 22 return 23 } 24 return 25 }