Stream contributions and actions of any Wikimedia's project that has an IRC channel with Node.js
$ npm install wikimedia-stream
Or download the latest stable version on GitHub.
Basic example:
'use strict';
var WikimediaStream = require('../lib/wikimedia-stream');
var ws = new WikimediaStream({});
try {
ws.on("data", function (data) {
// Do something with the returned data
});
}
catch(err)
{
console.log(err);
}
See examples/ for more examples
var data = {
// Project, usually the subdomain without .org
project: "en.wikipedia",
// Title of the page, with namespace
page: "Wikipedia:Main Page",
// Flags of the edit (M = minor, N = new page, B = Bot, ...)
flags: "M",
// Diff or url with oldid of the action
url: "https://en.wikipedia.org/w/index.php?title=Main_Page&diff=664887982&oldid=664887812",
// Username of the performer of the action
user: "SlimVirgin",
// Size modification
size: "-32",
// Summary or comment about the action
comment: "Reverted edits by [[User:SlimVirgin|SlimVirgin]]...",
}
- License: GNU General Public Licence (3.0)
- Author: Valentin Berclaz
- Inspired by wikipedia-stream