A streaming TCP client for the pachube TCP Server for Nodejs
CoffeeScript JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/pachube-stream override the header for custome api May 23, 2011
node_modules Json Buffer implementing new line seperator May 3, 2011
src/pachube-stream override the header for custome api May 23, 2011
test override the header for custome api May 23, 2011
Cakefile
LICENSE sdf May 2, 2011
README.md update README now pushed May 3, 2011
index.js
package.json

README.md

pachube-stream

A streaming TCP client for the pachube TCP Server

Installation

Use NPM:

npm install pachube-stream

Otherwise just use npm to link yourself

git clone http://github.com/carboncalculated/node-pachube-stream.git
cd node-pachube-stream
npm install pachube-stream -l # local 

Methods And Events

See the TCP Streaming API docs for exactly that

Usage (coffee)

{Connection} = require("pachube-stream")

conn = new Connection("Your API KEY")

conn.on "error", (error) ->
  console.log(error)

subscription = conn.subscribe("/feeds/7049")

subscription.on "complete", (data) ->
  console.log(data)

subscription.on "data", (data) ->
  console.log(data)

TODO

  • Reconnections
  • Other Methods GET ETC
  • Finish off Tests

Note on Patches/Pull Requests (Standard)

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with version or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright (c) 2011 Richard Hooker. See LICENSE for details.