1.0.3 • Published 6 years ago

stackexchangeswarup v1.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

stackexchange-node

NPM module for StackExchange API + Node.js (actively maintained version!)

Installation

npm i --save stackexchange-node

Usage

var stackexchange = require('stackexchange-node');

var apiOptions = { version: 2.2 };
var api = new stackexchange(apiOptions);

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)
api.questions.questions(filter, function(err, results){
  if (err) throw err;
  
  console.log(results.items);
  console.log(results.has_more);
});