Xively JavaScript library integration working with datastreams