1.0.0-rc2 • Published 9 years ago

notifier-client v1.0.0-rc2

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

notifier-client

Simple client for https://github.com/DemocracyOS/notifier, forked from likeastore

Usage

Install from npm,

$ npm install notifier-client

Initialize the client,

var notifier = require('notifier-client')({
	host: 'http://notifier.example.com/api/events',
	token: 'your-custom-token'
});

Use the notify method,

notifier.notify({
	event: 'user-resistered',
	user: 'a@a.com',
	data: {registered: new Date() }
}, function () {
	// notified!
});

Or use to and withData methods,

notifier.notify('user-registered')
	.to('a@a.com')
	.withData({registered: new Date() })
	.send(function () {
		// notified!
	});

In both cases callback parameter is optional,

notifier.notify({
	event: 'user-resistered',
	user: 'a@a.com',
	data: {registered: new Date() });

// or

notifier.notify('user-registered')
	.to('a@a.com')
	.withData({registered: new Date() })
	.send();

TODOS

  • Tests

License

MIT

1.0.0-rc2

9 years ago

1.0.0-rc1

9 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.0

9 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago