Joe Higton > Net-PingFM-0.4_001 > Net::PingFM

Download:
Net-PingFM-0.4_001.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.4_001   Source   Latest Release: Net-PingFM-0.4

NAME ^

Net::PingFM - Interact with ping.fm from perl

SYNOPSIS ^

 # Make pingfm object with our user and api keys:
 my $pfm = Net::PingFM->new( user_key => 'blah',
                            api_key => 'foo' );
 
 # check they like our keys (you don't need to do this!)
 $pfm->user_validate or die 'Couldn\'t log in to ping.fm!';

 # make a post using our default method:
 $pfm->post( 'Hello ping.fm!' );
 
 # make a microblog post:
 $pfm->post( 'Testing Net::PingFM' , { method => 'microblog' } );
 
 # make a real blog post, with title and everything!
 $pfm->post( 'Testing Net::PingFM. Hours of fun..',
             { method => 'blog', title => 'Testing Testing!'} );
 
 # get the list of services for the account:
 my @services = $pfm->services;

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:

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

 $pfm->post( $body , \%optional_params );
 $pfm->post( 'Hacking on Net::PingFM', { post_method => 'status' });
 $pfm->post( 'Posting using my default method' );
 $pfm->post( 'Hacking on Net::PingFM, don\'t tell facebook', { service => 'twitter' });

Make a 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:

services

 my @services = $pfm->services;

Get a list of services for this account.

Returns a list of Net::PingFM::Service objects

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 things 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.

MOOSE! ^

This is implemented using moose, so can be messed with in a moosey way if you feel like it!

API INFO ^

http://groups.google.com/group/pingfm-developers/web/api-documentation

DEVELOPMENT ^

Follow development of this library (and or fork it!) on github:

http://github.com/draxil/net-pingfm/

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.