Node.js implementation of the stackexchange/stackoverflow API
JavaScript
Permalink
Failed to load latest commit information.
lib add tags api Jun 3, 2015
test add tags api Jun 3, 2015
.gitignore Supports query User resource Jul 18, 2014
README.md Update README.md Jul 21, 2014
package.json [dist] update dependencies, fixes #7 May 30, 2016

README.md

Stackexchange API for Node.js

Implementation of all stackexchange methods to query questions and awesome answers.

Installation

npm install stackexchange --save

Usage

var stackexchange = require('stackexchange');

var options = { version: 2.2 };
var context = new stackexchange(options);

var filter = {
  key: 'YOUR_API_KEY',
  pagesize: 50,
  tagged: 'node.js',
  sort: 'activity',
  order: 'asc'
};

// Get all the questions (http://api.stackexchange.com/docs/questions)
context.questions.questions(filter, function(err, results){
  if (err) throw err;
  
  console.log(results.items);
  console.log(results.has_more);
});