isapi_event_channelCap.go 839 B

1234567891011121314151617181920212223242526272829303132
  1. package isapi
  2. import (
  3. "encoding/xml"
  4. )
  5. type ChannelEventCapList struct {
  6. XMLName xml.Name `xml:"ChannelEventCapList"`
  7. Text string `xml:",chardata"`
  8. Version string `xml:"version,attr"`
  9. Xmlns string `xml:"xmlns,attr"`
  10. ChannelEventCap []ChannelEventCap `xml:"ChannelEventCap"`
  11. }
  12. type ChannelEventCap struct {
  13. Text string `xml:",chardata"`
  14. EventType struct {
  15. Text string `xml:",chardata"`
  16. Opt string `xml:"opt,attr"`
  17. } `xml:"eventType"`
  18. ChannelID string `xml:"channelID"`
  19. ID string `xml:"id"`
  20. }
  21. func (c *Client) GetAllChanEventCap() ([]byte, error) {
  22. return c.CommonGet("/ISAPI/Event/channels/capabilities")
  23. }
  24. func (c *Client) GetOneChanEventCap() ([]byte, error) {
  25. return c.CommonGet("/ISAPI/Event/channels/1/capabilities")
  26. }