getfriendgroups

getfriendgroups — Retrieves a list of the user's defined groups of friends.

Mode Description

Retrieves a list of the user's defined groups of friends.

Arguments

mode

The protocol request mode: getfriendgroups

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 27, Protocol Versions for details on the protocol version.

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 is not present, this variable most likely will not be either (in the case of a server error), and clients should just report "Server Error, try again later.".

frgrp_num_name

The name of the friend group with number num.

frgrp_num_sortorder

The sort-order of the friend group with number num. An integer value between 0 and 255.

frgrp_num_public

If this key is returned and its value is "1", then group num is a public group. (that is, other users can see the name of the group and who is in it)

frgrp_maxnum

The largest friend group number that was returned. This is not the number of friend groups returned, it is simply the upper bound. In other words, there may be holes as you iterate from 1 to frgrp_maxnum, so don't assume the presence of any key/value pairs returned. If this value is 0, however, you can safely assume there are no friend groups, as the minimum allowed friend group number is 1.