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.
This method perform all authentification operations. It got only two parameters -- login and password:
$bd->connect ($login,$password);
Returns undef
if unsuccess, and $self
if success.
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.:
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.
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.