»

friendof

friendof — Returns a list of which other LiveJournal users list this user as their friend.

Mode Description

Returns a list of which other LiveJournal users list this user as their friend.

Arguments

mode

The protocol request mode: friendof

user

Username. Leading and trailing whitespace is ignored, as is case.

auth_method

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.

password

DEPRECATED. Password in plain-text. For the default authentication method, either this needs to be sent, or hpassword.

hpassword

DEPRECATED. Alternative to plain-text password. Password as an MD5 hex digest. Not perfectly secure, but defeats the most simple of network sniffers.

auth_challenge

If using challenge / response authentication, this should be the challenge that was generated for your client.

auth_response

If using challenge / response authentication, this should be the response hash you generate based on the challenge's formula.

ver

(Optional) Protocol version supported by the client; assumed to be 0 if not specified. See Chapter 11: Protocol Versions for details on the protocol version.

friendoflimit

(Optional) 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.

Return Values

success

OK on success or FAIL when there's an error. When there's an error, see errmsg for the error text. The absence of this variable should also be considered an error.

errmsg

The error message if success was FAIL, not present if OK. 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.".

friendof_count

The number of records that will be returned. The records returned are named numerically, using a 1-based index. (1 .. friendof_count)

friendof_n_user

The nth user that lists this user as their friend.

friendof_n_name

The nth user's full name.

friendof_n_bg

The background color the nth user chose to represent the current user.

friendof_n_fg

The text color the nth user chose to represent the current user.

friendof_n_type

The account type of this user, if it's not a personal account. Currently the only possible value is "community", which means you're a member of that community.

friendof_n_status

The status of this user. If this field is absent, the user has a normal active account. Otherwise the currently possible values for this field are "deleted", "suspended" and "purged".