WWW::Newzbin 0.07

A Perl interface to Newzbin.com's Usenet index.
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.

last updated on:
December 29th, 2010, 10:20 GMT
price:
FREE!
homepage:
search.cpan.org
license type:
Perl Artistic License 
developed by:
Chris Novakovic
category:
ROOT \ Programming \ Perl Modules
WWW::Newzbin
Download Button

In a hurry? Add it to your Download Basket!

user rating 21

3.5/5
 

0/5

Rate it!

Add your review!

SUBMIT