stackexchange

2.0.0 • Public • Published

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);
});

// Get results for a different website within the stackexchange network
filter.site = 'softwareengineering';
context.questions.questions(filter, function(err, results){
  if (err) throw err;
  
  console.log(results.items);
  console.log(results.has_more);
});

// Get all users
context.users.users(filter, function(err, results){
  if (err) throw err;

  console.log(results.items);
  console.log(results.has_more);
});

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.011latest
1.0.0-10next

Version History

VersionDownloads (Last 7 Days)Published
2.0.011
1.3.11,197
1.3.053
1.2.50
1.2.40
1.2.30
1.2.25
1.2.10
1.2.00
1.1.00
1.0.00
1.0.0-10
1.0.0-00
0.4.00
0.3.00
0.2.00
0.1.00
0.0.70
0.0.60
0.0.50
0.0.40
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i stackexchange

Weekly Downloads

1,266

Version

2.0.0

License

MIT

Unpacked Size

18.4 kB

Total Files

12

Last publish

Collaborators

  • swaagie
  • trott