Six Apart Developer Center

Developer Center Home » Product Documentation » LiveJournal »

LJ.XMLRPC.postevent

Posted by Byrne Reese on March 3, 2006

The postevent method creates a new journal entry.

Request Parameters

  • LiveJournal's Common Request Parameters
  • event - The event/log text the user is submitting. Carriage returns are okay (0x0A, 0x0A0D, or 0x0D0A), although 0x0D are removed internally to make everything into Unix-style line-endings (just \ns). Posts may also contain HTML, but be aware that the LiveJournal server converts newlines to HTML
    s when displaying them, so your client should not try to insert these itself.
  • lineendings - Specifies the type of line-endings you're using. Possible values are unix (0x0A (\n)), pc (0x0D0A (\r\n)), or mac (0x0D (\r) ). The default is not-Mac. Internally, LiveJournal stores all text as Unix-formatted text, and it does the conversion by removing all \r characters. If you're sending a multi-line event on Mac, you have to be sure and send a lineendings value of mac or your line endings will be removed. PC and Unix clients can ignore this setting, or you can send it. It may be used for something more in the future.
  • subject - The subject for this post. Limited to 255 characters. No newlines.
  • security - Specifies who can read this post. Valid values are public (default), private and usemask. When value is usemask, viewability is controlled by the allowmask.
  • allowmask - Relevant when security is usemask. A 32-bit unsigned integer representing which of the user's groups of friends are allowed to view this post. Turn bit 0 on to allow any defined friend to read it. Otherwise, turn bit 1-30 on for every friend group that should be allowed to read it. Bit 31 is reserved. (optional)
  • year - The current 4-digit year (from the user's local timezone).
  • mon - The current 1- or 2-digit month (from the user's local timezone).
  • day - The current 1- or 2-digit day of the month (from the user's local timezone).
  • hour - The current 1- or 2-digit hour from 0 to 23 (from the user's local timezone).
  • min - The current 1- or 2-digit minute (from the user's local timezone).
  • props - An array of struct of type MetaData.

MetaData Type

Set arbitrary (but restricted) meta-data properties to this log item. See Chapter 12: Journal Item Meta-data for the documentation of the keys and value data types.

An array of struct (optional) with keys:

  • <property name> - The name of the key should correspond to one of the known Journal Item Properties.
  • usejournal - If posting to a shared journal, include this key and the username you wish to post to. By default, you post to the journal of "user" as specified above. Journal username that authenticating user has 'usejournal' access in, as given in the 'login' mode. (optional)

Return Values

Sample Request

Sample Response

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Six Apart
Makers of weblog software and services for individuals, organizations and businesses.
This website is powered by Movable Type.