init
This commit is contained in:
36
livejournal/doc/raw/build/protocol/authinfo.ent.xml
Executable file
36
livejournal/doc/raw/build/protocol/authinfo.ent.xml
Executable file
@@ -0,0 +1,36 @@
|
||||
<key name="username" count="1">
|
||||
<scalar><des>
|
||||
Username of user logging in.
|
||||
</des></scalar>
|
||||
</key>
|
||||
<key name="auth_method" count="opt">
|
||||
<scalar><des>
|
||||
Authentication method used for this request. The default value is "clear", for plain-text authentication. "cookie" and any of the challenge / response methods are also acceptable.
|
||||
</des></scalar>
|
||||
</key>
|
||||
<key name="password" count="opt">
|
||||
<scalar><des>
|
||||
DEPRECATED. Password of user logging in in plaintext. If using the "clear" authentication method, either this or "hpassword" must be present.
|
||||
</des></scalar>
|
||||
</key>
|
||||
<key name="hpassword" count="opt">
|
||||
<scalar><des>
|
||||
DEPRECATED. MD5 digest of user's password. Not much more secure than password, but at least it's not in plain text.
|
||||
</des></scalar>
|
||||
</key>
|
||||
<key name="auth_challenge" count="opt">
|
||||
<scalar><des>
|
||||
If using challenge / response authentication, this should be the challenge that was issued to you by the server.
|
||||
</des></scalar>
|
||||
</key>
|
||||
<key name="auth_response" count="opt">
|
||||
<scalar><des>
|
||||
If using challenge / response authentication, this should be the response hash that you generate, based on the formula required for your challenge.
|
||||
</des></scalar>
|
||||
</key>
|
||||
<key name="ver" count="opt">
|
||||
<scalar><des>
|
||||
Protocol version supported by the client; assumed to be 0 if not specified. See <link id="ljp.csp.versions" /> for details on the protocol version
|
||||
</des></scalar>
|
||||
</key>
|
||||
|
||||
109
livejournal/doc/raw/build/protocol/checkfriends.mode.xml
Executable file
109
livejournal/doc/raw/build/protocol/checkfriends.mode.xml
Executable file
@@ -0,0 +1,109 @@
|
||||
<method name="checkfriends">
|
||||
<shortdes>
|
||||
Checks to see if your friends list has been updated since a specified time.
|
||||
</shortdes>
|
||||
<des>
|
||||
Mode that clients can use to poll the server to see if their friends list has been updated. This request is extremely quick, and is the preferred way for users to see when their friends list is updated, rather than pounding on reload in their browser, which is stressful on the serves.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="lastupdate" count="1"><scalar><des>
|
||||
The time that this mode request returned last time you called it. If this is the first time you've ever called it (since your client has been running), leave this blank. It's strongly recommended that you do not remember this value across invocations of your client, as it's very likely your friends will update since the client was running so the notification is pointless... the user probably read his/her friends page already before starting the client.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="mask" count="opt"><scalar><des>
|
||||
The friend group(s) in which the client is checking for new entries, represented as a 32-bit unsigned int. Turn on any combination of bits 1-30 to check for entries by friends in the respective friend groups. Turn on bit 0, or leave the mask off entirely, to check for entries by any friends.
|
||||
</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: 481
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.checkfriends</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>lastupdate</name>
|
||||
<value><string></string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="new"><scalar><des>
|
||||
This is what you should use to determine if there are new entries. Its value is "1" if there is new stuff, or "0" if there isn't. Note that once this values becomes "1" and you alert the user, <emphasis>stop polling!</emphasis> It'd be pointless to have the client hitting the server all night while the user slept. Once the user acknowleges the notifcation (double-clicks the system tray or panel applet or whatnot), then resume your polling.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="interval"><scalar><des>
|
||||
How many seconds you <emphasis>must</emphasis> wait before polling the server again. If your client disobeys, this protocol will just return error messages saying "slow down, bad client!" instead of giving you the data you were trying to cheat to obtain. Note that this also means your client should have an option to disable polling for updates, since some users run multiple operating systems with multiple LiveJournal clients, and both would be fighting each other.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="count" count="1"><scalar><des>
|
||||
The number of items that are contained in this response (numbered started at 1). If sync_count is equal to sync_total, then you can stop your sync after you complete fetching every item in this response.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="total" count="1"><scalar><des>
|
||||
The total number of items that have been updated since the time specified.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 358
|
||||
Content-Type: text/xml
|
||||
Date: Tue, 16 Jul 2002 22:49:07 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>lastupdate</name>
|
||||
<value><string>2002-07-16 14:22:16</string></value>
|
||||
</member>
|
||||
<member><name>new</name>
|
||||
|
||||
<value><int>0</int></value>
|
||||
</member>
|
||||
<member><name>interval</name>
|
||||
<value><int>90</int></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
176
livejournal/doc/raw/build/protocol/consolecommand.mode.xml
Executable file
176
livejournal/doc/raw/build/protocol/consolecommand.mode.xml
Executable file
@@ -0,0 +1,176 @@
|
||||
<method name="consolecommand">
|
||||
<shortdes>
|
||||
Run an administrative command.
|
||||
</shortdes>
|
||||
<des>
|
||||
The LiveJournal server has a text-based shell-like admininistration
|
||||
console where less-often used commands can be entered. There's a web
|
||||
interface to this shell online, and this is another gateway to that.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="commands" count="1"><list count="1">
|
||||
<scalar count="0more"><des>
|
||||
The commands to send, with double quotes around any arguments with spaces,
|
||||
and double quotes escaped by backslashes, and backslashes escaped with
|
||||
backslashes. Optionally, you can send a listref instead of a string
|
||||
for this argument, in which case, we'll use your argument separation
|
||||
and not parse it ourselves.
|
||||
</des></scalar>
|
||||
</list></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: 542
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.consolecommand</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>commands</name>
|
||||
<value><array>
|
||||
<data>
|
||||
<value><string>help print</string></value>
|
||||
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="results" count="1">
|
||||
<list count="1"><des>
|
||||
One stuct returned for each command run,
|
||||
that struct containing both the overall return value,
|
||||
and the line-by-line output of the command, with
|
||||
each line of output being tagged by type (think
|
||||
stdout vs. stderr, but with stdinfo also). The web interface
|
||||
shows 'error' with red, '' (stdout) with black, and 'info'
|
||||
with green. Clients are encouraged to also, if possible.
|
||||
</des>
|
||||
<struct count="0more">
|
||||
<key name="success" count="1">
|
||||
<scalar><des>
|
||||
Return status of nth command. 0 or 1.
|
||||
</des></scalar>
|
||||
</key>
|
||||
<key name="output" count="1">
|
||||
<list count="1">
|
||||
<scalar count="1"><des>
|
||||
Type of output line. Either "" (normal output), "error", or "info",
|
||||
something to be emphasized over normal output.
|
||||
</des></scalar>
|
||||
<scalar count="1"><des>
|
||||
The text of that line.
|
||||
</des></scalar>
|
||||
</list>
|
||||
</key>
|
||||
</struct>
|
||||
</list>
|
||||
</key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 1189
|
||||
Content-Type: text/xml
|
||||
Date: Tue, 16 Jul 2002 22:59:33 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
<member><name>results</name>
|
||||
|
||||
<value><array>
|
||||
<data>
|
||||
<value><struct>
|
||||
<member><name>success</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>output</name>
|
||||
<value><array>
|
||||
<data>
|
||||
<value><array>
|
||||
<data>
|
||||
|
||||
<value><string></string></value>
|
||||
<value><string>print ...</string></value>
|
||||
</data>
|
||||
</array></value>
|
||||
<value><array>
|
||||
|
||||
<data>
|
||||
<value><string></string></value>
|
||||
<value><string> This is a debugging function. Given an arbitrary number of</string></value>
|
||||
</data>
|
||||
</array></value>
|
||||
|
||||
<value><array>
|
||||
<data>
|
||||
<value><string></string></value>
|
||||
<value><string> meaningless arguments, it'll print each one back to you. If an</string></value>
|
||||
|
||||
</data>
|
||||
</array></value>
|
||||
<value><array>
|
||||
<data>
|
||||
<value><string></string></value>
|
||||
<value><string> argument begins with a bang (!) then it'll be printed to the error</string></value>
|
||||
|
||||
</data>
|
||||
</array></value>
|
||||
<value><array>
|
||||
<data>
|
||||
<value><string></string></value>
|
||||
<value><string> stream instead.</string></value>
|
||||
|
||||
</data>
|
||||
</array></value>
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</data>
|
||||
|
||||
</array></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
184
livejournal/doc/raw/build/protocol/editevent.mode.xml
Executable file
184
livejournal/doc/raw/build/protocol/editevent.mode.xml
Executable file
@@ -0,0 +1,184 @@
|
||||
<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 <BR>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
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.editevent</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>itemid</name>
|
||||
<value><int>1959</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>event</name>
|
||||
<value><string>This &lt;strike&gt;is&lt;/strike&gt; was a test post.
|
||||
</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>subject</name>
|
||||
<value><string>Test</string></value>
|
||||
</member>
|
||||
<member><name>lineendings</name>
|
||||
|
||||
<value><string>pc</string></value>
|
||||
</member>
|
||||
<member><name>year</name>
|
||||
<value><int>2002</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>mon</name>
|
||||
<value><int>7</int></value>
|
||||
</member>
|
||||
<member><name>day</name>
|
||||
|
||||
<value><int>13</int></value>
|
||||
</member>
|
||||
<member><name>hour</name>
|
||||
<value><int>20</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>min</name>
|
||||
<value><int>35</int></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</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)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>anum</name>
|
||||
<value><int>141</int></value>
|
||||
</member>
|
||||
<member><name>itemid</name>
|
||||
|
||||
<value><int>1959</int></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
119
livejournal/doc/raw/build/protocol/editfriendgroups.mode.xml
Executable file
119
livejournal/doc/raw/build/protocol/editfriendgroups.mode.xml
Executable file
@@ -0,0 +1,119 @@
|
||||
<method name="editfriendgroups">
|
||||
<shortdes>
|
||||
Edit the user's defined groups of friends.
|
||||
</shortdes>
|
||||
<des>
|
||||
Given several optional lists, will add/delete/update/rename the friends groups for a user.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="groupmasks" count="opt"><struct count="1">
|
||||
<des>
|
||||
A structure of friend userids. The values of each are a string representing an unsigned 32-bit integer with bit 0 set (or the server will force it on anyway), bits 1-30 set for each group the friend belongs to, and bit 31 unset (reserved for future use).
|
||||
</des>
|
||||
</struct></key>
|
||||
|
||||
<key name="set" count="opt"><struct count="1">
|
||||
<des>
|
||||
Given the bit of a friend group, the value contains a structure of information on it.
|
||||
</des>
|
||||
<struct count="0more">
|
||||
<key name="name" count="1"><scalar><des>
|
||||
Create or rename the friend group by sending this key. The value is the name of the group.
|
||||
</des></scalar></key>
|
||||
<key name="sort" count="opt"><scalar><des>
|
||||
This field should be sent to indicate the sorting order of this group. The value must be in the range of 0-255. The default is 50.
|
||||
</des></scalar></key>
|
||||
<key name="public" count="opt"><scalar><des>
|
||||
If this is "1", then this group is marked as public. If public, other users can see the name of the group and the people that are in it.
|
||||
</des></scalar></key>
|
||||
</struct>
|
||||
</struct></key>
|
||||
|
||||
<key name="delete" count="opt"><list count="1"><scalar count="0more"><des>
|
||||
A number of a friend group to delete (which can be from 1-30, inclusive). The server will modify all old entries that allow access to that friend group, so a new friend group using that number won't have access to old non-related entries, and unset the bit for that friend group on the groupmask of each friend, unless your client sends the friend's new groupmask explicitly.
|
||||
</des></scalar></list></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: 780
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.editfriendgroups</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>set</name>
|
||||
<value><struct>
|
||||
<member><name>1</name>
|
||||
<value><struct>
|
||||
|
||||
<member><name>name</name>
|
||||
<value><string>Good Friends</string></value>
|
||||
</member>
|
||||
<member><name>sort</name>
|
||||
|
||||
<value><int>25</int></value>
|
||||
</member>
|
||||
<member><name>public</name>
|
||||
<value><boolean>1</boolean></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 132
|
||||
Content-Type: text/xml
|
||||
Date: Mon, 15 Jul 2002 23:16:33 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
147
livejournal/doc/raw/build/protocol/editfriends.mode.xml
Executable file
147
livejournal/doc/raw/build/protocol/editfriends.mode.xml
Executable file
@@ -0,0 +1,147 @@
|
||||
<method name="editfriends">
|
||||
<shortdes>
|
||||
Add, edit, or delete friends from the user's friends list.
|
||||
</shortdes>
|
||||
<des>
|
||||
Takes up to two lists, one of friends to delete and one of friends to add. Several options are allowed to be specified when adding a friend. It returns a verbose list of the friends added, if any were.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="delete" count="opt"><list count="1">
|
||||
<des>
|
||||
A list of variable of this form removes the friend users from the user's friend list. It is not an error to delete an already non-existant friend. The value should just be 1.
|
||||
</des>
|
||||
<scalar count="0more"><des>
|
||||
A username of a friend to remove.
|
||||
</des></scalar>
|
||||
</list></key>
|
||||
|
||||
<key name="add" count="opt"><list count="1">
|
||||
<des>
|
||||
To add friends, send a variable list of this form.
|
||||
</des>
|
||||
<struct count="0more">
|
||||
<key name="username" count="1"><scalar><des>
|
||||
A username of a friend to remove.
|
||||
</des></scalar></key>
|
||||
<key name="fgcolor" count="opt"><scalar><des>
|
||||
Sets the text color of the friend being added. This value is a HTML-style hex-triplet, and must either be of the form <emphasis>#rrggbb</emphasis> or not sent at all. By default, the value assumed is #000000, black.
|
||||
</des></scalar></key>
|
||||
<key name="bgcolor" count="opt"><scalar><des>
|
||||
Sets the background color of the friend being added. This value is a HTML-style hex-triplet, and must either be of the form <emphasis>#rrggbb</emphasis> or not sent at all. By default, the value assumed is #FFFFFF, white.
|
||||
</des></scalar></key>
|
||||
<key name="groupmask" count="opt"><scalar><des>
|
||||
Sets this user's groupmask. Only use this in clients if you've very recently loaded the friend groups. If your client has been loaded on the end user's desktop for days and you haven't loaded friend groups since it started, they may be inaccurate if they've modified their friend groups through the website or another client. In general, don't use this key unless you know what you're doing.
|
||||
</des></scalar></key>
|
||||
</struct>
|
||||
</list></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: 774
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.editfriends</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>add</name>
|
||||
<value><array>
|
||||
<data>
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
|
||||
<value><string>bradfitz</string></value>
|
||||
</member>
|
||||
<member><name>fgcolor</name>
|
||||
<value><string>#000000</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>bgcolor</name>
|
||||
<value><string>#ffffff</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="added" count="opt"><des>
|
||||
A list of the users who have been added with this transaction.
|
||||
</des>
|
||||
<list count="1"><struct count="0more">
|
||||
<key name="username"><scalar><des>
|
||||
The username of the friend that was added.
|
||||
</des></scalar></key>
|
||||
<key name="fullname"><scalar><des>
|
||||
The full name of the friend that was added.
|
||||
</des></scalar></key>
|
||||
</struct></list></key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 420
|
||||
Content-Type: text/xml
|
||||
Date: Mon, 15 Jul 2002 23:52:18 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
<member><name>added</name>
|
||||
|
||||
<value><array>
|
||||
<data>
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>bradfitz</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>fullname</name>
|
||||
<value><string>Brad Fitzpatrick</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
64
livejournal/doc/raw/build/protocol/flat2db.pl
Executable file
64
livejournal/doc/raw/build/protocol/flat2db.pl
Executable file
@@ -0,0 +1,64 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
unless (-d $ENV{'LJHOME'}) { die "\$LJHOME not set.\n"; }
|
||||
|
||||
require "$ENV{'LJHOME'}/doc/raw/build/docbooklib.pl";
|
||||
require "$ENV{'LJHOME'}/cgi-bin/propparse.pl";
|
||||
|
||||
my @vars;
|
||||
LJ::load_objects_from_file("$ENV{'LJHOME'}/htdocs/protocol.dat", \@vars);
|
||||
|
||||
foreach my $mode (sort { $a->{'name'} cmp $b->{'name'} } @vars)
|
||||
{
|
||||
my $name = $mode->{'name'};
|
||||
my $des = $mode->{'props'}->{'des'};
|
||||
cleanse(\$des);
|
||||
|
||||
unshift (@{$mode->{'props'}->{'request'}},
|
||||
{ 'name' => "mode", 'props' => { 'des' => "The protocol request mode: <tt>$name</tt>", } },
|
||||
{ 'name' => "user", 'props' => { 'des' => "Username. Leading and trailing whitespace is ignored, as is case.", } },
|
||||
{ 'name' => "auth_method", 'props' => { 'des' => "The authentication method used for this request. Default is 'clear', for plain-text authentication. 'cookie' or any of the challenge / response methods are also acceptable.", } },
|
||||
{ 'name' => "password", 'props' => { 'des' => "DEPRECATED. Password in plain-text. For the default authentication method, either this needs to be sent, or <tt>hpassword</tt>.", } },
|
||||
{ 'name' => "hpassword", 'props' => { 'des' => "DEPRECATED. Alternative to plain-text <tt>password</tt>. Password as an MD5 hex digest. Not perfectly secure, but defeats the most simple of network sniffers.", } },
|
||||
{ 'name' => "auth_challenge", 'props' => { 'des' => "If using challenge / response authentication, this should be the challenge that was generated for your client.", } },
|
||||
{ 'name' => "auth_response", 'props' => { 'des' => "If using challenge / response authentication, this should be the response hash you generate based on the challenge's formula.", } },
|
||||
{ 'name' => "ver", 'props' => { 'des' => "Protocol version supported by the client; assumed to be 0 if not specified. See [special[cspversion]] for details on the protocol version.", 'optional' => 1, } },
|
||||
) unless $name eq "getchallenge";
|
||||
unshift (@{$mode->{'props'}->{'response'}},
|
||||
{ 'name' => "success", 'props' => { 'des' => "<b><tt>OK</tt></b> on success or <b><tt>FAIL</tt></b> when there's an error. When there's an error, see <tt>errmsg</tt> for the error text. The absence of this variable should also be considered an error.", } },
|
||||
{ 'name' => "errmsg", 'props' => { 'des' => "The error message if <tt>success</tt> was <tt>FAIL</tt>, not present if <tt>OK</tt>. If the success variable isn't present, this variable most likely won't be either (in the case of a server error), and clients should just report \"Server Error, try again later.\".", } },
|
||||
);
|
||||
print "<refentry id=\"ljp.csp.flat.$name\">\n";
|
||||
print " <refnamediv>\n <refname>$name</refname>\n";
|
||||
print " <refpurpose>$des</refpurpose>\n </refnamediv>\n";
|
||||
|
||||
print " <refsect1>\n <title>Mode Description</title>\n";
|
||||
print " <para>$des</para>\n </refsect1>\n";
|
||||
foreach my $rr (qw(request response))
|
||||
{
|
||||
print "<refsect1>\n";
|
||||
my $title = $rr eq "request" ? "Arguments" : "Return Values";
|
||||
print " <title>$title</title>\n";
|
||||
print " <variablelist>\n";
|
||||
foreach (@{$mode->{'props'}->{$rr}})
|
||||
{
|
||||
print " <varlistentry>\n";
|
||||
cleanse(\$_->{'name'});
|
||||
print " <term><literal>$_->{'name'}</literal></term>\n";
|
||||
print " <listitem><para>\n";
|
||||
if ($_->{'props'}->{'optional'}) {
|
||||
print "<emphasis>(Optional)</emphasis>\n";
|
||||
}
|
||||
cleanse(\$_->{'props'}->{'des'});
|
||||
print "$_->{'props'}->{'des'}\n";
|
||||
print " </para></listitem>\n";
|
||||
print " </varlistentry>\n";
|
||||
}
|
||||
print " </variablelist>\n";
|
||||
print "</refsect1>\n";
|
||||
}
|
||||
print "</refentry>\n";
|
||||
}
|
||||
21
livejournal/doc/raw/build/protocol/friendgroups.ent.xml
Executable file
21
livejournal/doc/raw/build/protocol/friendgroups.ent.xml
Executable file
@@ -0,0 +1,21 @@
|
||||
<list count="1">
|
||||
<struct count="0more">
|
||||
|
||||
<key name="id" count="1"><scalar><des>
|
||||
The bit number for this friend group, from 1-30.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="name" count="1"><scalar><des>
|
||||
The name of this friend group.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="sortorder" count="1"><scalar><des>
|
||||
The sort integer for this friend group, from 0-255.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="public" count="1"><scalar><des>
|
||||
Either '0' or '1' for if this friend group is public.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct>
|
||||
</list>
|
||||
122
livejournal/doc/raw/build/protocol/friendof.mode.xml
Executable file
122
livejournal/doc/raw/build/protocol/friendof.mode.xml
Executable file
@@ -0,0 +1,122 @@
|
||||
<method name="friendof">
|
||||
<shortdes>
|
||||
Returns a list of which other LiveJournal users list this user as their friend.
|
||||
</shortdes>
|
||||
<des>
|
||||
Returns a "friends of" list for a specified user. An optional limit of returned friends can be supplied.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="friendoflimit" count="opt"><scalar><des>
|
||||
If set to a numeric value greater than zero, this mode will only return the number of results indicated. Useful only for building pretty lists for display which might have a button to view the full list nearby.
|
||||
</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: 475
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.friendof</methodName>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
</member>
|
||||
<member><name>friendoflimit</name>
|
||||
<value><int>2</int></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="friendofs" count="1">
|
||||
<des>
|
||||
The list of people who list this user as a friend.
|
||||
</des>
|
||||
&friendsList;
|
||||
</key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 936
|
||||
Content-Type: text/xml
|
||||
Date: Tue, 16 Jul 2002 00:53:15 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>friendofs</name>
|
||||
<value><array>
|
||||
<data>
|
||||
<value><struct>
|
||||
<member><name>fgcolor</name>
|
||||
|
||||
<value><string>#000000</string></value>
|
||||
</member>
|
||||
<member><name>username</name>
|
||||
<value><string>aisha_plushie</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>fullname</name>
|
||||
<value><string>Stripe</string></value>
|
||||
</member>
|
||||
<member><name>bgcolor</name>
|
||||
|
||||
<value><string>#ffffff</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>fgcolor</name>
|
||||
|
||||
<value><string>#000000</string></value>
|
||||
</member>
|
||||
<member><name>username</name>
|
||||
<value><string>badcharlotte</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>fullname</name>
|
||||
<value><string>Charlotte</string></value>
|
||||
</member>
|
||||
<member><name>bgcolor</name>
|
||||
|
||||
<value><string>#ffffff</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
29
livejournal/doc/raw/build/protocol/friendslist.ent.xml
Executable file
29
livejournal/doc/raw/build/protocol/friendslist.ent.xml
Executable file
@@ -0,0 +1,29 @@
|
||||
<list count="1">
|
||||
<struct count="0more">
|
||||
|
||||
<key name="username" count="1"><scalar><des>
|
||||
The username of the friend.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="fullname" count="1"><scalar><des>
|
||||
The full name of the friend.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="type" count="opt"><scalar><des>
|
||||
The type of journal the friend item is. This value can be one of 'community', 'syndicated', 'news', or 'shared', depending on the journaltype of the account in question. The account is a normal personal account when this value is not sent.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="fgcolor" count="1"><scalar><des>
|
||||
The foreground color of the friend item.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="bgcolor" count="1"><scalar><des>
|
||||
The background color of the friend item.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="groupmask" count="1"><scalar><des>
|
||||
If the group mask is not "1" (just bit 0 set), then this variable is returned with an 32-bit unsigned integer with a bit 0 always set, and bits 1-30 set for each group this friend is a part of. Bit 31 is reserved.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct>
|
||||
</list>
|
||||
81
livejournal/doc/raw/build/protocol/getchallenge.mode.xml
Executable file
81
livejournal/doc/raw/build/protocol/getchallenge.mode.xml
Executable file
@@ -0,0 +1,81 @@
|
||||
<method name="getchallenge">
|
||||
<shortdes>
|
||||
Generate a server challenge string for authentication.
|
||||
</shortdes>
|
||||
<des>
|
||||
Generate a one-time, quick expiration challenge to be used in challenge/response authentication methods.
|
||||
</des>
|
||||
|
||||
<expost>
|
||||
POST /interface/xmlrpc HTTP/1.0
|
||||
User-Agent: XMLRPC Client 1.0
|
||||
Host: www.livejournal.com
|
||||
Content-Type: text/xml
|
||||
Content-Length: 97
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.getchallenge</methodName>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="auth_scheme" count="1"><scalar><des>
|
||||
You can ignore this for now. By default this is the highest version of our
|
||||
authentication schemes, if in the future if we implement other auth schemes or change the default.
|
||||
In that case we'd add a new capabilities exchange: your client could say, "I know c0 and c1", and
|
||||
our server would then say, "Use c1, it's the best."
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="challenge" count="1"><scalar><des>
|
||||
An opaque cookie to generate a hashed response from.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="expire_time" count="1"><scalar><des>
|
||||
The expiration time of the challenge, as measured in seconds since the Unix epoch.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="server_time" count="1"><scalar><des>
|
||||
The server time when the challenge was generated, as measured in seconds since the Unix epoch.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 557
|
||||
Content-Type: text/xml
|
||||
Date: Tue, 16 Jul 2002 00:30:01 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
<member><name>auth_scheme</name>
|
||||
<value><string>c0</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>challenge</name>
|
||||
<value><string>c0:1073113200:2831:60:2TCbFBYR72f2jhVDuowz:0fba728f5964ea54160a5b18317d92df</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>expire_time</name>
|
||||
<value><int>1073116091</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>server_time</name>
|
||||
<value><int>1073116031</int></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
143
livejournal/doc/raw/build/protocol/getdaycounts.mode.xml
Executable file
143
livejournal/doc/raw/build/protocol/getdaycounts.mode.xml
Executable file
@@ -0,0 +1,143 @@
|
||||
<method name="getdaycounts">
|
||||
<shortdes>
|
||||
This mode retrieves the number of journal entries per day.
|
||||
</shortdes>
|
||||
<des>
|
||||
This mode retrieves the number of journal entries per day. Useful for populating calendar widgets in GUI clients. Optionally a journal can be specified. It returns a list of the dates and accompanied counts.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="usejournal" count="opt">
|
||||
<des>
|
||||
If getting the day counts of a shared journal, include this key and the username you wish to get the counts of. By default, you load the counts of "user" as specified above.
|
||||
</des>
|
||||
&useJournal;
|
||||
</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: 403
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.getdaycounts</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="daycounts" count="1"><list count="1"><struct count="0more"><des>
|
||||
For each day that the user has posted a journal entry, a struct is returned in the list.
|
||||
</des>
|
||||
<key name="date"><scalar><des>The date, in yyyy-dd-mm format.</des></scalar></key>
|
||||
<key name="count"><scalar><des>The number of journal entries on that date.</des></scalar></key>
|
||||
</struct>
|
||||
</list></key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 70580
|
||||
Content-Type: text/xml
|
||||
Date: Tue, 16 Jul 2002 20:50:28 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
<member><name>daycounts</name>
|
||||
<value><array>
|
||||
|
||||
<data>
|
||||
<value><struct>
|
||||
<member><name>count</name>
|
||||
<value><int>1</int></value>
|
||||
</member>
|
||||
|
||||
<member><name>date</name>
|
||||
<value><string>1995-05-01</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
|
||||
<member><name>count</name>
|
||||
<value><int>1</int></value>
|
||||
</member>
|
||||
<member><name>date</name>
|
||||
|
||||
<value><string>1997-05-01</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>count</name>
|
||||
|
||||
<value><int>1</int></value>
|
||||
</member>
|
||||
<member><name>date</name>
|
||||
<value><string>1999-05-03</string></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>count</name>
|
||||
<value><int>17</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>date</name>
|
||||
<value><string>1999-05-04</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
...
|
||||
|
||||
<value><struct>
|
||||
<member><name>count</name>
|
||||
<value><int>1</int></value>
|
||||
</member>
|
||||
<member><name>date</name>
|
||||
|
||||
<value><string>2020-02-20</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
235
livejournal/doc/raw/build/protocol/getevents.mode.xml
Executable file
235
livejournal/doc/raw/build/protocol/getevents.mode.xml
Executable file
@@ -0,0 +1,235 @@
|
||||
<method name="getevents">
|
||||
<shortdes>
|
||||
Download parts of the user's journal.
|
||||
</shortdes>
|
||||
<des>
|
||||
Given a set of specifications, will return a segment of entries up to a limit set by the server. Has a set of options for less, extra, or special data to be returned.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="truncate" count="opt"><scalar><des>
|
||||
A value that if greater than or equal to 4, truncates the length of the returned events (after being decoded) to the value specified. Entries less than or equal to this length are left untouched. Values greater than this length are truncated to the specified length minus 3, and then have "... " appended to them, bringing the total length back up to what you specified. This is good for populating list boxes where only the beginning of the entry is important, and you'll double-click it to bring up the full entry.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="prefersubject" count="opt"><scalar><des>
|
||||
If this setting is set to true (1 ), then no subjects are returned, and the events are actually subjects if they exist, or if not, then they're the real events. This is useful when clients display history and need to give the user something to double-click. The subject is shorter and often more informative, so it'd be best to download only this.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="noprops" count="opt"><scalar><des>
|
||||
If this setting is set to true (1), then no meta-data properties are returned.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="selecttype" count="1"><scalar><des>
|
||||
Determines how you want to specify what part of the journal to download. Valid values are <emphasis>day</emphasis> to download one entire day, <emphasis>lastn</emphasis> to get the most recent n entries (where n is specified in the howmany field), <emphasis>one</emphasis> to download just one specific entry, or <emphasis>syncitems</emphasis> to get some number of items (which the server decides) that have changed since a given time (specified in the lastsync parameter>). Not that because the server decides what items to send, you may or may not be getting everything that's changed. You should use the syncitems selecttype in conjuntions with the syncitems protocol mode.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="lastsync" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>syncitems</emphasis>, the date (in "yyyy-mm-dd hh:mm:ss" format) that you want to get updates since.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="year" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>day</emphasis>, the 4-digit year of events you want to retrieve.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="month" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>day</emphasis>, the 1- or 2-digit month of events you want to retrieve.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="day" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>day</emphasis>, the 1- or 2-digit day of the month of events you want to retrieve.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="howmany" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>lastn</emphasis>, how many entries to get. Defaults to 20. Maximum is 50.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="beforedate" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>lastn</emphasis>, you can optionally include this variable and restrict all entries returned to be before the date you specify, which must be of the form <emphasis>yyyy-mm-dd hh:mm:ss</emphasis>.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="itemid" count="opt"><scalar><des>
|
||||
For a selecttype of <emphasis>one</emphasis>, the journal entry's unique ItemID for which you want to retrieve. Or, to retrieve the most recent entry, use the value -1. Using -1 has the added effect that the data is retrieved from the master database instead of a replicated slave. Clients with an "Edit last entry" feature might want to send -1, to make sure the data that comes back up is accurate, in case a slave database is a few seconds behind in replication.
|
||||
</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-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.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="usejournal" count="opt">
|
||||
<des>
|
||||
If getting the history of a shared journal, include this key and the username you wish to get the history of. By default, you load the history of "user" as specified above.
|
||||
</des>
|
||||
&useJournal;
|
||||
</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: 786
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.getevents</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>truncate</name>
|
||||
<value><int>20</int></value>
|
||||
</member>
|
||||
<member><name>selecttype</name>
|
||||
|
||||
<value><string>lastn</string></value>
|
||||
</member>
|
||||
<member><name>howmany</name>
|
||||
<value><int>2</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>noprops</name>
|
||||
<value><boolean>1</boolean></value>
|
||||
</member>
|
||||
<member><name>lineendings</name>
|
||||
|
||||
<value><string>unix</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="events" count="1"><list count="1"><des>
|
||||
A list of structs for all of the returned events.
|
||||
</des>
|
||||
<struct count="0more">
|
||||
|
||||
<key name="itemid" count="1"><scalar><des>
|
||||
The unique integer ItemID of the item being returned.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="eventtime" count="1"><scalar><des>
|
||||
The time the user posted (or said they posted, rather, since users can back-date posts) the item being returned.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="security" count="1"><scalar><des>
|
||||
If this variable is not returned, then the security of the post is <emphasis>public</emphasis>, otherwise this value will be <emphasis>private</emphasis> or usemask.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="allowmask" count="opt"><scalar><des>
|
||||
If security is <emphasis>usemask</emphasis> then this is defined with the 32-bit unsigned int bit-mask of who is allowed to access this post.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="subject" count="opt"><scalar><des>
|
||||
The subject of the journal entry. This won't be returned if "prefersubjects" is set, instead the subjects will show up as the events.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="event" count="1"><scalar><des>
|
||||
The event text itself. This value is first truncated if the truncate variable is set, and then it is URL-encoded (alphanumerics stay the same, weird symbols to %hh, and spaces to + signs, just like URLs or post request). This allows posts with line breaks to come back on one line.
|
||||
</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>
|
||||
|
||||
<key name="poster" count="opt"><scalar><des>
|
||||
If the poster of this event is different from the <emphasis>user</emphasis> value sent above, then this key will be included and will specify the username of the poster of this event. If this key is not present, then it is safe to assume that the poster of this event is none other than <emphasis>user</emphasis>.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="props" count="opt"><struct count="0more"><des>
|
||||
Properties and their values for the item being returned.
|
||||
</des></struct></key>
|
||||
|
||||
</struct>
|
||||
</list></key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 1002
|
||||
Content-Type: text/xml
|
||||
Date: Tue, 16 Jul 2002 00:30:01 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
<member><name>events</name>
|
||||
|
||||
<value><array>
|
||||
<data>
|
||||
<value><struct>
|
||||
<member><name>eventtime</name>
|
||||
<value><string>2020-02-20 02:20:00</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>event</name>
|
||||
<value><string>yes its true its ...</string></value>
|
||||
</member>
|
||||
<member><name>anum</name>
|
||||
|
||||
<value><int>108</int></value>
|
||||
</member>
|
||||
<member><name>itemid</name>
|
||||
<value><int>1965</int></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>eventtime</name>
|
||||
<value><string>2002-07-14 11:17:00</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>event</name>
|
||||
<value><string>Yes, Yes, YES!</string></value>
|
||||
</member>
|
||||
<member><name>anum</name>
|
||||
|
||||
<value><int>66</int></value>
|
||||
</member>
|
||||
<member><name>subject</name>
|
||||
<value><string>Is this private?</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>itemid</name>
|
||||
<value><int>1964</int></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
100
livejournal/doc/raw/build/protocol/getfriendgroups.mode.xml
Executable file
100
livejournal/doc/raw/build/protocol/getfriendgroups.mode.xml
Executable file
@@ -0,0 +1,100 @@
|
||||
<method name="getfriendgroups">
|
||||
<shortdes>
|
||||
Retrieves a list of the user's defined groups of friends.
|
||||
</shortdes>
|
||||
<des>
|
||||
Retrieves a list of the user's defined groups of friends.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
</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: 406
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.getfriendgroups</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="friendgroups" count="1">
|
||||
&friendGroups;
|
||||
</key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 536
|
||||
Content-Type: text/xml
|
||||
Date: Tue, 16 Jul 2002 01:03:10 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
<member><name>friendgroups</name>
|
||||
<value><array>
|
||||
|
||||
<data>
|
||||
<value><struct>
|
||||
<member><name>sortorder</name>
|
||||
<value><int>25</int></value>
|
||||
</member>
|
||||
|
||||
<member><name>id</name>
|
||||
<value><int>1</int></value>
|
||||
</member>
|
||||
<member><name>public</name>
|
||||
|
||||
<value><int>1</int></value>
|
||||
</member>
|
||||
<member><name>name</name>
|
||||
<value><string>Good Friends</string></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
156
livejournal/doc/raw/build/protocol/getfriends.mode.xml
Executable file
156
livejournal/doc/raw/build/protocol/getfriends.mode.xml
Executable file
@@ -0,0 +1,156 @@
|
||||
<method name="getfriends">
|
||||
<shortdes>
|
||||
Returns a list of which other LiveJournal users this user lists as their friend.
|
||||
</shortdes>
|
||||
<des>
|
||||
Returns a verbose list of information on friends a user has listed. Optionally able to include their friends of list, the friends group associated with each user, and a limit on the number of friends to return.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="includefriendof" count="opt"><scalar><des>
|
||||
If set to 1, you will also get back the info from the "friendof" mode. Some clients show friends and friendof data in separate tabs/panes. If you're always going to load both, then use this flag (as opposed to a tabbed dialog approach, where the user may not go to the second tab and thus would not need to load the friendof data.) friendof request variables can be used.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="includegroups" count="opt"><scalar><des>
|
||||
If set to 1, you will also get back the info from the "getfriendgroups" mode. See above for the reason why this would be useful.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="friendlimit" count="opt"><scalar><des>
|
||||
If set to a numeric value greater than zero, this mode will only return the number of results indicated. Useful only for building pretty lists for display which might have a button to view the full list nearby.
|
||||
</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: 401
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.getfriends</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="friendgroups" count="1">
|
||||
&friendGroups;
|
||||
</key>
|
||||
|
||||
<key name="friendofs">
|
||||
&friendsList;
|
||||
</key>
|
||||
|
||||
<key name="friends">
|
||||
&friendsList;
|
||||
</key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 1377
|
||||
Content-Type: text/xml
|
||||
Date: Tue, 16 Jul 2002 00:44:23 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
<member><name>friends</name>
|
||||
<value><array>
|
||||
|
||||
<data>
|
||||
<value><struct>
|
||||
<member><name>fgcolor</name>
|
||||
<value><string>#000000</string></value>
|
||||
</member>
|
||||
|
||||
<member><name>username</name>
|
||||
<value><string>bradfitz</string></value>
|
||||
</member>
|
||||
<member><name>fullname</name>
|
||||
|
||||
<value><string>Brad Fitzpatrick</string></value>
|
||||
</member>
|
||||
<member><name>bgcolor</name>
|
||||
<value><string>#ffffff</string></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>fgcolor</name>
|
||||
<value><string>#efcfff</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>username</name>
|
||||
<value><string>ljfresno</string></value>
|
||||
</member>
|
||||
<member><name>fullname</name>
|
||||
|
||||
<value><string>Fresno LJ users</string></value>
|
||||
</member>
|
||||
<member><name>type</name>
|
||||
<value><string>community</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>bgcolor</name>
|
||||
<value><string>#000000</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
<value><struct>
|
||||
<member><name>fgcolor</name>
|
||||
<value><string>#520155</string></value>
|
||||
</member>
|
||||
<member><name>username</name>
|
||||
|
||||
<value><string>webkin</string></value>
|
||||
</member>
|
||||
<member><name>fullname</name>
|
||||
<value><string>Ellen Stafford</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>bgcolor</name>
|
||||
<value><string>#fcddff</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
198
livejournal/doc/raw/build/protocol/login.mode.xml
Executable file
198
livejournal/doc/raw/build/protocol/login.mode.xml
Executable file
@@ -0,0 +1,198 @@
|
||||
<method name="login">
|
||||
<shortdes>
|
||||
validate user's password and get base information needed for client to function
|
||||
</shortdes>
|
||||
<des>
|
||||
Login to the server, while announcing your client version. The server returns with whether the password is good or not, the user's name, an optional message to be displayed to the user, the list of the user's friend groups, and other things.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="clientversion" count="opt"><scalar><des>
|
||||
Although optional, this <emphasis>should</emphasis> be a string of the form <literal>Platform-ProductName/ClientVersionMajor.Minor.Rev</literal>, like <emphasis>Win32-MFC/1.2.7</emphasis> or <emphasis>Gtk-LoserJabber/1.0.4</emphasis>. Note in this case that "Gtk" is not a platform, but rather a toolkit, since the toolkit is multi-platform (Linux, FreeBSD, Solaris, Windows...). You make the judge what is best to send, but if it's of this form, we'll give you cool statistics about your users.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="getmoods" count="opt"><scalar><des>
|
||||
If your client supports moods, send this key with a value of the highest mood ID you have cached/stored on the user's computer. For example, if you logged in last time with and got mood IDs 1, 2, 4, and 5, then send "5" as the value of "getmoods". The server will return every new mood that has an internal MoodID greater than 5. If you've never downloaded moods before, send "0". If you don't care about getting any moods at all (if your client doesn't support them), then don't send this key at all.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="getmenus" count="opt"><scalar><des>
|
||||
Send something for this key if you want to get a list/tree of web jump menus to show in your client.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="getpickws" count="opt"><scalar><des>
|
||||
If your client supports picture keywords and you want to receive that list, send something for this key, like "1", and you'll receieve the list of picture keywords the user has defined.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="getpickwurls" count="opt"><scalar><des>
|
||||
If your client supports picture keywords and can also display the pictures somehow, send something for this key, like "1", and you'll receieve the list of picture keyword URLs that correspond to the picture keywords as well as the URL for the default picture. You must send getpickws for this option to even matter.
|
||||
</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: 396
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.login</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="fullname" count="1"><scalar><des>
|
||||
The user's full name. Often, clients use this to change the top-level window's title bar text to say something like "LiveJournal - User name". You can just ignore this if you'd like.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="message" count="opt"><scalar><des>
|
||||
A message that <emphasis>should</emphasis> be displayed in a dialog box (or to the screen in a console application). The message is rarely present but when used notifies the user of software updates they've requested to hear about, problems with their account (if mail is bouncing to them, we'd like them to give us a current email address), etc. To test this if you're developing a client, use the user account <literal role="username">test</literal> with the password <literal>test</literal> and a message will always be returned.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="friendgroups" count="1">
|
||||
&friendGroups;
|
||||
</key>
|
||||
|
||||
<key name="usejournals" count="opt">
|
||||
&useJournals;
|
||||
</key>
|
||||
|
||||
<key name="moods" count="opt">
|
||||
<des>
|
||||
If you sent the 'getmoods' key in your request, this is returned. The contents are the new moods that have been added on the server since you last requested the list. Your client should cache the mood list on the client's computer to avoid requesting the whole list everytime.
|
||||
</des>
|
||||
&moods;
|
||||
</key>
|
||||
|
||||
<key name="pickws" count="opt">
|
||||
<des>
|
||||
This is requrned if you set "getpickws" in your request. Picture keywords are used to identify which userpic (100x100 icon) to use for that particular post. For instance, the user may have "Angry", "Happy", and "Sleepy" picture keywords which map to certain pictures. The client should also do a case-insensitive compare on this list when a mood is selected or entered, and auto-select the current picture keyword. That way it seems that selecting a mood also sets their corresponding picture.
|
||||
</des>
|
||||
<list count="1"><scalar count="0more"><des>
|
||||
The picture keyword.
|
||||
</des></scalar></list>
|
||||
</key>
|
||||
|
||||
<key name="pickwurls" count="opt">
|
||||
<des>
|
||||
The URLs of the user pictures. They correspond with the list of
|
||||
picture keywords returned. Note that the content behind these URLs
|
||||
can never change, so if your client downloads these to display, just
|
||||
cache them locally and never hit the servers again to re-download them
|
||||
or to even check if they've been modified.
|
||||
</des>
|
||||
<list count="1"><scalar count="0more"><des>
|
||||
The picture URL.
|
||||
</des></scalar></list>
|
||||
</key>
|
||||
|
||||
<key name="defaultpicurl" count="opt"><scalar><des>
|
||||
The URL of the default picture (if you sent the 'getpickwurls' key). Note that the content behind this URL can never change, so you can cache it locally; also note that the default picture might have no keyword associated with it.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="fastserver" count="opt"><scalar><des>
|
||||
LiveJournal sites may have priority servers for paying customers. If this key is both present and set to value "1", then the client has permission to set the "ljfastserver" cookie in subsequent requests. The HTTP request header to send is "Cookie: ljfastserver=1". If you send this header without getting permission from the login mode, your requests will fail. That is, you'll trick the load balancer into directing your request towards the priority servers, but the server you end up hitting won't be happy that you're trying to scam faster access and will deny your request.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="userid" count="1"><scalar><des>
|
||||
The userid of this user on the system. Not required for any other requests to
|
||||
the server, but some developers have wanted it.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="menus" count="opt">
|
||||
<des>Returned if you set "getmenus" in your request.</des>
|
||||
<list count="1">
|
||||
<des>List of menu items in order that should be in the LiveJournal web menu in the client application.</des>
|
||||
<struct count="0more">
|
||||
<key name="text" count="1"><scalar><des>
|
||||
The text of the menu item, or "-" for a separator.
|
||||
</des></scalar></key>
|
||||
<key name="url" count="opt"><scalar><des>
|
||||
The URL the menu item should launch, present for all menu items
|
||||
except separators and submenus.
|
||||
</des></scalar></key>
|
||||
<key name="sub" count="opt"><des>
|
||||
If this is present, this menu item is a submenu.
|
||||
</des><list count="0more">
|
||||
<des>Same format as top-level menu structure</des>
|
||||
<struct></struct>
|
||||
</list></key>
|
||||
</struct>
|
||||
</list>
|
||||
</key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 755
|
||||
Content-Type: text/xml
|
||||
Date: Sun, 14 Jul 2002 23:45:59 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
<member><name>userid</name>
|
||||
<value><int>3</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>message</name>
|
||||
<value><string>You need to validate your new email address.
|
||||
Your old one was good, but since you've changed it, you need to re-validate the new one.
|
||||
Visit the support area for more information.</string></value>
|
||||
</member>
|
||||
<member><name>fullname</name>
|
||||
|
||||
<value><string>Test Account</string></value>
|
||||
</member>
|
||||
<member><name>friendgroups</name>
|
||||
<value><array>
|
||||
<data>
|
||||
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
<member><name>usejournals</name>
|
||||
<value><array>
|
||||
<data>
|
||||
|
||||
<value><string>test2</string></value>
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
15
livejournal/doc/raw/build/protocol/moods.ent.xml
Executable file
15
livejournal/doc/raw/build/protocol/moods.ent.xml
Executable file
@@ -0,0 +1,15 @@
|
||||
<list count="1">
|
||||
<struct count="0more">
|
||||
|
||||
<key name="id"><scalar><des>
|
||||
The integer moodid.
|
||||
</des></scalar></key>
|
||||
<key name="name"><scalar><des>
|
||||
The mood name.
|
||||
</des></scalar></key>
|
||||
<key name="parent"><scalar><des>
|
||||
The mood's parent (base) moodid.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct>
|
||||
</list>
|
||||
178
livejournal/doc/raw/build/protocol/postevent.mode.xml
Executable file
178
livejournal/doc/raw/build/protocol/postevent.mode.xml
Executable file
@@ -0,0 +1,178 @@
|
||||
<method name="postevent">
|
||||
<shortdes>
|
||||
The most important mode, this is how a user actually submits a new log entry to the server.
|
||||
</shortdes>
|
||||
<des>
|
||||
Given all of the require information on a post, optioanlly adding security or meta data, will create a new entry. Will return the itemid of the new post.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="event" count="1"><scalar><des>
|
||||
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 <BR>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-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.
|
||||
</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="year" count="1"><scalar><des>
|
||||
The current 4-digit year (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="mon" count="1"><scalar><des>
|
||||
The current 1- or 2-digit month (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="day" count="1"><scalar><des>
|
||||
The current 1- or 2-digit day of the month (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="hour" count="1"><scalar><des>
|
||||
The current 1- or 2-digit hour from 0 to 23 (from the user's local timezone).
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="min" count="1"><scalar><des>
|
||||
The current 1- or 2-digit minute (from the user's local timezone).
|
||||
</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">
|
||||
<des>
|
||||
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.
|
||||
</des>
|
||||
&useJournal;
|
||||
</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: 927
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.postevent</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>event</name>
|
||||
<value><string>This is a test post.
|
||||
</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>subject</name>
|
||||
<value><string>Test</string></value>
|
||||
</member>
|
||||
<member><name>lineendings</name>
|
||||
|
||||
<value><string>pc</string></value>
|
||||
</member>
|
||||
<member><name>year</name>
|
||||
<value><int>2002</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>mon</name>
|
||||
<value><int>7</int></value>
|
||||
</member>
|
||||
<member><name>day</name>
|
||||
|
||||
<value><int>13</int></value>
|
||||
</member>
|
||||
<member><name>hour</name>
|
||||
<value><int>20</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>min</name>
|
||||
<value><int>35</int></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="anum" count="1"><scalar><des>
|
||||
The key number used to calculate the public itemid ID number for URLs.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="itemid" count="1"><scalar><des>
|
||||
The unique number the server assigned to this post. Currently nothing else in the protocol requires the use of this number so it's pretty much useless, but somebody requested it be returned, so it is.
|
||||
</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: closer
|
||||
Content-length: 239
|
||||
Content-Type: text/xml
|
||||
Date: Sat, 13 Jul 2002 23:49:53 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
|
||||
<member><name>anum</name>
|
||||
<value><int>141</int></value>
|
||||
</member>
|
||||
<member><name>itemid</name>
|
||||
|
||||
<value><int>1959</int></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
35
livejournal/doc/raw/build/protocol/proplist2db.pl
Executable file
35
livejournal/doc/raw/build/protocol/proplist2db.pl
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
require "$ENV{'LJHOME'}/cgi-bin/ljlib.pl";
|
||||
|
||||
my $dbr = LJ::get_dbh("slave", "master");
|
||||
my $sth;
|
||||
|
||||
my $sth = $dbr->prepare("SELECT * FROM logproplist ORDER BY sortorder");
|
||||
$sth->execute;
|
||||
|
||||
print "<variablelist>\n";
|
||||
print " <title>Log Prop List</title>\n\n";
|
||||
|
||||
while (my $r = $sth->fetchrow_hashref)
|
||||
{
|
||||
print " <varlistentry>\n";
|
||||
print " <term><literal role='log.prop'>$r->{'name'}</literal></term>\n";
|
||||
print " <listitem><formalpara><title>$r->{'prettyname'}</title>\n";
|
||||
print " <para>$r->{'des'}</para>\n";
|
||||
print " <itemizedlist>\n";
|
||||
print " <listitem><formalpara><title>Datatype</title>\n";
|
||||
print " <para>$r->{'datatype'}</para>\n";
|
||||
print " </formalpara></listitem>\n";
|
||||
print " <listitem><formalpara><title>Scope</title>\n";
|
||||
print " <para>$r->{'scope'}</para>\n";
|
||||
print " </formalpara></listitem>\n";
|
||||
print " </itemizedlist>\n";
|
||||
print " </formalpara></listitem>\n";
|
||||
print " </varlistentry>\n\n";
|
||||
}
|
||||
|
||||
print "</variablelist>\n";
|
||||
89
livejournal/doc/raw/build/protocol/sessionexpire.mode.xml
Executable file
89
livejournal/doc/raw/build/protocol/sessionexpire.mode.xml
Executable file
@@ -0,0 +1,89 @@
|
||||
<method name="sessionexpire">
|
||||
<shortdes>
|
||||
Expires session cookies.
|
||||
</shortdes>
|
||||
<des>
|
||||
Using this request mode, you can expire previously generated sessions, whether you
|
||||
generated them using the sessiongenerate call or the user logged in on the web site.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="expireall" count="opt">
|
||||
<scalar><des>
|
||||
If present and true, then all of the user's sessions will be expired.
|
||||
</des></scalar>
|
||||
</key>
|
||||
|
||||
<key name="expire" count="opt">
|
||||
<list>
|
||||
<scalar count="0more"><des>
|
||||
Given a list of session ids, will expire each one individually. Session ids can be
|
||||
obtained from previous calls to sessiongenerate--notably, the id is the third field
|
||||
in the session.
|
||||
</des></scalar>
|
||||
</list>
|
||||
</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: 542
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.sessionexpire</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>expireall</name>
|
||||
<value><int>1</int></value>
|
||||
</member>
|
||||
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 1189
|
||||
Content-Type: text/xml
|
||||
Date: Fri, 26 Mar 2004 18:39:38 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct/></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
108
livejournal/doc/raw/build/protocol/sessiongenerate.mode.xml
Executable file
108
livejournal/doc/raw/build/protocol/sessiongenerate.mode.xml
Executable file
@@ -0,0 +1,108 @@
|
||||
<method name="sessiongenerate">
|
||||
<shortdes>
|
||||
Generate a session cookie.
|
||||
</shortdes>
|
||||
<des>
|
||||
In order to interact with some web based parts of the site, such as the
|
||||
comment exporter, it is often useful to be able to generate a login cookie
|
||||
without having to actually post login information to the login.bml page.
|
||||
This mode will, with proper authentication, provide you with a session
|
||||
cookie to use for authentication purposes.
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="expiration" count="opt">
|
||||
<scalar><des>
|
||||
Sessions can either expire in a short amount of time or last for a long period
|
||||
of time. You can specify either "short" or "long" as the value of this parameter.
|
||||
</des></scalar>
|
||||
</key>
|
||||
|
||||
<key name="ipfixed" count="opt">
|
||||
<scalar><des>
|
||||
If specified and true, this will cause the server to generate a session that is
|
||||
only valid from the IP address the sessiongenerate request was sent from. If you
|
||||
leave out this value, it will default to allowing any IP address to use this
|
||||
session information.
|
||||
</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: 542
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.sessiongenerate</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>expiration</name>
|
||||
<value><string>long</string></value>
|
||||
</member>
|
||||
|
||||
<member><name>ipfixed</name>
|
||||
<value><string>1</string></value>
|
||||
</member>
|
||||
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="ljsession" count="1">
|
||||
<scalar><des>
|
||||
The session generated.
|
||||
</des></scalar>
|
||||
</key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 228
|
||||
Content-Type: text/xml
|
||||
Date: Fri, 26 Mar 2004 18:14:17 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
<value><struct>
|
||||
|
||||
<member><name>ljsession</name>
|
||||
<value><string>ws:test:124:zfFG136kSz</string>
|
||||
</value></member>
|
||||
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
259
livejournal/doc/raw/build/protocol/syncitems.mode.xml
Executable file
259
livejournal/doc/raw/build/protocol/syncitems.mode.xml
Executable file
@@ -0,0 +1,259 @@
|
||||
<method name="syncitems">
|
||||
<shortdes>
|
||||
Returns a list of all the items that have been created or updated for a user.
|
||||
</shortdes>
|
||||
<des>
|
||||
Returns a list (or part of a list) of all the items (journal entries, to-do items, comments) that have been created or updated on LiveJournal since you last downloaded them. Note that the items themselves are not returned --- only the item type and the item number. After you get this you have to go fetch the items using another protocol mode. For journal entries (type "L"), use the getevents mode with a selecttype of "syncitems".
|
||||
</des>
|
||||
<arguments><struct count="1">
|
||||
|
||||
&authInfo;
|
||||
|
||||
<key name="lastsync" count="opt"><scalar><des>
|
||||
The date you last downloaded synced, in "yyyy-mm-dd hh:mm:ss" format. <emphasis>Note</emphasis>: do not make this date up from the client's local computer... send the date from this mode's response of the newest item you have saved on disk.
|
||||
</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: 495
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodCall>
|
||||
<methodName>LJ.XMLRPC.syncitems</methodName>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>username</name>
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>password</name>
|
||||
|
||||
<value><string>test</string></value>
|
||||
</member>
|
||||
<member><name>ver</name>
|
||||
<value><int>1</int></value>
|
||||
|
||||
</member>
|
||||
<member><name>lastsync</name>
|
||||
<value><string>2002-07-13 00:00:00</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
</param>
|
||||
</params>
|
||||
</methodCall>
|
||||
</expost>
|
||||
|
||||
<!--===================[ RETURN ]==============================-->
|
||||
<returns><struct count="1">
|
||||
|
||||
<key name="syncitems" count="1"><list count="1"><struct count="0more">
|
||||
<key name="item" count="1"><scalar><des>
|
||||
The nth item, in the form "Type-Number". Type can be one of "L" for log entries (journal entries), "C" for comments (not implemented), "T" for to-do items (not implemented), or many other things presumably. If your client doesn't know how to fetch an item of a certain type, just ignore them. A new version of your client could later see that it has never downloaded anything of type "T" and go back and fetch everything of that type from the beginning.
|
||||
</des></scalar></key>
|
||||
<key name="action" count="1"><scalar><des>
|
||||
Either "create" or "update". This field isn't too useful, but you may want to make your client verbose and tell the user what it's doing. For example, "Downloading entry 5 of 17: Updated".
|
||||
</des></scalar></key>
|
||||
<key name="time" count="1"><scalar><des>
|
||||
The server time (in the form "yyyy-mm-dd hh:mm:ss") that this creation or update took place. Remember in your local store the most recent for each item type ("L", "T", "C", etc...). This is what you send in subsequent requests in lastsync.
|
||||
</des></scalar></key>
|
||||
</struct></list></key>
|
||||
|
||||
<key name="count" count="1"><scalar><des>
|
||||
The number of items that are contained in this response (numbered started at 1). If sync_count is equal to sync_total, then you can stop your sync after you complete fetching every item in this response.
|
||||
</des></scalar></key>
|
||||
|
||||
<key name="total" count="1"><scalar><des>
|
||||
The total number of items that have been updated since the time specified.
|
||||
</des></scalar></key>
|
||||
|
||||
</struct></returns>
|
||||
|
||||
<exreturn>
|
||||
HTTP/1.1 200 OK
|
||||
Connection: close
|
||||
Content-length: 3360
|
||||
Content-Type: text/xml
|
||||
Date: Tue, 16 Jul 2002 22:39:30 GMT
|
||||
Server: Apache/1.3.4 (Unix)
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<methodResponse>
|
||||
<params>
|
||||
<param>
|
||||
|
||||
<value><struct>
|
||||
<member><name>total</name>
|
||||
<value><int>11</int></value>
|
||||
</member>
|
||||
<member><name>count</name>
|
||||
|
||||
<value><int>11</int></value>
|
||||
</member>
|
||||
<member><name>syncitems</name>
|
||||
<value><array>
|
||||
<data>
|
||||
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
<value><string>L-1947</string></value>
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
|
||||
<value><string>2002-07-13 00:06:26</string></value>
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
<value><string>del</string></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
<value><string>L-1954</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
<value><string>2002-07-13 00:09:05</string></value>
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
|
||||
<value><string>del</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
|
||||
<value><string>L-1958</string></value>
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
<value><string>2002-07-13 02:01:07</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
<value><string>create</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
<value><string>L-1948</string></value>
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
|
||||
<value><string>2002-07-13 08:27:56</string></value>
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
<value><string>update</string></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
<value><string>L-1960</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
<value><string>2002-07-14 02:52:18</string></value>
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
|
||||
<value><string>create</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
|
||||
<value><string>L-1961</string></value>
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
<value><string>2002-07-14 03:07:55</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
<value><string>create</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
<value><string>L-1962</string></value>
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
|
||||
<value><string>2002-07-14 03:08:14</string></value>
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
<value><string>create</string></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
<value><string>L-1963</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
<value><string>2002-07-14 03:13:26</string></value>
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
|
||||
<value><string>create</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
|
||||
<value><string>L-1964</string></value>
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
<value><string>2002-07-14 03:17:03</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
<value><string>create</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
<value><string>L-1959</string></value>
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
|
||||
<value><string>2002-07-14 14:25:07</string></value>
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
<value><string>update</string></value>
|
||||
|
||||
</member>
|
||||
</struct></value>
|
||||
<value><struct>
|
||||
<member><name>item</name>
|
||||
<value><string>L-1965</string></value>
|
||||
|
||||
</member>
|
||||
<member><name>time</name>
|
||||
<value><string>2002-07-16 04:36:15</string></value>
|
||||
</member>
|
||||
<member><name>action</name>
|
||||
|
||||
<value><string>update</string></value>
|
||||
</member>
|
||||
</struct></value>
|
||||
</data>
|
||||
</array></value>
|
||||
</member>
|
||||
|
||||
</struct></value>
|
||||
</param>
|
||||
</params>
|
||||
</methodResponse>
|
||||
</exreturn>
|
||||
|
||||
</method>
|
||||
3
livejournal/doc/raw/build/protocol/usejournal.ent.xml
Executable file
3
livejournal/doc/raw/build/protocol/usejournal.ent.xml
Executable file
@@ -0,0 +1,3 @@
|
||||
<scalar count="1"><des>
|
||||
Journal username that authenticating user has 'usejournal' access in, as given in the 'login' mode.
|
||||
</des></scalar>
|
||||
7
livejournal/doc/raw/build/protocol/usejournals.ent.xml
Executable file
7
livejournal/doc/raw/build/protocol/usejournals.ent.xml
Executable file
@@ -0,0 +1,7 @@
|
||||
<des>
|
||||
List of shared/news/community journals that the user has permission
|
||||
to post in.
|
||||
</des>
|
||||
<list count="1"><scalar count="0more"><des>
|
||||
Username of community journal.
|
||||
</des></scalar></list>
|
||||
129
livejournal/doc/raw/build/protocol/xml-rpc2db.xsl
Executable file
129
livejournal/doc/raw/build/protocol/xml-rpc2db.xsl
Executable file
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
||||
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes" />
|
||||
|
||||
<xsl:template match="/"><xsl:apply-templates/></xsl:template>
|
||||
<xsl:template match="ljxmlrpc"><xsl:apply-templates/></xsl:template>
|
||||
|
||||
<xsl:template match="method">
|
||||
<refentry><xsl:attribute name="id"><xsl:text>ljp.csp.xml-rpc.</xsl:text><xsl:value-of select="@name"/></xsl:attribute>
|
||||
<refnamediv>
|
||||
<refname><xsl:value-of select="@name"/></refname>
|
||||
<refpurpose><xsl:value-of select="shortdes"/></refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1>
|
||||
<title>Mode Description</title>
|
||||
<para>
|
||||
<xsl:value-of select="des"/>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Arguments</title>
|
||||
<orderedlist>
|
||||
<xsl:for-each select="arguments">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:for-each>
|
||||
</orderedlist>
|
||||
|
||||
<example>
|
||||
<title>Sample call to <literal>LJ.XMLRPC.<xsl:value-of select="@name"/></literal></title>
|
||||
<para><programlisting>
|
||||
<xsl:value-of select="expost"/>
|
||||
</programlisting></para>
|
||||
</example>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Return Values</title>
|
||||
<orderedlist>
|
||||
<xsl:for-each select="returns">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:for-each>
|
||||
</orderedlist>
|
||||
|
||||
<example>
|
||||
<title>Sample return value for <literal>LJ.XMLRPC.<xsl:value-of select="@name"/></literal></title>
|
||||
<para><programlisting>
|
||||
<xsl:value-of select="exreturn"/>
|
||||
</programlisting></para>
|
||||
</example>
|
||||
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="link">
|
||||
<xref><xsl:attribute name="linkend"><xsl:value-of select="@id"/></xsl:attribute></xref>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="struct">
|
||||
<listitem><para>
|
||||
<emphasis>[struct]</emphasis>
|
||||
<xsl:call-template name="count"/>
|
||||
<xsl:for-each select="des">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:for-each>
|
||||
</para><para>
|
||||
Containing keys:
|
||||
<itemizedlist>
|
||||
<xsl:for-each select="*">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:for-each>
|
||||
</itemizedlist>
|
||||
</para></listitem>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="scalar">
|
||||
<listitem><para>
|
||||
<emphasis>[scalar]</emphasis>
|
||||
<xsl:call-template name="count"/>
|
||||
<xsl:for-each select="*">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:for-each>
|
||||
</para></listitem>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="key">
|
||||
<listitem><para>
|
||||
<emphasis role="bold"><xsl:value-of select="@name"/></emphasis>
|
||||
<xsl:call-template name="count"/>:
|
||||
<xsl:for-each select="des">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:for-each>
|
||||
<itemizedlist>
|
||||
<xsl:for-each select="*">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:for-each>
|
||||
</itemizedlist>
|
||||
</para></listitem>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="list">
|
||||
<listitem><para>
|
||||
<emphasis>[array]</emphasis>
|
||||
<xsl:call-template name="count"/>
|
||||
<xsl:value-of select="des"/>
|
||||
Containing items:
|
||||
<itemizedlist>
|
||||
<xsl:for-each select="scalar|struct|list">
|
||||
<xsl:apply-templates select="."/>
|
||||
</xsl:for-each>
|
||||
</itemizedlist>
|
||||
</para></listitem>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="count">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@count='1'">(required)</xsl:when>
|
||||
<xsl:when test="@count='opt'">(optional)</xsl:when>
|
||||
<xsl:when test="@count='1more'">(required; multiple allowed)</xsl:when>
|
||||
<xsl:when test="@count='0more'">(optional; multiple allowed)</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
41
livejournal/doc/raw/build/protocol/xmlrpc.dtd
Executable file
41
livejournal/doc/raw/build/protocol/xmlrpc.dtd
Executable file
@@ -0,0 +1,41 @@
|
||||
<!-- the 'count' attribute indicates how many times it appears in its
|
||||
parent container. either:
|
||||
1 (once always),
|
||||
opt (optionally once),
|
||||
1more (1 or more times),
|
||||
0more (0 or more times) -->
|
||||
<!ENTITY % countatt "count (1|opt|1more|0more) '1'">
|
||||
|
||||
<!-- presence of keys are either there or optionally there,
|
||||
can't be more than 1: -->
|
||||
<!ENTITY % keycountatt "count (1|opt) '1'">
|
||||
|
||||
<!ELEMENT ljxmlrpc (method*)>
|
||||
|
||||
<!ELEMENT method (shortdes?, des?, arguments, returns, expost, exreturn)>
|
||||
<!ATTLIST method name NMTOKEN #REQUIRED>
|
||||
|
||||
<!-- arguments and return both have a list of values, either structs, lists, or scalars -->
|
||||
<!ELEMENT arguments (struct | list | scalar)*>
|
||||
<!ELEMENT returns (struct | list | scalar)*>
|
||||
|
||||
<!ELEMENT scalar (des?)>
|
||||
<!ATTLIST scalar %countatt;>
|
||||
|
||||
<!ELEMENT struct (key*)>
|
||||
<!ATTLIST struct %countatt;>
|
||||
|
||||
<!ELEMENT key (des?, (scalar | struct | list))>
|
||||
<!ATTLIST key name NMTOKEN #REQUIRED %keycountatt;>
|
||||
|
||||
<!ELEMENT list (des?, (struct | list | scalar)*)>
|
||||
<!ATTLIST list %countatt;>
|
||||
|
||||
<!ELEMENT shortdes (#PCDATA)>
|
||||
<!ELEMENT des (#PCDATA|link)*>
|
||||
|
||||
<!ELEMENT link (#PCDATA)>
|
||||
<!ATTLIST link id NMTOKEN #REQUIRED>
|
||||
|
||||
<!ELEMENT expost (#PCDATA)>
|
||||
<!ELEMENT exreturn (#PCDATA)>
|
||||
47
livejournal/doc/raw/build/protocol/xmlrpc.xml
Executable file
47
livejournal/doc/raw/build/protocol/xmlrpc.xml
Executable file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE ljxmlrpc SYSTEM "xmlrpc.dtd" [
|
||||
|
||||
<!ENTITY authInfo SYSTEM "authinfo.ent.xml">
|
||||
<!ENTITY useJournals SYSTEM "usejournals.ent.xml">
|
||||
<!ENTITY useJournal SYSTEM "usejournal.ent.xml">
|
||||
<!ENTITY friendGroups SYSTEM "friendgroups.ent.xml">
|
||||
<!ENTITY moods SYSTEM "moods.ent.xml">
|
||||
<!ENTITY friendsList SYSTEM "friendslist.ent.xml">
|
||||
|
||||
<!ENTITY mode.checkfriends SYSTEM "checkfriends.mode.xml">
|
||||
<!ENTITY mode.consolecommand SYSTEM "consolecommand.mode.xml">
|
||||
<!ENTITY mode.editevent SYSTEM "editevent.mode.xml">
|
||||
<!ENTITY mode.editfriendgroups SYSTEM "editfriendgroups.mode.xml">
|
||||
<!ENTITY mode.editfriends SYSTEM "editfriends.mode.xml">
|
||||
<!ENTITY mode.friendof SYSTEM "friendof.mode.xml">
|
||||
<!ENTITY mode.getchallenge SYSTEM "getchallenge.mode.xml">
|
||||
<!ENTITY mode.getdaycounts SYSTEM "getdaycounts.mode.xml">
|
||||
<!ENTITY mode.getevents SYSTEM "getevents.mode.xml">
|
||||
<!ENTITY mode.getfriendgroups SYSTEM "getfriendgroups.mode.xml">
|
||||
<!ENTITY mode.getfriends SYSTEM "getfriends.mode.xml">
|
||||
<!ENTITY mode.login SYSTEM "login.mode.xml">
|
||||
<!ENTITY mode.postevent SYSTEM "postevent.mode.xml">
|
||||
<!ENTITY mode.sessionexpire SYSTEM "sessionexpire.mode.xml">
|
||||
<!ENTITY mode.sessiongenerate SYSTEM "sessiongenerate.mode.xml">
|
||||
<!ENTITY mode.syncitems SYSTEM "syncitems.mode.xml">
|
||||
]>
|
||||
<ljxmlrpc>
|
||||
|
||||
&mode.checkfriends;
|
||||
&mode.consolecommand;
|
||||
&mode.editevent;
|
||||
&mode.editfriendgroups;
|
||||
&mode.editfriends;
|
||||
&mode.friendof;
|
||||
&mode.getchallenge;
|
||||
&mode.getdaycounts;
|
||||
&mode.getevents;
|
||||
&mode.getfriends;
|
||||
&mode.getfriendgroups;
|
||||
&mode.login;
|
||||
&mode.postevent;
|
||||
&mode.sessionexpire;
|
||||
&mode.sessiongenerate;
|
||||
&mode.syncitems;
|
||||
|
||||
</ljxmlrpc>
|
||||
Reference in New Issue
Block a user