isapi_event_schedule.go 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. package isapi
  2. // Schedule 获取指定通道视频遮盖单个通道布防时间
  3. type Schedule struct {
  4. ID string `xml:"id"`
  5. EventType string `xml:"eventType"`
  6. VideoInputChannelID string `xml:"videoInputChannelID"`
  7. TimeBlockList []struct {
  8. TimeBlock struct {
  9. DayOfWeek string `xml:"dayOfWeek"`
  10. TimeRange struct {
  11. BeginTime string `xml:"beginTime"`
  12. EndTime string `xml:"endTime"`
  13. } `xml:"TimeRange"`
  14. } `xml:"TimeBlock"`
  15. } `xml:"TimeBlockList"`
  16. HolidayBlockList []struct {
  17. TimeBlock struct {
  18. TimeRange struct {
  19. BeginTime string `xml:"beginTime"`
  20. EndTime string `xml:"endTime"`
  21. } `xml:"TimeRange"`
  22. } `xml:"TimeBlock"`
  23. } `xml:"HolidayBlockList"`
  24. }
  25. func (c *Client) GetSchedule() ([]byte, error) {
  26. return c.CommonGet("/ISAPI/Event/schedules/tamperDetections/tamperdetection_video1")
  27. }
  28. func (c *Client) PutSchedule(data []byte) (resp []byte, err error) {
  29. return c.CommonPut(data, "/ISAPI/Event/schedules/tamperDetections/tamperdetection_video1")
  30. }