WWW::VieDeMerde - A perl module to use the viedemerde.fr API
Version 0.21
use WWW::VieDeMerde; my $toto = WWW::VieDeMerde->new(); my $tata = $toto->last(); my $tata = $toto->page(17); my $tata = $toto->random(); my $tata = $toto->get(1234); print $tata->text, $tata->author;
viedemerde.fr and fmylife.com are microblogs where people post short messages in order to show how their life is crappy. It offers a simple but efficient http-based API.
This module aims to implement a full interface for the version 2.0 of the API. The full documentation is here: http://dev.betacie.com/viewtopic.php?id=6.
Creates a new WWW::VieDeMerde object.
Parameters are:
key
Your developper key. The defaults value ("readonly") is sufficient for readonly functions. You can ask for a key here: http://www.viedemerde.fr/api/developpeurs or http://www.fmylife.com/api/developers.
token
The authentification to use an user account. See the API doc.
Not sure it will works.
url
The URL of the API server. Do not change it, the defaults value ("api.betacie.com") is good enough.
$vdm->page() returns the last 15 entries.
$vdm->page()
$vdm->page($n) the $n page (0 is the last one).
$vdm->page($n)
If the page you ask is empty, returns an empty list.
$vdm->last alias for $vdm->page.
$vdm->last
$vdm->page
$vdm->random() returns a random entry.
$vdm->random()
$vdm->get($id) returns the item number $id.
$vdm->get($id)
$vdm->comments($id) returns the comments of the item $id.
$vdm->comments($id)
$vdm->top() returns the 15 better ranked entries.
$vdm->top()
This function and all the top_* and flop_* functions accept a page number as argument.
$vdm->top_day() returns the top of the day.
$vdm->top_day()
$vdm->top_jour is an alias for $vdm->top_day.
$vdm->top_jour
$vdm->top_day
$vdm->top_week() return the week top.
$vdm->top_week()
$vdm->top_semaine is an alias for $vdm->top_week.
$vdm->top_semaine
$vdm->top_week
$vdm->top_month() returns the month top.
$vdm->top_month()
$vdm->top_mois is an alias for $vdm->top_month.
$vdm->top_mois
$vdm->top_month
$vdm->flop() returns the global top.
$vdm->flop()
$vdm->flop_day() returns day flop.
$vdm->flop_day()
$vdm->flop_jour is an alias for $vdm->top_day.
$vdm->flop_jour
$vdm->flop_week() returns week flop.
$vdm->flop_week()
$vdm->flop_semaine is an alias for $vdm->flop_semain.
$vdm->flop_semaine
$vdm->flop_semain
$vdm->flop_month() returns month flop.
$vdm->flop_month()
$vdm->flop_mois is an alias for $vdm->flop_month.
$vdm->flop_mois
$vdm->flop_month
$vdm->categories($cat) returns a list for all categories.
$vdm->categories($cat)
$vdm->from_cat($cat) returns entries of the category $cat.
$vdm->from_cat($cat)
Read/write accessor for errors.
Build the request by joining arguments with slashes.
Detect errors in an xml fragment returned by _run.
Outputs raw xml for the given commands.
Olivier Schwander, <olivier.schwander at ens-lyon.org>
<olivier.schwander at ens-lyon.org>
Please report any bugs or feature requests to bug-www-vdm at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-VieDeMerde. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-www-vdm at rt.cpan.org
A darcs repository is available here :
http://chadok.info/darcs/WWW-VieDeMerde
You can find documentation for this module with the perldoc command.
perldoc WWW::VieDeMerde
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-VieDeMerde
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/WWW-VieDeMerde
CPAN Ratings
http://cpanratings.perl.org/d/WWW-VieDeMerde
Search CPAN
http://search.cpan.org/dist/WWW-VieDeMerde
WWW::FMyLife
In early development, it seems to intend to support votes and comments which is not my priority right now. Supports both French and English version, despite the name.
Copyright 2008 Olivier Schwander, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install WWW::VieDeMerde, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::VieDeMerde
CPAN shell
perl -MCPAN -e shell install WWW::VieDeMerde
For more information on module installation, please visit the detailed CPAN module installation guide.