GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  WWW::TUMBLR (3)

.ds Aq ’

NAME

WWW::Tumblr - Perl bindings for the Tumblr API

CONTENTS

VERSION

5.00

SYNOPSIS



  my $t = WWW::Tumblr->new(
     consumer_key    => $consumer_key,
     secret_key      => $secret_key,
     token           => $token,
     token_secret    => $token_secret,
  );

  my $blog = $t->blog(perlapi.tumblr.com);

  print Dumper $blog->info;



DESCRIPTION

This module makes use of some sort of the same models as the upstream API, meaning that you will have User, Blog and Tagged methods:



  my $t = WWW::Tumblr->new(
    consumer_key    => $consumer_key,
    secret_key      => $secret_key,
    token           => $token,
    token_secret    => $token_secret,
  );

  # Once you have a WWW::Tumblr object, you can get a WWW::Tumblr::Blog object
  # by calling the blog() method from the former object:
 
  my $blog = $t->blog(perlapi.tumblr.com);

  # And then just use WWW::Tumblr::Blog methods from it:
  if ( my $post = $blog->post( type => text, body => Hell yeah, son! ) ) {
     say "I have published post id: " . $post->{id};   
  } else {
     print STDERR Dumper $blog->error;
     die "I couldnt post it :(";
  }



You can also work directly with a WWW::Tumblr::Blog class for example:



  # You will need to set base_hostname:
  my $blog = WWW::Tumblr::Blog->new(
     %four_tokens,
     base_hostname => myblogontumblr.com
  );



All operation methods on the entire API will return false in case of an upstream error and you can check the status with error():



  die Dumper $blog->error unless $blog->info();



On success, methods will return a hash reference with the JSON representation of the upstream response. This behavior has not changed from previous versions of this module.

METHOD PARAMETERS

All methods require the same parameters as the upstream API, passed as hash where the keys are the request parameters and the values the corresponding data.

DOCUMENTATION

Please refer to each module for further tips, tricks and slightly more detailed documentation:
o WWW::Tumblr::Blog
o WWW::Tumblr::User
o WWW::Tumblr::Tagged
o WWW::Tumblr::ResponseError
Take also a look at the t/ directory inside the distribution. There you can see how you can do a bunch of things: get posts, submissions, post quotes, text, etc, etc.

AUTHORIZATION

It is possible to generate authorization URLs and do the whole OAuth dance. Please refer to the examples/ directory within the distribution to learn more.

CAVEATS

This is considered an experimental version of the module. The request engine needs a complete rewrite, as well as proper documentation. The main author of the module wanted to release it like this to have people interested on Tumblr and Perl give it a spin.

BUGS

Please report as many as you want/can. File them up at GitHub: <https://github.com/damog/www-tumblr/issues/new>. Please don’t use the CPAN RT.

MODULE AND TUMBLR API VERSION NOTE

This module supports Tumblr API v2, starting from module version 5. Since the previous API was deprecated upstream anyway, there’s no backwards compatibility with < 5 versions.

AUTHOR(S)

David Moreno <http://damog.net/> is the main author and maintainer of this module. The following amazing people have also contributed from version 5 onwards: Artem Krivopolenov, Squeeks, Fernando Vezzosi.

SEE ALSO

o Net::OAuth because, you know, we’re based off it.
o Moose, likewise.

COPYRIGHT and LICENSE

This software is copyright (c) 2013 by David Moreno.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

DISCLAIMER

The author is in no way affiliated to Tumblr or Yahoo! Inc. If either of them want to show their appreciation for this work, they can contact the author directly or donate a few of those billion dollars Yahoo! paid for Tumblr, to the Perl Foundation at <http://donate.perlfoundation.org/>.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 WWW::TUMBLR (3) 2013-08-25

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.