WWW::FMyLife - Obtain FMyLife.com anecdotes via API
Version 0.15
THIS MODULE IS STILL UNDER INITIAL DEVELOPMENT! BE WARNED!
use WWW::FMyLife; my $fml = WWW::FMyLife->new(); print map { "Items: $_\n" } $fml->last( { as => text' } );
This module fetches FMyLife.com (FML) anecdotes, comments, votes and more via API, comfortably and in an extensible manner.
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"; ...
This module exports nothing.
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 } );
This method gets a single random quote as an object.
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.
This specific variant fetches the top anecdotes from the last day.
This specific variant fetches the top anecdotes from the last week.
This specific variant fetches the top anecdotes from the last month.
Fetches the flop quotes.
Fetches the flop quotes of the day.
Fetches the flop quotes of the week.
Fetches the flop quotes of the month.
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');
Sawyer X (XSAWYERX), <xsawyerx at cpan.org>
<xsawyerx at cpan.org>
Tamir Lousky (TLOUSKY), <tlousky at cpan.org>
<tlousky at cpan.org>
Moose
XML::Simple
LWP::UserAgent
Please report any bugs or feature requests to bug-www-fmylife at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-FMyLife.
bug-www-fmylife at rt.cpan.org
You can also use the Issues Tracker on Github @ http://github.com/xsawyerx/www-fmylife/issues.
You can find documentation for this module with the perldoc command.
perldoc WWW::FMyLife
You can also look for information at:
Our Github!
http://github.com/xsawyerx/www-fmylife/tree/master
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-FMyLife
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/WWW-FMyLife
CPAN Ratings
http://cpanratings.perl.org/d/WWW-FMyLife
Search CPAN
http://search.cpan.org/dist/WWW-FMyLife/
FML (FMyLife)
http://www.fmylife.com
WWW::VieDeMerde
Apparently supports more options right now. Mainly for French version but seems to support English as well.
Copyright 2010 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.
To install WWW::FMyLife, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::FMyLife
CPAN shell
perl -MCPAN -e shell install WWW::FMyLife
For more information on module installation, please visit the detailed CPAN module installation guide.