From 683edeb307aee24a03c4bfe8d010fd544e5e8d8d Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期五, 18 十二月 2020 16:46:18 +0800
Subject: [PATCH] add FindRelationByGroup

---
 cameraApi.go |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/cameraApi.go b/cameraApi.go
index 5cba18a..5321e00 100644
--- a/cameraApi.go
+++ b/cameraApi.go
@@ -550,4 +550,40 @@
 	}
 
 	return res.Success,res.Data
+}
+
+func (api CameraApi) GetCoord(cameraId string) (bool,interface{}){
+	url := api.getBasicUrl() + DATA_URL_PREFIX + "/camera/coord"
+	client := NewClient()
+	paramQuery := map[string]string {
+		"cameraId": cameraId,
+	}
+	body, err := client.DoGetRequest(url, paramQuery, 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 CameraApi) UpdateCoord(paramBody map[string]interface{}) (bool,interface{}){
+	url := api.getBasicUrl() + DATA_URL_PREFIX + "/camera/updateCoord"
+	client := NewClient()
+	body,err := client.DoPostRequest(url,CONTENT_TYPE_JSON, paramBody,nil,nil)
+	if err != nil {
+		return false,nil
+	}
+
+	var res Result
+	if err = json.Unmarshal(body, &res); err != nil {
+		logPrint(err)
+		return false,nil
+	}
+
+	return res.Success,res.Data
 }
\ No newline at end of file

--
Gitblit v1.8.0