tumbperl. (or Tumblr::API) is an unofficial Perl client for the Tumblr API.
To install the module just copy the Tumblr/ folder to your common perl libraries directory. For example:
$ perl -V:archlib
archlib='/usr/lib/perl5';
Then, as a superuser o someone similar, copy the dir:
$ cp -r Tumblr/ /usr/lib/perl5
Test if you can successfully load the module:
$ perl -e 'use Tumblr::API;'
You might want to run the installation as a superuser.
$ perl Build.PL
$ ./Build install
Get information from user:
#!/usr/bin/perl
use strict;
use warnings;
use Tumblr::API;
my $tumblr = Tumblr::API->new(
consumer_key => 'your_consumer_key',
consumer_secret => 'your_consumer_secret',
base_hostname => 'your_blog_hostname',
);
my $blog_info= $tumblr->get_info();
if($blog_info->{meta}->{msg} eq "OK"){
printf "This blog has %d posts\n", $blog_info->{response}->{blog}->{posts};
exit 0;
}else{
print STDERR "Error getting blog info.\n";
exit 1;
}
List of dependencies needed by this module:
For bugs or related mail me.