Skip to content
bobbyziom edited this page Apr 28, 2014 · 3 revisions

The XivelyData Class is used to do HTTP request to xively.com, and contains two functions to do so. The class is structured to handle the HTTP response and return it to where ever in the program the methods are called. Thus the XivelyData class is both datatype and provide methods for putting data into that datatype.


Get the data

There two methods to call in the XivelyData class:

Get current data

GetCurrentData(string xivelyDataApiKey, string feedId)

Make a http call to xively getting the latest data from a specified datastream, and returns a XivelyData object containing the information.

Arguments:

  1. The Xively.com Api-Key.

  2. The Xively.com Feed ID.

Get historic data

GetHistoricData(string xivelyDataApiKey, string feedId)

Make a http call to xively getting the historic data from a specified datastream in the specified duration, and returns a XivelyData object containing the information.

Arguments:

  1. The Xively.com Api-Key.

  2. The Xively.com Feed ID.

  3. Duration of the historic data (e.g. "6hours")

  4. Limit to the maximum datapoints (e.g. "500")

Check xively.com for historic API tables by clicking HERE!

Clone this wiki locally