peking

A simple node.js library for talking to the ducksboard API.

peking

A simple node.js library for sending data to the ducksboard API.

Sends a number or a string to a ducksboard API endpoint.

Example

var peking = require('peking');
peking.pushValue({value: 1234, api_key: 'mysecret'}, function (err) {
    if (err) {
        return console.error('Error Code' + err);
    }   
    return console.log('success!');
});

Pushes an array of value objects to a ducksboard API endpoint. The value objects may or may not have timestamps associated with them.

Sends a number or string to a ducksboard API endpoint with a timestamp.

Each API function requires an options JSON object and a callback function. The following properties in the options object are supported:

String or number to send to ducksboard. Required.

Unix timestamp to send to ducksboard.

Ducksboard Push API key. Required.

Ducksboard push API host (default push.ducksboard.com)

Ducksboard push API port (default 443)

Each peking function has a callback. If the HTTP response from ducksboard returns anything other than 200, the HTTP status code will be set as the only parameter in the callback function.

Copyright (c) 2012 Flite, Inc.
Licensed under the MIT license.