0.0
No commit activity in last 3 years
No release in over 3 years
Gem to handle basic NNTP usage
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
 Project Readme

NNTPClient

TODO: Write a gem description

Installation

Add this line to your application's Gemfile:

gem 'NNTPClient'

And then execute:

$ bundle

Or install it yourself as:

$ gem install NNTPClient

Usage

Connection

Two different methods can be used to connect to a usenet server:

  1. First, by supplying a URL and a port number as hash values:

    nntp = NNTPClient.new(:url => 'nntp.example.org', :port => 119)

    An optional :socket_factory value can be included if you'd with for something other than TCPSocket to be used.
    Please note that the signature of ::new must match TCPSocket::new's signature.

  2. By supplying an existing socket:

my_socket = TCPSocket.new('nntp.example.org', 119)
nntp = NNTPClient.new(:socket => my_socket)

Listing Newsgroups

Upon connecting to a server, a list of valid newsgroups may be retrieved as such:

groups = nntp.groups

The first time #groups is called, it retrieves the list of groups from the server. Subsequent calls return an instance variable.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request