Tuya.Net
|
Provides access to Tuya Cloud API. More...
Public Types | |
enum class | Region |
Region of server. More... | |
enum class | Method |
Request method. More... | |
Public Member Functions | |
TuyaApi (Region region, string accessId, string apiSecret) | |
Creates a new instance of the TuyaApi class. More... | |
async Task< string > | RequestAsync (Method method, string uri, string body=null, Dictionary< string, string > headers=null, bool noToken=false, bool forceTokenRefresh=false, CancellationToken cancellationToken=default) |
Request to official API. More... | |
async Task< TuyaDeviceApiInfo > | GetDeviceInfoAsync (string deviceId, bool forceTokenRefresh=false, CancellationToken cancellationToken=default) |
Requests info about device by it's ID. More... | |
async Task< TuyaDeviceApiInfo[]> | GetAllDevicesInfoAsync (string anyDeviceId, bool forceTokenRefresh=false, CancellationToken cancellationToken=default) |
Requests info about all registered devices, requires ID of any registered device. More... | |
Provides access to Tuya Cloud API.
|
strong |
Region of server.
|
strong |
Request method.
|
inline |
Creates a new instance of the TuyaApi class.
region | Region of server. |
accessId | Access ID/Client ID from https://iot.tuya.com/ . |
apiSecret | API secret from https://iot.tuya.com/ . |
|
inline |
Request to official API.
uri | Method URI. |
body | Body of request if any. |
headers | Additional headers. |
noToken | Execute query without token. |
forceTokenRefresh | Refresh access token even it's not expired. |
cancellationToken | Cancellation token. |
|
inline |
Requests info about device by it's ID.
deviceId | Device ID. |
forceTokenRefresh | Refresh access token even it's not expired. |
cancellationToken | Cancellation token. |
|
inline |
Requests info about all registered devices, requires ID of any registered device.
anyDeviceId | ID of any registered device. |
forceTokenRefresh | Refresh access token even it's not expired. |
cancellationToken | Cancellation token. |