#!/usr/bin/env node
const bot = require('..'),
	client = new bot({
		protocol: 'https',
		server: 'www.mediawiki.org',
		path: '/w',
		debug: true
	});

client.append('Project:Sandbox', '\n\nnodemw test --~~~~', 'nodemw test edit', function(err, res) {
	if (err) {
		console.error(err);
	}
	else {
		client.log('Sandbox edited');
		client.log(res);
	}
});


#!/usr/bin/env node
const bot = require('..'),
	client = new bot({
		protocol: 'https',
		server: 'www.mediawiki.org',
		path: '/w',
		debug: true
	});

// const text = 'nodemw test';
const text = 'nodemw test http://clicky.pk/foo'; // https://github.com/macbre/nodemw/issues/131

client.append('Project:Sandbox', '\n\n' + text + ' --~~~~', 'nodemw test edit', function(err, res) {
	if (err) {
		client.log('Sandbox edit failed: ' + JSON.stringify(err));
	}
	else {
		client.log('Sandbox edited');
		client.log(res);
	}
});


check the spam whitelist trigger (see #131)