Skip to content

Instantly share code, notes, and snippets.

@btrott btrott/gist:362805
Created Apr 11, 2010

Embed
What would you like to do?
Sample code for using WWW::TypePad::CmdLine
#!/usr/bin/perl -w
use strict;
use IO::Prompt;
use WWW::TypePad::CmdLine;
my $tp = WWW::TypePad::CmdLine->initialize( requires_auth => 1 );
# Fetch the list of the authenticated user's blogs, then put up a prompt
# asking the user to choose a blog.
my $blogs = $tp->users->blogs( '@self' );
my $tp_blog_id = prompt( 'Choose a TypePad blog: ', -menu => {
map { $_->{title} => $_->{urlId} } @{ $blogs->{entries} }
} );
die "You need to choose a TypePad blog" unless $tp_blog_id;
my $stats = $tp->blogs->stats( $tp_blog_id );
use Data::Dumper;
warn Dumper $stats;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.