Net::BobrDobr - module for using http://bobrdobr.ru.
use Net::BobrDobr; my $bd = new Net::BobrDobr (...); $bd->connect (...) or die $bd->error; my $ret = $bd->call (...);
This module intended for deplouing social bookmark network http://BobrDobr.ru. You can log in to site, retrieve bookmarks, add bokmarks and remove bookmarks (list of all available operations you can find at http://bobrdobr.ru/api.html).
Create new instance of this module. Parameters for this call:
File with bobrdobr-api keys, in format
api-key: <api application key> api-secret: <api secret key>
Manually supplied bobrdobr api application key.
Manually supplied bobrdobr api secret key.
Agent name for client, may be omitted.
Timeout, default is 60 secs.
File for saving authentification cookies.
Returns undef if unsuccess, and $self if success.
undef
$self
This method perform all authentification operations. It got only two parameters -- login and password:
$bd->connect ($login,$password);
Main method for call bobrdobr-services. List of all available methods you can find in http://bobrdobr.ru/api.html.
First argument or this method is a name of bobrdobr operation, as a "test.echo", and rest -- hash of named parameters for this operations. E.g.:
"test.echo"
my $ret = $bd->call ("test.echo",'param1' => "one");
Return reference to hash from server, or empty if request fail.
Main field for return hash: $ret-{'stat'}>, it may be:"ok" if operation success, or "fail" in other case. Full description see in http://bobrdobr.ru/api.html.
$ret-
"ok"
"fail"
It is same method as call, but return raw content from server (REST XML form).
http://bobrdobr.ru/api.html, XML::Simple, LWP::UserAgent.
Artur Penttinen, <artur+perl@niif.spb.su>
Copyright (C) 2008 by Artur Penttinen
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.
To install Net::BobrDobr, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::BobrDobr
CPAN shell
perl -MCPAN -e shell install Net::BobrDobr
For more information on module installation, please visit the detailed CPAN module installation guide.