xonecas.io

disqus-node

Disqus API node.js client

pre-AI small node

2 commits · 2011-08-18 to 2011-08-18 · 6 files

seanupdated the package.json filed656bdd2011-08-18
▸ lib/ 2011-08-18
▸ tests/ 2011-08-18
· index.js 2011-08-18
· package.json 2011-08-18
· README.markdown 2011-08-18

README.markdown

Disqus node.js api client

Usage:

  var DISQUS  = require('disqus-node'),
     api;

  api = DISQUS(key, format, version, isSecure);

  api.call(endpoint, method, options, callback);

Example

  var disqus = require('../lib/disqus-node.js'),
     dq;

  dq = disqus(
     "PjBusPP4mtOe9VQDuDLe5DetbdLLLqjrhqosGnHrKS8JlBDpFrZg6yDnedBeL65E",
     'json',
     '3.0',
     false
  );

  dq.call('threads', 'list', {"forum": "xonecas"}, function (response) {
     console.log(response.toString());

     response.iter(function (value, key) {
        console.log("\n"+ key +": "+ value.toString()); 
     });

     console.log(response.len());

     console.log(response.getSlice(0, 1));

     console.log(response.getItem(0));

     console.log(response.contains(0));
     
  });