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
|
||||
srv := c.ServiceClient.Service
|
||||
fmt.Println(dev.FriendlyName, " :: ", srv.String())
|
||||
scpd, err := srv.RequestSCDP()
|
||||
scpd, err := srv.RequestSCPD()
|
||||
if err != nil {
|
||||
fmt.Printf(" Error requesting service SCPD: %v\n", err)
|
||||
} 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)
|
||||
}
|
||||
|
||||
// RequestSCDP requests the SCPD (soap actions and state variables description)
|
||||
// RequestSCPD requests the SCPD (soap actions and state variables description)
|
||||
// for the service.
|
||||
func (srv *Service) RequestSCDP() (*scpd.SCPD, error) {
|
||||
func (srv *Service) RequestSCPD() (*scpd.SCPD, error) {
|
||||
if !srv.SCPDURL.Ok {
|
||||
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
|
||||
}
|
||||
|
||||
// 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 {
|
||||
return soap.NewSOAPClient(srv.ControlURL.URL)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user