?

Log in

No account? Create an account
http://www.livejournal.com/developer/exporting.bml - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

http://www.livejournal.com/developer/exporting.bml [Jan. 22nd, 2006|11:35 am]
LiveJournal Client Discussions

lj_clients

[simsong]
I've read http://www.livejournal.com/developer/exporting.bml, but can't find the info on the XMLRPC interface to get at the comments. Can somebody point me to it? Thanks.
linkReply

Comments:
[User Picture]From: simsong
2006-01-23 04:42 pm (UTC)
Okay. Let me be a little more clear. Can you show me a sample Python program that will use this API? I can't figure it out... Like, I don' t what is the base URL, I don' t know the name of the function to use, etc. The code that I have works great:

server_url = 'http://www.livejournal.com/interface/xmlrpc'
server = xmlrpclib.Server(server_url);
res = server.LJ.XMLRPC.getevents({'username':'simsong',
'hpassword':hpassword,
'year':str(when.year),
'month':str(when.month),
'day':str(when.day),
'selecttype':'day',
'usejournal':journal,
'prefersubject':1
})

But when I tried to change "getevents" to "export_comments" and filled in the variables, it didn't work.

(Reply) (Parent) (Thread)
From: jeran
2006-02-06 04:12 am (UTC)
I don't think you read the page. The comment exporter isn't part of the flat or XMLRPC interfaces, it's a completely seperate CGI program. You POST a request to it using it's variables, and it'll return an XML document containing what you requested. That should be apparent because the comment exporter's path is "/export_comments.bml" while the interfaces are "/interface/flat" and "/interface/xmlrpc".
(Reply) (Parent) (Thread)
[User Picture]From: xf
2006-02-06 09:04 am (UTC)
I did read the page---several times---but I guess I didn't understand it.

You mean that I have to hand-craft the POST and decode the XML, and can't use the nice high-level XMLRPC because there is a back-end description file of some sort that's missing?
(Reply) (Parent) (Thread)
From: jeran
2006-02-06 12:26 pm (UTC)
Pretty much. But if you've got .Net you've almost certainly got an HTTP class (the exporter uses GET, not POST, I was mistaken) that'll handle the details for you. There's no high-level interface (eg. XMLRPC) because the exporter's interface is too simple to need one, just fill in the query-string variables, fire off the request and snarf the XML from the body of the response. It's much like using the flat interface, just a different path and XML in the response instead of lines of text.
(Reply) (Parent) (Thread)