Skip to content
Brbb edited this page Sep 20, 2014 · 2 revisions

Spark Sharp

This should be a good starting point for all .NET developers involved in Spark Core projects. Spark Sharp provides REST wrappers for direct Spark API calls and event parsers to make your app running clean and smooth.

The Spark Sharp library is built using Mono and needs RestSharp and Json.NET to run, so add to your projects libraries starting from your beloved development environment.

To give it a try download the Temperature Spark Firmware and flash your core, then clone this repo and run a test class using your own device id and access token like this:

using System;
using Spark;

namespace Tester
{
   class MainClass
   {
       public static void Main (string[] args)
       {
		Configuration.DeviceID = "<your_device_id>";
		Configuration.AccessToken = "<your_access_token>";

		Spark.SparkResponse response =  Spark.RESTCore.SparkGetAsync ("temperature").Result;
		Console.WriteLine(response.Result);
	}
   }
}
Clone this wiki locally