WWW::Spinn3r::Synced - A interface that provides synced access to permalink and
feed APIs.
use WWW::Spinn3r::Synced;
use DateTime;
my $API = {
vendor => 'acme', # required
limit => 5,
after => DateTime->now()->subtract(hours => 48),
};
my $spnr = new WWW::Spinn3r::Synced (params => $API, debug => 1);
while(1) {
my ($p, $f) = @{ $spnr->next };
if ($p and $f) {
print "both! $$p{link}\n"
} else {
print "permalink only! $$p{link}\n"
}
}
WWW::Spinn3r::Synced synchronizes the
"permalink3.getDelta" and
"feed3.getDelta" APIs provided by Spinn3r
such that next() returns both the permalink and feed items associated
with a link.
The same as new() in WWW::Spinn3r but doesn't accept an
"api" key, since both APIs are used
internally by this module.
Returns an arrayref, the first element is the permalink item and the second
element is the feed item. When a feed item is not available, the permalink is
returned as first item, and the second item is set to undef.
examples/synced.pl, WWW::Spinn3r
Dan Brumleve <opensource@slaant.com>