| | |
| | | return "http://"+api.Ip+":"+strconv.Itoa(api.Port) |
| | | } |
| | | |
| | | func (api CameraPolygonRelationApi) FindPolygonByGroup(groupId string) (bool,interface{}) { |
| | | url := api.getBasicUrl() + DATA_URL_PREFIX + "/polygon/findByGroup" |
| | | client := NewClient() |
| | | |
| | | body, err := client.DoGetRequest(url, nil, nil) |
| | | if err != nil { |
| | | return false, nil |
| | | } |
| | | |
| | | var res Result |
| | | if err = json.Unmarshal(body, &res); err != nil { |
| | | return false,nil |
| | | } |
| | | return res.Success, res.Data |
| | | } |
| | | |
| | | func (api CameraPolygonRelationApi) FindAll() (flag bool,list []protomsg.CameraPolygonRelation) { |
| | | url := api.getBasicUrl() + DATA_URL_PREFIX + "/polygon/relation/findAll" |
| | | client := NewClient() |