mirror of
https://github.com/zxbit2011/hikvisionOpenAPIGo.git
synced 2025-10-04 15:12:45 +08:00
add result
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
package examples
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/zxbit2011/hikvisionOpenAPIGo"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSDK(t *testing.T) {
|
||||
hk := hikvisionOpenAPIGo.HKConfig{
|
||||
Ip: "172.17.207.240",
|
||||
Ip: "127.0.0.1",
|
||||
Port: 443,
|
||||
AppKey: "28057383",
|
||||
Secret: "dZztQSSUAF4kLpURGQMa",
|
||||
AppKey: "28057000",
|
||||
Secret: "dZztQSS0000kLpURG000",
|
||||
IsHttps: true,
|
||||
}
|
||||
|
||||
@@ -23,16 +24,18 @@ func TestSDK(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
return
|
||||
}
|
||||
t.Log("OK", string(result))
|
||||
resJson, err := json.Marshal(result)
|
||||
t.Log("OK", string(resJson))
|
||||
|
||||
/*body := map[string]string{
|
||||
"cameraIndexCode": "71c1e8bd1b0d406a94e7cdf88a251f9b",
|
||||
"protocol": "rtmp",
|
||||
}
|
||||
result, err := hk.Post("/artemis/api/video/v2/cameras/previewURLs", body, 15)
|
||||
result, err := hk.HttpPost("/artemis/api/video/v2/cameras/previewURLs", body, 15)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
return
|
||||
}
|
||||
t.Log("OK", string(result))*/
|
||||
resJson, err := json.Marshal(result)
|
||||
t.Log("OK", string(resJson))*/
|
||||
}
|
||||
|
Reference in New Issue
Block a user