NAME WWW::FMyLife - Obtain FMyLife.com anectodes via API VERSION Version 0.05 SYNOPSIS THIS MODULE IS STILL UNDER INITIAL DEVELOPMENT! BE WARNED! This module fetches FMyLife.com (FML) anecdotes, comments, votes and more via API, comfortably and in an extensible manner. use WWW::FMyLife; my $fml = WWW::FMyLife->new(); print map { "Items: $_\n" } $fml->last( { as => text' } ); my @items = $fml->top_daily(); foreach my $item (@items) { my $item_id = $item->id; my $item_content = $item->content; print "[$item_id] $item_content\n"; } print $fml->random()->text, "\n"; ... EXPORT This module exports nothing. METHODS last() Fetches the last quotes. Can accept a hashref that indicates the formatting: # returns an array of WWW::FMyLife::Item objects $fml->last(); # or more explicitly $fml->last( { as => 'object' } ); # same as above $fml->last( { as => 'text' } ); # returns an array of text anecdotes $fml->last( { as => 'data' } ); # returns an array of hashes of anecdotes You can also specify which page you want: # return 1st page my @last = fml->last(); # return 5th page my @last = $fml->last(5); # same my @last = $fml->last( { page => 5 } ); And options can be mixed: my @not_so_last = $fml->last( { as => 'text', page => 50 } ); random This method gets a single random quote as an object. top This method works the same as the last() method, only it fetches the top quotes. This method, as for its variations, can format as an object, text or data. top_day This method works the same as the last() method, only it fetches the top quotes. This specific variant fetches the top anecdotes from the last day. top_week This method works the same as the last() method, only it fetches the top quotes. This specific variant fetches the top anecdotes from the last week. top_month This method works the same as the last() method, only it fetches the top quotes. This specific variant fetches the top anecdotes from the last month. credentials( $username, $password ) (NOT YET FULLY IMPLEMENTED) WARNING: THIS HAS NOT YET BEEN IMPLEMENTED. THE TESTS HAVE BEEN DISABLED FOR NOW, PLEASE WAIT FOR A MORE ADVANCED VERSION. Sets credentials for members. $fml->credentials( 'foo', 'bar' ); # same thing $fml->username('foo'); $fml->password('bar'); AUTHORS Sawyer X (XSAWYERX), "" Tamir Lousky (TLOUSKY), "" BUGS Please report any bugs or feature requests to "bug-www-fmylife at rt.cpan.org", or through the web interface at . You can also use the Issues Tracker on Github @ . SUPPORT You can find documentation for this module with the perldoc command. perldoc WWW::FMyLife You can also look for information at: * Our Github! * RT: CPAN's request tracker * AnnoCPAN: Annotated CPAN documentation * CPAN Ratings * Search CPAN * FML (FMyLife) SEE ALSO * WWW::VieDeMerde Apparently supports more options right now. Mainly for French version but seems to support English as well. COPYRIGHT & LICENSE Copyright 2009 Sawyer X, Tamir Lousky. This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information.