ljr/livejournal/doc/raw/build/protocol/editevent.mode.xml

185 lines
6.8 KiB
XML
Executable File

<method name="editevent">
<shortdes>
Edit or delete a user's past journal entry
</shortdes>
<des>
Modify an already created event. If fields are empty, it will delete the event.
</des>
<arguments><struct count="1">
&authInfo;
<key name="itemid" count="1"><scalar><des>
The unique ItemID of the item being modified or deleted.
</des></scalar></key>
<key name="event" count="1"><scalar><des>
The revised event/log text the user is submitting. Or, to delete an entry, just send no text at all. 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 &lt;BR&gt;s when displaying them, so your client should not try to insert these itself.
</des></scalar></key>
<key name="lineendings" count="1"><scalar><des>
Specifies the type of line-endings you're using. Possible values are <emphasis>unix</emphasis> (0x0A (\n)), <emphasis>pc</emphasis> (0x0D0A (\r\n)), or <emphasis>mac</emphasis> (
0x0D (\r) ). The default is not-Mac. Internally, LiveJournal stores all text as Unix-form
atted 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 you
r line endings will be removed. PC and Unix clients can ignore this setting, or you can s
end it. It may be used for something more in the future.
</des></scalar></key>
<key name="subject" count="1"><scalar><des>
The subject for this post. Limited to 255 characters. No newlines.
</des></scalar></key>
<key name="security" count="opt"><scalar><des>
Specifies who can read this post. Valid values are <emphasis>public</emphasis> (default), <emphasis>private</emphasis> and <emphasis>usemask</emphasis>. When value is usemask, viewability is controlled by the allowmask.
</des></scalar></key>
<key name="allowmask" count="opt"><scalar><des>
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.
</des></scalar></key>
<key name="props" count="opt">
<des>
Set arbitrary (but restricted) meta-data properties to this log item. See <link id="ljp.csp.proplist" />
for the documentation of the keys and value data types.
</des>
<list count="1">
<des>The following 'struct' should have property names as the keys, and the values should be a scalar data type.</des>
<struct count="0more"/>
</list>
</key>
<key name="usejournal" count="opt"><scalar><des>
If editing a shared journal entry, include this key and the username you wish to edit the entry in. By default, you edit the entry as if it were in user "user"'s journal, as specified above.
</des></scalar></key>
<key name="year" count="1"><scalar><des>
If modifying only, the 4-digit year of the event (from the user's local timezone).
</des></scalar></key>
<key name="mon" count="1"><scalar><des>
If modifying only, the 1- or 2-digit month of the event (from the user's local timezone).
</des></scalar></key>
<key name="day" count="1"><scalar><des>
If modifying only, the 1- or 2-digit day of the month of the event (from the user's local timezone).
</des></scalar></key>
<key name="hour" count="1"><scalar><des>
If modifying only, the 1- or 2-digit hour from 0 to 23 of the event (from the user's local timezone).
</des></scalar></key>
<key name="min" count="1"><scalar><des>
If modifying only, the 1- or 2-digit minute of the event (from the user's local timezone).
</des></scalar></key>
</struct></arguments>
<expost>
POST /interface/xmlrpc HTTP/1.0
User-Agent: XMLRPC Client 1.0
Host: www.livejournal.com
Content-Type: text/xml
Content-Length: 1032
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;methodCall&gt;
&lt;methodName&gt;LJ.XMLRPC.editevent&lt;/methodName&gt;
&lt;params&gt;
&lt;param&gt;
&lt;value&gt;&lt;struct&gt;
&lt;member&gt;&lt;name&gt;username&lt;/name&gt;
&lt;value&gt;&lt;string&gt;test&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;password&lt;/name&gt;
&lt;value&gt;&lt;string&gt;test&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;itemid&lt;/name&gt;
&lt;value&gt;&lt;int&gt;1959&lt;/int&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;event&lt;/name&gt;
&lt;value&gt;&lt;string&gt;This &amp;lt;strike&amp;gt;is&amp;lt;/strike&amp;gt; was a test post.
&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;subject&lt;/name&gt;
&lt;value&gt;&lt;string&gt;Test&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;lineendings&lt;/name&gt;
&lt;value&gt;&lt;string&gt;pc&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;year&lt;/name&gt;
&lt;value&gt;&lt;int&gt;2002&lt;/int&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;mon&lt;/name&gt;
&lt;value&gt;&lt;int&gt;7&lt;/int&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;day&lt;/name&gt;
&lt;value&gt;&lt;int&gt;13&lt;/int&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;hour&lt;/name&gt;
&lt;value&gt;&lt;int&gt;20&lt;/int&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;min&lt;/name&gt;
&lt;value&gt;&lt;int&gt;35&lt;/int&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;/struct&gt;&lt;/value&gt;
&lt;/param&gt;
&lt;/params&gt;
&lt;/methodCall&gt;
</expost>
<!--===================[ RETURN ]==============================-->
<returns><struct count="1">
<key name="itemid" count="1"><scalar><des>
The unique ItemID of the item being modified or deleted.
</des></scalar></key>
<key name="anum" count="1"><scalar><des>
The authentication number generated for this entry. It can be used by the client to generate URLs, but that is not recommended. (See the returned 'url' element if you want to link to a post.)
</des></scalar></key>
<key name="url" count="1"><scalar><des>
The permanent link address to this post. This is an opaque string--you should store it as is. While it will generally follow a predictable pattern, there is no guarantee of any particular format for these, and it may change in the future.
</des></scalar></key>
</struct></returns>
<exreturn>
HTTP/1.1 200 OK
Connection: close
Content-length: 267
Content-Type: text/xml
Date: Sat, 13 Jul 2002 23:57:17 GMT
Server: Apache/1.3.4 (Unix)
&lt;?xml version="1.0"?&gt;
&lt;methodResponse&gt;
&lt;params&gt;
&lt;param&gt;
&lt;value&gt;&lt;struct&gt;
&lt;member&gt;&lt;name&gt;anum&lt;/name&gt;
&lt;value&gt;&lt;int&gt;141&lt;/int&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;itemid&lt;/name&gt;
&lt;value&gt;&lt;int&gt;1959&lt;/int&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;/struct&gt;&lt;/value&gt;
&lt;/param&gt;
&lt;/params&gt;
&lt;/methodResponse&gt;
</exreturn>
</method>