LJ protocol

Dear Lazyweb,

How do you edit a metadata property on an existing Livejournal entry using the flat protocol?

I'm trying to write a script that will edit all of my old LJ posts to set the new "Comments Locked" property on them, opt_lockcomments=1. (I figure I'll do this for any entry older than a month, to cut down on spam.)

It looks to me like the only way to set a property on an existing LJ entry is to use the "editevent" command, and re-send all existing properties. If you leave the "event" property out, it gets deleted instead of left alone, for example. This seems insanely fragile, but apparently that's how it works.

What I don't understand is how you set arbitrary metadata. This says that "editevent" takes a "prop_name" option to set them, but I don't see how you pass both a prop and a value there. I tried "prop_name=current_music=foo" but that gets "Client error: Unknown metadata: value".

Tags: , , ,