View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
જલધર હ. વ્યાસ > WebService-Advogato-1.1.0 > WebService::Advogato



Annotate this POD


New  1
Open  0
View/Report Bugs
Module Version: 1.1.0   Source  


WebService::Advogato - XML-RPC interface to


 use WebService::Advogato;
 my $client = new WebService::Advogato('username', 'password');
 my $num_entries = $client->len('jaldhar');
 $client->set(-1, '<p>A diary entry.</p>');


This module implements the XML-RPC interface to the diaries at a site for developers of free software.


The module is implemented as a class. The methods use standard perl scalars and arrays but internally they use XML-RPC datatypes: int, string and date. The following descriptions include the datatype for your reference.


An object is constructed using the standard syntax. The constructor can take two parameters: username, and password which are the name and password of an advogato user account. These are used in methods which require logging in.

Diary manipulation methods

$int_length = len($string_user)

Return the number of entries in a diary. This implements the diary.len RPC function.

$string_html = get($string_user, $int_index)

Return a diary entry. The index is zero-based, so if len returns 2 then valid indices are 0 and 1. This implements the diary.get RPC function.

($date_created, $date_updated) = getDates($string_user, $int_index)

Return the creation and last updated dates of a diary entry. If the entry has not been updated then the updated date will be the same as the creation date. This implements the diary.getDates RPC function.

set($int_index, $string_html)

Sets a diary entry. Use -1 as the index to post a new entry, although the value returned by len is also acceptable. This implements the diary.set RPC function.

User related methods

$int_exists = exists($string_user)

Returns zero if the user does not exist, or one if he does. This implements the user.exists RPC function.

Certification related methods

$string_level = level($string_user)

Returns the certification level of the requested user. This implements the cert.get RPC function.

Test methods

These methods are only useful for testing purposes.

$string_capitalized = capitalize($string)

Capitalized a string. This implements the test.capitalize RPC function.

($string, $int) = guess()

Guesses a number. (Actually always returns 'You guessed' and 42.)

$int = square($int)

Squares a number. This implements the test.square RPC function.

($int_sum, $int_product) = sumprod($int_x, $int_y)

Returns the sum and product of a pair of numbers. This implements the test.sumprod RPC function.

$int_len = strlen($string)

Returns the length of a string. This implements the test.strlen RPC function.



Jaldhar H. Vyas, <>


Copyright (c) 2004, Consolidated Braincells Inc.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: