node-nntp
v0.6.1
Published
A client for connecting with a NNTP server.
Downloads
24
Maintainers
Readme
NNTP
Client for communicating with servers through the Network News Transfer Protocol (NNTP) protocol.
Installation
$ npm install node-nntp
Usage
Here is an example that fetches 100 articles from the php.doc of the news.php.net server:
var NNTP = require('node-nntp');
var nntp = new NNTP({host: 'news.php.net', port: 119, secure: false});
nntp.connect(function (error, response) {
nntp.group('php.doc.nl', function (error, group) {
nntp.overviewFormat(function (error, format) {
// If your server supports XZVER use nntp.xzver for a performance boost.
nntp.xover(group.first + '-' + (parseInt(group.first, 10) + 100), format, function (error, messages) {
// An array containing all messages.
console.log(messages);
});
});
});
});
License
MIT, see LICENSE