WWW::Newzbin

0.07 Perl Artistic License    
3.5/5 21

description

specifications

WWW::Newzbin is a Perl interface to Newzbin.com's Usenet index.

SYNOPSIS

use WWW::Newzbin;
use WWW::Newzbin::Constants qw(:all);

my $nzb = WWW::Newzbin->new(
username => "joebloggs",
password => "secretpass123"
);

$nzb->lwp_useragent->timeout(10); # ADVANCED: allow less time for responses from newzbin


my @results = $nzb->search_files(
query => "the john smith orchestra",
category => [ NEWZBIN_CAT_MUSIC, NEWZBIN_CAT_MOVIES ], # search in Newzbin's "music" and "movies" categories...
group => [ "alt.binaries.music", "alt.binaries.test" ], # ...and return results from these groups only
retention => 30, # no more than 30 days old
resultlimit => 50, # return maximum of 50 results
sortfield => NEWZBIN_SORTFIELD_SUBJECT, # sort by subject...
sortorder => NEWZBIN_SORTORDER_ASC # ...in ascending order
);


if ($nzb->error_code) {
print "Error # " . $nzb->error_code . ": " . $nzb->error_message;
} else {
print "Total number of results found: " . $nzb->search_files_total;
print "Subject of result #1: " . $results[0]->{subject};
}

# make an nzb file for binaries in newzbin report #12345678
my ($nzb_file, $report_name, $report_category) = $nzb->get_nzb(reportid => 12345678);

# make an nzb file for binaries in newzbin report #12345678, and leave the nzb file gzip-compressed
my ($nzb_file_gzipped, $report_name, $report_category) = $nzb->get_nzb(
reportid => 12345678,
leavegzip => 1
);


# make an nzb file for binaries with the newzbin file ids #123, #456 and #789, and don't compress it when downloading it
my $nzb_file = $nzb->get_nzb(
fileid => [ 123, 456, 789 ],
nogzip => 1
);

This module is a Perl interface to the Newzbin.com v3 direct APIs. Newzbin is a Usenet binary indexing service that also offers .nzb files - short summary files containing all the information a newsreader requires to download any given binary or set of binaries from Usenet.
read more   
Last updated on December 29th, 2010

0 User reviews so far.

SUBMIT
A Perl interface to Newzbin.com's Usenet index.

  7,717 downloads

#Newzbin Usenet #Perl interface #Perl module #Newzbin #Usenet #Perl #interface