examples/temp-upload.js
function xivelyPost(feedId, streamId, apiKey, currentValue) {
    var dataPoint =
    {
        "version":"1.0.0",
        "datastreams" :
        [
            {
                "id" : streamId,
                "current_value" : currentValue
            },
        ]
    };

    var requestUrl = "https://api.xively.com/v2/feeds/" + feedId;

    var options = {
        url: requestUrl,
        headers: {
            "X-ApiKey" : apiKey,
            "Content-Type": "application/json",
            "Accept": "*/*",
            "User-Agent": "nodejs"
        },
        body: JSON.stringify(dataPoint)
    };

    return requestPut(options);
}
function xivelyPost(feedId, streamId, apiKey, currentValue) {
    var dataPoint =
    {
        "version":"1.0.0",
        "datastreams" :
        [
            {
                "id" : streamId,
                "current_value" : currentValue
            },
        ]
    };

    var requestUrl = "https://api.xively.com/v2/feeds/" + feedId;

    var options = {
        url: requestUrl,
        headers: {
            "X-ApiKey" : apiKey,
            "Content-Type": "application/json",
            "Accept": "*/*",
            "User-Agent": "nodejs"
        },
        body: JSON.stringify(dataPoint)
    };

    return requestPut(options);
}
function xivelyPost ( feedId , streamId , apiKey , currentValue ) { var dataPoint = { "version" : "1.0.0" , "datastreams" : [ { "id" : streamId , "current_value" : currentValue } , ] } ; var requestUrl = "https://api.xively.com/v2/feeds/" + feedId ; var options = { url : requestUrl , headers : { "X-ApiKey" : apiKey , "Content-Type" : "application/json" , "Accept" : "*/*" , "User-Agent" : "nodejs" } , body : JSON . stringify ( dataPoint ) } ; return requestPut ( options ) ; }
Creates a new observable that will make a HTTP or HTTPS POST request to the given url and will give the results as a single event in the stream.
Creates a new observable that will make a HTTP or HTTPS POST request to the given url and will give the results as a single event in the stream .