This gem is a lightweight solution for connecting to a NNTP-Server and retrieving news
Add this line to your application's Gemfile:
gem 'nntp-client'
And then execute:
$ bundle
Or install it yourself as:
$ gem install nntp-client
NNTP::Client::Session provides a simple API for retrieving newsgroups and posts from a NNTP-Server
NNTP::Client::Session.start("some.nntp.host") do |nntp|
# Fetch all newsgroups
nntp.newsgroups
# Fetch specific newsgroup
group = nntp.group "some.news.group"
group.posts.each do |post|
# get the contents of a post
post.raw
end
end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request