Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/tuyanet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2022-04-07 19:37:41 +0300
committerGitHub <noreply@github.com>2022-04-07 19:37:41 +0300
commit67529eb8d51deb8779b6ae994efbad0c3d51a57d (patch)
treeffb315107cb398ac92a6f044caada48e80fe49ce
parent9d6bae6d583365c87638c233f02dd428e0d02a5e (diff)
Update README.md
-rw-r--r--README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index 3e06402..b924f60 100644
--- a/README.md
+++ b/README.md
@@ -242,6 +242,18 @@ Then obtain local key:
await dev.RefreshLocalKeyAsync()
```
+## Using the Cloud API
+You can use official [Tuya Cloud API](https://developer.tuya.com/en/docs/cloud/).
+
+```C#
+Example of [device specifications](https://developer.tuya.com/en/docs/cloud/device-control?id=K95zu01ksols7#title-27-Get%20the%20specifications%20and%20properties%20of%20the%20device%2C%20including%20the%20instruction%20set%20and%20status%20set) request:
+
+var api = new TuyaApi(region: TuyaApi.Region.CentralEurope, accessId: ACCESS_ID, apiSecret: API_SECRET);
+var devspec = await api.RequestAsync(TuyaApi.Method.GET, $"/v1.1/devices/{DEVICE_ID}/specifications");
+```
+
+`devspec` will contain JSON with all device data points with descriptions and possible values.
+
## Credits
* TinyTuya https://github.com/jasonacox/tinytuya by Jason Cox
For Python version of the library inspired me