reolinkapigo icon indicating copy to clipboard operation
reolinkapigo copied to clipboard

NetworkMixin response example data missing

Open Benehiko opened this issue 5 years ago • 3 comments

Response example data for GetWifi and ScanWifi is missing.

Currently

wifiInfo, err := camera.API.GetWifi()(camera.RestHandler)

scanWifiInfo, err := camera.API.ScanWifi()(camera.RestHandler)

will return nothing due to the struct being empty.

Benehiko avatar Dec 15 '20 10:12 Benehiko

Found another potential value that could be an enum selection. On the network ddns settings one can specify the type, such as no-ip. There are no example range values for this under the project's example responses.

networkDDNS := &models.NetworkDDNS{
			Domain:   "",
			Enable:   false,
			Password: "",
			Type:     "no-ip",
			Username: "",
		}

Benehiko avatar Dec 15 '20 11:12 Benehiko

NetworkEmail has a couple of potential enums. Setting attachment, interval or table shouldn't be so ambiguous.

networkEmail := &models.NetworkEmail{
			Username:   "",
			Password:   "",
			Addr1:      "",
			Addr2:      "",
			Addr3:      "",
			Attachment: "picture",
			Interval:   "5 Minute",
			Nickname:   "",
			Schedule: models.Schedule{
				Enable: true,
				Table:  "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
			},
			SmtpPort:   465,
			SmtpServer: "smtp.gmail.com",
			SSL:        true,
		} 

Benehiko avatar Dec 15 '20 11:12 Benehiko

NetworkFTP also has a couple of potential enums. Setting interval, maxSize, mode, streamType and table.

networkFtp := &models.NetworkFTP{
			Username:  "",
			Password:  "",
			Anonymous: false,
			Interval:  30,
			MaxSize:   100,
			Mode:      0,
			Port:      21,
			RemoteDir: "",
			Schedule: models.Schedule{
				Enable: true,
				Table:  "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",
			},
			Server:     "",
			StreamType: 0,
		}

Benehiko avatar Dec 15 '20 11:12 Benehiko