Re: PyDS XMLRPC weblog API

Georg Bauer <gb-BRhJDZTO+/[email protected]> Sun, 1 Feb 2004 20:01:33 +0100
Newsgroups gmane.comp.pythin.pyds.devel
Message-ID <r02010000-1028-0D75FA4A54E911D8BE19000A9573A72A@[10.0.0.145]>
Hi!

> After opening a line to the server's xmlrpc channel like this:
>    blog=xmlrpclib.Server('http://localhost:4334/RPC2/weblog')

This gives you access to the weblog RPC API - you can see what calls are
defined in the DocumentationTool. This is PyDS' native API, though. To
get Blogger or MetaWeblogAPI you need to get a server differently:

blog = xmlrpclib.Server('http://localhost:4334/RPC2')
blog.blogger.getPost(....)
blog.metaWeblogAPI.getPost(....)

You can use the explicit namespace for other APIs, too, but you need to
speak to the correct namespace to get the correct calls :-)

> newPost tells me:
>    Fault: <Fault 1: 'Method not found in namespace weblog:newPost'>

Yes, believe him, there is no newPost method in the PyDS' weblog API.
The corresponding API method would be postNewEntry. It's documented in
the DocumentationTool, too.

One speciality: all PyDS native APIs receive two additional parameters
when accessed via RPC (either XMLRPC or SOAP): the user and the
password.

> getPost gives me:
>    Fault: <Fault 1: 'Authentication failure:P8'>

Sure, the bloggerAPI.getPost has different parameters than the
PyDS.weblog.getPost. The former one is what you accessed, there you need
to pass user and password as the first two parameters.

Oh, and one special note: the blogger and MetaWeblog APIs only work
fully with PyDS 0.7 - older versions of PyDS are rather buggy in that
area.

bye, Georg