| | |
| | | return res.Success |
| | | } |
| | | |
| | | func (api CameraApi) UpdateSnapshotUrl(cameraId string, snapshot string) bool { |
| | | url := BASIC_URL + DATA_URL_PREFIX + "/camera/updateSnapshot" |
| | | client := NewClient() |
| | | paramBody :=make(map[string]interface{},0) |
| | | paramBody["snapshot"] = snapshot |
| | | paramBody["cameraId"] = cameraId |
| | | body,err := client.DoPostRequest(url,CONTENT_TYPE_FORM, paramBody,nil,nil) |
| | | if err != nil { |
| | | return false |
| | | } |
| | | |
| | | var res Result |
| | | if err = json.Unmarshal(body, &res); err != nil { |
| | | fmt.Println(err) |
| | | return false |
| | | } |
| | | |
| | | return res.Success |
| | | } |
| | | |
| | | func (api CameraApi) CameraDelete(cid string) bool { |
| | | url := BASIC_URL + DATA_URL_PREFIX + "/camera/delete/"+cid |
| | | client := NewClient() |