許家瑋 > Posterous > Posterous

Download:
Posterous-0.03.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.03   Source  

NAME ^

Posterous - API to posterous.com

SYNOPSIS ^

  use Posterous;

  $posterous = Posterous->new($user, $pass, $site_id);

  $posterous->account_info;     # list all sites owned by $user

  $posterous->add_post( title => "hello posterous", body => "Post through Posterous.pm" );

DESCRIPTION ^

Posterous.pm just implement interface to posterous.com in Perl

Class Method ^

new($user_mail, $pass, $site_id)

constructor, $user_mail and $pass are required.

$site_id is optional for specifying which one of your site would be involved in process.

Instance Method ^

auth_key()

always return Base64 encoded "$user_mail:$pass" for Basic HTTP Authentication

account_info()

GET /api/getsites, return a list of all sites owned by specified user

read_posts(%options)

GET /api/readposts, return a list of list.

Available %options key include site_id, hostname, num_posts, page, tag.

read_public_posts(%options)

GET /api/readposts, without Basci HTTP Authentication.

Since, site_id or hostname should be specified in %options.

Available %options key is the same as read_posts()

return a list of public posts.

add_post(%options)

POST /api/newpost, return post callback.

Available %options key include site_id, media, title, body, autopost, private, data, tags, source, sourceLink.

add_comment(%options)

POST /api/newcomment, return comment callback.

Available %options key include post_id, comment.

primary_site()

return user's primay site id

SEE ALSO ^

Official API detail

  http://posterous.com/api

Posterous API Ruby version

  https://rubyforge.org/projects/posterous/

  http://github.com/jordandobson/Posterous/tree/master

AUTHOR ^

shelling, <shelling@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2009 by shelling

Release under MIT (X11) Lincence

syntax highlighting: