Add correct spelling for RequestSCPD, mentioned in issue #23.
This commit is contained in:
parent
dceda08e70
commit
71cfb6bbcb
@ -23,7 +23,7 @@ func main() {
|
|||||||
dev := &c.ServiceClient.RootDevice.Device
|
dev := &c.ServiceClient.RootDevice.Device
|
||||||
srv := c.ServiceClient.Service
|
srv := c.ServiceClient.Service
|
||||||
fmt.Println(dev.FriendlyName, " :: ", srv.String())
|
fmt.Println(dev.FriendlyName, " :: ", srv.String())
|
||||||
scpd, err := srv.RequestSCDP()
|
scpd, err := srv.RequestSCPD()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf(" Error requesting service SCPD: %v\n", err)
|
fmt.Printf(" Error requesting service SCPD: %v\n", err)
|
||||||
} else {
|
} else {
|
||||||
|
10
device.go
10
device.go
@ -147,9 +147,9 @@ func (srv *Service) String() string {
|
|||||||
return fmt.Sprintf("Service ID %s : %s", srv.ServiceId, srv.ServiceType)
|
return fmt.Sprintf("Service ID %s : %s", srv.ServiceId, srv.ServiceType)
|
||||||
}
|
}
|
||||||
|
|
||||||
// RequestSCDP requests the SCPD (soap actions and state variables description)
|
// RequestSCPD requests the SCPD (soap actions and state variables description)
|
||||||
// for the service.
|
// for the service.
|
||||||
func (srv *Service) RequestSCDP() (*scpd.SCPD, error) {
|
func (srv *Service) RequestSCPD() (*scpd.SCPD, error) {
|
||||||
if !srv.SCPDURL.Ok {
|
if !srv.SCPDURL.Ok {
|
||||||
return nil, errors.New("bad/missing SCPD URL, or no URLBase has been set")
|
return nil, errors.New("bad/missing SCPD URL, or no URLBase has been set")
|
||||||
}
|
}
|
||||||
@ -160,6 +160,12 @@ func (srv *Service) RequestSCDP() (*scpd.SCPD, error) {
|
|||||||
return s, nil
|
return s, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RequestSCDP is for compatibility only, prefer RequestSCPD. This was a
|
||||||
|
// misspelling of RequestSCDP.
|
||||||
|
func (srv *Service) RequestSCDP() (*scpd.SCPD, error) {
|
||||||
|
return srv.RequestSCPD()
|
||||||
|
}
|
||||||
|
|
||||||
func (srv *Service) NewSOAPClient() *soap.SOAPClient {
|
func (srv *Service) NewSOAPClient() *soap.SOAPClient {
|
||||||
return soap.NewSOAPClient(srv.ControlURL.URL)
|
return soap.NewSOAPClient(srv.ControlURL.URL)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user