?

Log in

No account? Create an account
"checkfriends" protocol - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

"checkfriends" protocol [Feb. 9th, 2002|10:45 am]
LiveJournal Client Discussions
lj_clients
[ex_cerebrate131]
Is there an easy way to detect which friends group(s) have been updated when you're told that there are new entries, short of doing a round-robin poll of each possible "mask" value in turn?

(If not, I'd like to suggest adding one - even though it may require more work from the servers to answer the checkfriends request, it's still probably healthier than rendering the friends page n times as the user flicks through to see which group has been updated [OK, I'm assuming they're using a default view at this point, but I think that's a reasonable one.].)
linkReply

Comments:
[User Picture]From: freso
2002-02-09 06:43 am (UTC)
AFAIK there isn't (but then, I haven't really looked into it :P), but... if such thing is to be implemented, I'd suggest simply returning the username(s) of the friend(s) that was updated, that way, one could check the username against the friends groups to check which group the journal that was just updated belongs to... Just my 5/- :)
(Reply) (Thread)
[User Picture]From: sprote
2002-02-16 04:23 pm (UTC)
I asked once about extending the checkfriends command to do what you're saying, but people seemed reluctant to do anything that might slow it down.

When checkfriends returns 1, Journalert actually retrieves the main Friends page and parses through the HTML to locate the identity of the first [most recent] post. It's a bit of a kludge but it works quite reliably. This gets you the username and userpic, which you can then display in your client's UI.

I'm working on a more reliable and faster scheme which will retrieve the single latest friends entry using a custom LJ style which generates XML. This will cause less data to be sent, will be reliably parseable using a standard XML parser, and will provide the entire data of the post (subject, body, current music...) Once I have it working I'll post the info.
(Reply) (Thread)