NNTP::Connection::Articles
Instance methods
body(num : Int32 | Int64) : Array(String)
Will return an Array(String) that is the article's body text.
body(message_id : String) : Array(String)
Will return an Array(String) that is the article's body text.
headers(num : Int32 | Int64)
Will return a Header tuple with the fetched article information.
client.with_group "alt.binaries.cbt" do
client.headers 56910000 # => {num: 56910000, id: "YwGnYrShOtJaBfSzZlTkKbBh-1587103108703@nyuu", headers: {"Organization" => "Usenet.Farm", "Message-Id" => "<YwGnYrShOtJaBfSzZlTkKbBh-1587103108703@nyuu>", "User-Agent" => "Nyuu/0.3.8", "X-Ufhash" => "lHibuaCxtuuI3C4ugIWhcSBuWhY%2B2Wu5sbzIanIMroeK4nRzeUWbUwFaNNhD7Tot6%2FKfcwbvXWhI9Am82VQ%2BKph5IYQ8NMOUARHaXY8LlmDbOnmGi8qNLxh0IocmkVeY04Cfy2trF4cEtuV3wP1kSR7IfuJV3UPO9ORwOFvlZtOe6CwX16D%2BKM1%2B%2FBcetDZIGZapQoDQIhngZNENi5cRFlWbmy3CEqwpMsm8", "Date" => "Fri, 17 Apr 20 05:58:28 UTC", "Path" => "not-for-mail", "Subject" => "[170/170] - \"2CDrmrC36H47j0n1f.part161.rar\" yEnc (186/214) 153066646", "From" => "3vq60fEnli <AEdwj0ie5p@kgiqA10.com>", "Newsgroups" => "alt.binaries.bungalow,alt.binaries.downunder,alt.binaries.flowed,alt.binaries.cbt,alt.binaries.test, alt.binaries.boneless,alt.binaries.iso", "X-Received-Bytes" => "740517", "X-Received-Body-CRC" => "3585757165"}}
end
headers(message_id : String)
See headers(num : Int32 | Int64).
Note: Using the message_id instead of article num
will return a article num of 0.
client.with_group "alt.binaries.cbt" do
client.headers "YwGnYrShOtJaBfSzZlTkKbBh-1587103108703@nyuu" # => {num: 0, id: "YwGnYrShOtJaBfSzZlTkKbBh-1587103108703@nyuu", headers: {"Organization" => "Usenet.Farm", "Message-Id" => "<YwGnYrShOtJaBfSzZlTkKbBh-1587103108703@nyuu>", "User-Agent" => "Nyuu/0.3.8", "X-Ufhash" => "lHibuaCxtuuI3C4ugIWhcSBuWhY%2B2Wu5sbzIanIMroeK4nRzeUWbUwFaNNhD7Tot6%2FKfcwbvXWhI9Am82VQ%2BKph5IYQ8NMOUARHaXY8LlmDbOnmGi8qNLxh0IocmkVeY04Cfy2trF4cEtuV3wP1kSR7IfuJV3UPO9ORwOFvlZtOe6CwX16D%2BKM1%2B%2FBcetDZIGZapQoDQIhngZNENi5cRFlWbmy3CEqwpMsm8", "Date" => "Fri, 17 Apr 20 05:58:28 UTC", "Path" => "not-for-mail", "Subject" => "[170/170] - \"2CDrmrC36H47j0n1f.part161.rar\" yEnc (186/214) 153066646", "From" => "3vq60fEnli <AEdwj0ie5p@kgiqA10.com>", "Newsgroups" => "alt.binaries.bungalow,alt.binaries.downunder,alt.binaries.flowed,alt.binaries.cbt,alt.binaries.test, alt.binaries.boneless,alt.binaries.iso", "X-Received-Bytes" => "740517", "X-Received-Body-CRC" => "3585757165"}}
end
last
Sourcenext
Sourcewith_article(num : Int32 | Int64, &)
Will set the current article to provided num and yield self to provided block
client.with_group("alt.binaries.cbt") do
client.with_article(56910000) do
# Perform actions within the context of group alt.binaries.cbt and with article #56910000
end
end
xheader(header, message_id : String | Nil = nil)
Sourcexheader(header, num : Int64 | Int32, end_num : Int64 | Int32 | Nil = nil, all : Bool = false)
Sourcexover(num : Int64 | Int32, end_num : Int64 | Int32 | Nil = nil, all : Bool = false)
Source