NAME
Net::PingFM - Interact with ping.fm from perl
SYNOPSIS
my $pfm = Net::PingFM->new( user_key => 'blah', api_key => 'foo' );
DESCRIPTION
Simple little module for posting to http://ping.fm/
STATUS
Currently the library can do basic posting to different services, and that's about it!
CONSTRUCTOR
Your user and application keys are required). Module will die without them.
my $pfm = Net::PingFM->new( api_key => 'blah', user_key => 'blah' );
Additional constructor parameters:
debug_mode => 1, # will stop posts from actually appearing dump_responses => 1 # will cause us to print our XML responses for debug
METHODS
user_validate
if ( $pfm->user_validate ){ # we have a valid user key } else{ # we don't! }
Validate the user's application key. Returns true value if the user key is OK and false otherwise.
post( $body , \%optional_params )
Post! We at least need a $body which is the body of the post we'll send to ping.fm.
Optional parameter hashref can contain:
post_method => What you would like to post to.
Valid post_method's are blog, microblog, status and default. Default will use your default post method on ping.fm. Default is our default!
title => The title for the post. Ping.fm requires this for post_method 'blog' but we don't enforce that in the module!
service => Just post to one service
last_error
Last error message we were sent from ping.fm
ERROR HANDLING
If something goes wrong at the network or XML parsing level the methods will die. If thing go wrong at the API level, as in ping.fm gives us an actual error then the method will generally return false and set last_error with an error message from ping.fm.
API INFO
http://groups.google.com/group/pingfm-developers/web/api-documentation
AUTHOR
Joe Higton
COPYRIGHT
Copyright 2008 Joe Higton
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.