RestackIO.Net API Wrapper



A .Net wrapper for the RESTACK API - https://restack.io

Add RestackIO.Net to your project using NuGet:

PM> Install-Package restackio.net


Create Device (POST)

Restack restack = new Restack(acctKey);
string name = "Test device";
string description = "Description of test device";
string response = restack.CreateDevice(name, description, false);


View Device (GET)

Restack restack = new Restack(acctKey);
string deviceId = "c031d8bd7bdc48d8992cf58ff39fc43f";
Device device = restack.GetDevice(deviceId);


My Devices (GET)

Restack restack = new Restack(acctKey);
List devices = restack.GetDevices();


Public Devices (GET)

Restack restack = new Restack(acctKey);
List devices = restack.GetPublicDevices();


Get Device (GET)

Restack restack = new Restack(acctKey);
string deviceId = "c031d8bd7bdc48d8992cf58ff39fc43f";
Device device = restack.GetDevice(deviceId);


Save Data (POST)

Restack restack = new Restack(acctKey);
string deviceId = "c031d8bd7bdc48d8992cf58ff39fc43f";
string stackName = "Temperature";
restack.SaveData(deviceId, stackName, new Value() { value = new decimal(19.3) });