node-nntp

0.6.1 • Public • Published

NNTP

Client for communicating with servers through the Network News Transfer Protocol (NNTP) protocol.

NPM version Build Status Coverage Status Code Climate Gittip

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

Package Sidebar

Install

npm i node-nntp

Weekly Downloads

19

Version

0.6.1

License

MIT

Last publish

Collaborators

  • robinvdvleuten