From 84c2444ab0d4e34ebba90138a01fa7fe12861117 Mon Sep 17 00:00:00 2001 From: Marin Karamihalev <marin.karamihalev@iopsys.eu> Date: Wed, 10 Feb 2021 17:35:02 +0000 Subject: [PATCH] Update README.md --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 33d2aac..99f18aa 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,12 @@ const usp = await connect(options); await usp.set("Device.WiFi.Radio.1.", { Name: "radio-1" }); // => void ``` + - set object with allowPartial and required attributes + + ```javascript + await usp.set("Device.WiFi.Radio.1.", { Name: { erquired: true, value: "radio-1" }, allowPartial: true }); // => void + ``` + - set property ```javascript @@ -137,6 +143,24 @@ const usp = await connect(options); }); // => "Device.NAT.PortMapping.4." ``` + - add with with allowPartial and required attributes + + ```javascript + await usp.add("Device.NAT.PortMapping.", { + allowPartial: true, + Description: { + required: true, + value: "webserver1-set", + } + ExternalPort: "80", + Protocol: "TCP", + Interface: "Device.IP.Interface.1", + Enable: "true", + InternalClient: "192.168.1.125", + InternalPort: "5000", + }); // => "Device.NAT.PortMapping.4." + ``` + - Delete ```javascript -- GitLab