LJ.XMLRPC.checkfriends
This method polls the server to see if the current user’s friends list has been updated. This is the preferred way to see when a friends list is updated as it is very fast and very lightweight.
Parameters
- LiveJournal’s Common Request Parameters
- lastupdate - 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.
- mask: 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.
Return Value
About Masks
Masks can be used to filter and constrain requests to one or more of the 30 groups that a user is permitted to belong to. A mask is represented by a 32-bit unsigned integer, where each bit filters by a specific group with the corresponding group id. The following tables illustrates how the bit mask works:
| Bit # | Description |
|---|---|
| 0 | Filters by user’s friends |
| 1 | Filters by group id of 1 |
| 2 | Filters by group id of 2 |
| 3 | Filters by group id of 3 |
| 4..30 | Filters by group id of 4 to 30 respectively |
| 31 | Reserved |
For example, the integer “1000” converts to the following binary number “1111101000”. As you can see, this binary number has bits 3, 5, 6, 7, 8 and 9 turned on. This translates to a mask that will result in filtering out all friend groups except groups with ids 3, 5, 6, 7, 8 and 9.
To determine the group ids of your personal friend groups see getfreidngroups.
