Coder Social home page Coder Social logo

tumbperl's Introduction

tumbperl.

tumbperl. (or Tumblr::API) is an unofficial Perl client for the Tumblr API.

Installation

Manual

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;'

Using Module::Build

You might want to run the installation as a superuser.

$ perl Build.PL
$ ./Build install

Examples

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;
}

Dependencies

List of dependencies needed by this module:

Bugs

For bugs or related mail me.

Author

Cedric Zirtacic (cicatriz)

tumbperl's People

Contributors

cedriczirtacic avatar retrorocket avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

retrorocket

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.