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

157 lines
4.7 KiB
XML
Raw Normal View History

2019-02-05 21:49:12 +00:00
<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
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;methodCall&gt;
&lt;methodName&gt;LJ.XMLRPC.getfriends&lt;/methodName&gt;
&lt;params&gt;
&lt;param&gt;
&lt;value&gt;&lt;struct&gt;
&lt;member&gt;&lt;name&gt;username&lt;/name&gt;
&lt;value&gt;&lt;string&gt;test&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;password&lt;/name&gt;
&lt;value&gt;&lt;string&gt;test&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;ver&lt;/name&gt;
&lt;value&gt;&lt;int&gt;1&lt;/int&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;/struct&gt;&lt;/value&gt;
&lt;/param&gt;
&lt;/params&gt;
&lt;/methodCall&gt;
</expost>
<!--===================[ RETURN ]==============================-->
<returns><struct count="1">
<key name="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)
&lt;?xml version="1.0"?&gt;
&lt;methodResponse&gt;
&lt;params&gt;
&lt;param&gt;
&lt;value&gt;&lt;struct&gt;
&lt;member&gt;&lt;name&gt;friends&lt;/name&gt;
&lt;value&gt;&lt;array&gt;
&lt;data&gt;
&lt;value&gt;&lt;struct&gt;
&lt;member&gt;&lt;name&gt;fgcolor&lt;/name&gt;
&lt;value&gt;&lt;string&gt;#000000&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;username&lt;/name&gt;
&lt;value&gt;&lt;string&gt;bradfitz&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;fullname&lt;/name&gt;
&lt;value&gt;&lt;string&gt;Brad Fitzpatrick&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;bgcolor&lt;/name&gt;
&lt;value&gt;&lt;string&gt;#ffffff&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;/struct&gt;&lt;/value&gt;
&lt;value&gt;&lt;struct&gt;
&lt;member&gt;&lt;name&gt;fgcolor&lt;/name&gt;
&lt;value&gt;&lt;string&gt;#efcfff&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;username&lt;/name&gt;
&lt;value&gt;&lt;string&gt;ljfresno&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;fullname&lt;/name&gt;
&lt;value&gt;&lt;string&gt;Fresno LJ users&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;type&lt;/name&gt;
&lt;value&gt;&lt;string&gt;community&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;bgcolor&lt;/name&gt;
&lt;value&gt;&lt;string&gt;#000000&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;/struct&gt;&lt;/value&gt;
&lt;value&gt;&lt;struct&gt;
&lt;member&gt;&lt;name&gt;fgcolor&lt;/name&gt;
&lt;value&gt;&lt;string&gt;#520155&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;username&lt;/name&gt;
&lt;value&gt;&lt;string&gt;webkin&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;fullname&lt;/name&gt;
&lt;value&gt;&lt;string&gt;Ellen Stafford&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;member&gt;&lt;name&gt;bgcolor&lt;/name&gt;
&lt;value&gt;&lt;string&gt;#fcddff&lt;/string&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;/struct&gt;&lt;/value&gt;
&lt;/data&gt;
&lt;/array&gt;&lt;/value&gt;
&lt;/member&gt;
&lt;/struct&gt;&lt;/value&gt;
&lt;/param&gt;
&lt;/params&gt;
&lt;/methodResponse&gt;
</exreturn>
</method>