Orion98MC / node_rrd

A node.js native binding for RRDtool (node rrd)
97 stars 25 forks source link

There is a mistake in documets #18

Closed WLBF closed 7 years ago

WLBF commented 7 years ago

according /lib/rrd.js

var fetch = function () {
  var args = null;

  if (args = conformed([String, Strict(Object), Function], arguments)) {

    var options = {
      cf: "LAST",           
      start: nows(-3600),   /* seconds since epoch */
      end: nows(),          /* seconds since epoch */
      resolution: 60        /* seconds */
    };
    .......
  }

  throw new Error("rrd: arguments' format not implemented!");
};

fetch function arguments should be fetch("foo.rrd", {...}, function () {}) but the README.md says

rrd.fetch(filename, "LAST", now - 1000, now, null, function (time, data) { 
    console.log(time, data); 
});
Orion98MC commented 7 years ago

Absolutely!

Orion98MC commented 7 years ago

You nailed it ;)