package isapi import ( "encoding/xml" ) type ChannelEventCapList struct { XMLName xml.Name `xml:"ChannelEventCapList"` Text string `xml:",chardata"` Version string `xml:"version,attr"` Xmlns string `xml:"xmlns,attr"` ChannelEventCap []ChannelEventCap `xml:"ChannelEventCap"` } type ChannelEventCap struct { Text string `xml:",chardata"` EventType struct { Text string `xml:",chardata"` Opt string `xml:"opt,attr"` } `xml:"eventType"` ChannelID string `xml:"channelID"` ID string `xml:"id"` } func (c *Client) GetAllChanEventCap() ([]byte, error) { return c.CommonGet("/ISAPI/Event/channels/capabilities") } func (c *Client) GetOneChanEventCap() ([]byte, error) { return c.CommonGet("/ISAPI/Event/channels/1/capabilities") }