Advogato XML-RPC Interface

Advogato now has an XML-RPC interface available at the URL http://www.advogato.org/XMLRPC. To test it, try calling one of the test functions below. If you are using Python, for example, try the following:

>>> import xmlrpclib
>>> server = xmlrpclib.Server("http://www.advogato.org/XMLRPC")
>>> server.test.sumprod(5, 7)

It should return [12, 35].

Authentication

string cookie = authenticate(string user, string pass)
Returns a cookie which is used as the first argument to all methods requiring authentication.

Diary manipulation

int length = diary.len(string user)
Return the number of entries in a diary.
string html = diary.get(string user, int index)
Return a diary entry. The index is zero-based, so if diary.len() returns 2 then valid indices are 0 and 1.
date created, date updated = diary.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.
diary.set(string cookie, int index, string html)
Set a diary entry. Use -1 as the index to post a new entry, although the value returned by diary.len() is also acceptable.

Test functions

string s, int i = test.guess()
Guess a number
int result = test.square(int x)
Square a number
int sum, int product = test.sumprod(int x, int y)
Return the sum and product of a pair of numbers
int len = test.strlen(string s)
Return the length of a string
string s = test.capitalize(string s)
Capitalize a string

 [ Home | Articles | Account | People | Projects