editfriendgroups

editfriendgroups — Edit the user's defined groups of friends.

Mode Description

Given several optional lists, will add/delete/update/rename the friends groups for a user.

Arguments

  1. [struct](required)

    Containing keys:

    • username(required):

      • [scalar](required) Username of user logging in.

    • auth_method(optional):

      • [scalar](required) 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.

    • password(optional):

      • [scalar](required) Deprecated. Password of user logging in in plaintext. If using the "clear" authentication method, either this or "hpassword" must be present.

    • hpassword(optional):

      • [scalar](required) Deprecated. MD5 digest of user's password. Not much more secure than password, but at least it's not in plain text.

    • auth_challenge(optional):

      • [scalar](required) If using challenge-response authentication, this should be the challenge that was issued to you by the server.

    • auth_response(optional):

      • [scalar](required) If using challenge-response authentication, this should be the response hash that you generate, based on the formula required for your challenge.

    • ver(optional):

      • [scalar](required) Protocol version supported by the client; assumed to be 0 if not specified. See Chapter 27, Protocol Versions for details on the protocol version.

    • groupmasks(optional):

      • [struct](required) 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).

        Containing keys:

      • set(optional):

        • [struct](required) Given the bit of a friend group, the value contains a structure of information on it.

          Containing keys:

          • [struct](optional; multiple allowed)

            Containing keys:

            • name(required):

              • [scalar](required) Create or rename the friend group by sending this key. The value is the name of the group.

            • sort(optional):

              • [scalar](required) 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.

            • public(optional):

              • [scalar](required) 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.

      • delete(optional):

        • [array](required) Containing items:

          • [scalar](optional; multiple allowed) 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.

    Example 9. Sample call to LJ.XMLRPC.editfriendgroups

    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>
    


    Return Values

    1. [struct](required)

      Containing keys:

      Example 10. Sample return value for LJ.XMLRPC.editfriendgroups

      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>