21 lines
407 B
Go
21 lines
407 B
Go
package isc
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"myschools.me/suguo/hikvision/model"
|
|
)
|
|
|
|
// 设备资源
|
|
func HikvisionResources(params interface{}) (*model.HikResources, error) {
|
|
resp, err := artemisPOST("/api/irds/v2/deviceResource/resources", params)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
obj := &model.HikResources{}
|
|
if err := json.Unmarshal(*resp, obj); err != nil {
|
|
return nil, err
|
|
}
|
|
return obj, nil
|
|
}
|