Class HARDWARIOApiClient
API Client for the HARDWARIO Cloud API
Inheritance
System.Object
HARDWARIOApiClient
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: VEDriversLite.Devices.APIs.HARDWARIO
Assembly: VEDriversLite.dll
Syntax
public class HARDWARIOApiClient
Properties
| Improve this Doc View SourceCommonConnParams
Common connection properties like Url, security, etc.
Declaration
public CommonConnectionParams CommonConnParams { get; set; }
Property Value
Type | Description |
---|---|
CommonConnectionParams |
Methods
| Improve this Doc View SourceConfirmReadOfMessage(String, String, String, String)
confirm readed message - TODO: some bug, api not respond correctly
Declaration
public async Task<(bool, string)> ConfirmReadOfMessage(string deviceid, string group, string messageid, string apitoken = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | deviceid | |
System.String | group | |
System.String | messageid | |
System.String | apitoken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.ValueTuple<System.Boolean, System.String>> |
GetClient(String)
Create Client for connection with the API token
Declaration
public HttpClient GetClient(string apitoken = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | apitoken |
Returns
Type | Description |
---|---|
System.Net.Http.HttpClient |
GetMessages(String, String, String)
Get message from the API for specific device
Declaration
public async Task<(bool, List<HWDto>)> GetMessages(string deviceid, string group, string apitoken = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | deviceid | Device Id |
System.String | group | Group Id |
System.String | apitoken | API token for communication with HARDWARIO Cloud |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.ValueTuple<System.Boolean, System.Collections.Generic.List<HWDto>>> |
GetUnreadedMessage(String, String, String)
Get undread message
Declaration
public async Task<(bool, HWDto)> GetUnreadedMessage(string deviceid, string group, string apitoken = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | deviceid | |
System.String | group | |
System.String | apitoken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.ValueTuple<System.Boolean, HWDto>> |
SetCommonConnectionParameters(CommonConnectionParams)
Load the connection parameters
Declaration
public void SetCommonConnectionParameters(CommonConnectionParams ccop)
Parameters
Type | Name | Description |
---|---|---|
CommonConnectionParams | ccop |