Wiki

Clone wiki

Plantyst SDK for net / Home

Plantyst SDK

Install

The Plantyst SDK NuGet package is the easiest way to get the Plantyst API and to configure your application with all dependencies.

PM> Install-Package Plantyst.Sdk

Example of use

// Setup
var userAccessToken = new UserAccessToken
{
    Application = "",
    Key = "",
    Secret = ""
};
var variableIdSet = new int[] {...};
var from = new DateTime(...);
var to = new DateTime(...);

// Call api
var variableDataClient = new VariableDataClient(userAccessToken);
var task = variableDataClient.Get(variableIdSet, from, to, "minute");
task.Wait();

// Process result
var stream = task.Result;
var result = new StreamReader(stream).ReadToEnd();

Updated