nntp-client
Version, currently 1.0.211 versions
github.com/spoved/nntp-client.cr
A native Crystal NNTP client
5 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
nntp-client:
github: spoved/nntp-client.cr
version: ~> 1.0.2Then run:
shards installshard.yml
- Crystal
>= 0.36.1, < 2.0.0- License
- MIT
- Author
- Holden Omans
Dependencies
Runtime Dependencies
- nntp-lib~> 1.2.0github: spoved/nntp-lib.cr
Development Dependencies
- ameba~> 0.13.0github: veelenga/amebadev
- dotenv*github: gdotdesign/cr-dotenvdev
README
nntp-client
A NNTP (Network News Transfer Protocol) client aimed to provide a more useful interface to the nntp-lib
Installation
- Add the dependency to your
shard.yml:dependencies: nntp-client: github: spoved/nntp-client.cr - Run
shards install
Usage
require "nntp-client"
client = NNTP::Client.connect(
host: ENV["USENET_HOST"],
port: ENV["USENET_PORT"].to_i,
user: ENV["USENET_USER"],
secret: ENV["USENET_PASS"], method: :original
)
# Search for the article num of this post
client.find_article_num(
message_id: "1359110409.83725.1@reader.easyusenet.nl",
group: "alt.binaries.tun",
batch_size: 2000,
offset: 1958260_i64
) # => 1958270
# Fetch article headers
client.with_group "alt.binaries.tun" do
client.headers(1958270) # => {num: 1958270, id: "1359110409.83725.1@reader.easyusenet.nl", headers: {"Path" => "not-for-mail", "From" => "lori256 <lori256@isiinheaven.net>", "Newsgroups" => "alt.binaries.tun", "Subject" => "2kGiFqHLaYfIBPbtk1CPsDsdDJubu4[1/5] - \"PbtdX885Fs5QvhcwY2Wo-thumb.jpg\" yEnc (1/1)", "Message-ID" => "<1359110409.83725.1@reader.easyusenet.nl>", "X-Newsposter" => "newsmangler 0.03 (yenc-fred) - http://www.madcowdisease.org/mcd/newsmangler", "Date" => "25 Jan 2013 10:39:23 GMT", "Lines" => "424", "Organization" => "easyusenet", "X-Received-Bytes" => "55537"}}
end
See spec tests for examples.
Contributing
- Fork it (https://github.com/spoved/nntp-client.cr/fork)
- 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 a new Pull Request
Contributors
- Holden Omans - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
1.0.2- Tagged
- Jun 6, 2021
- Commit
21d9aad21a7f- Crystal
>= 0.36.1, < 2.0.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/spoved/nntp-client.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 11