Skip to content

ValentinBrclz/wikimedia-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wikimedia-stream

Stream contributions and actions of any Wikimedia's project that has an IRC channel with Node.js

NPM version Build Status Dependency Status devDependency Status License

NPM

Installation

  $ npm install wikimedia-stream

Or download the latest stable version on GitHub.

Usage

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

The returned object

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]]...",
}

Licensing

About

Stream of any Wikimedia's project with Node.js (and IRC)

Resources

License

Stars

Watchers

Forks

Packages

No packages published