Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A streaming TCP client for the pachube TCP Server for Nodejs

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 node_modules
Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 Cakefile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 index.js
Octocat-spinner-32 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.

Something went wrong with that request. Please try again.