||[Oct. 21st, 2004|08:19 pm]
LiveJournal Client Discussions
I am writing a widget for Konfabulator (mac app). The purpose of this widget is to watch my friend's groups and notify me when there has been an update to a group. Because all Macs running OSX have curl I have decided this will be my medium to grab information about wheather the friends group has been updated.|
This code works for getting the generic friends list from the command line in Terminal.
curl http://www.livejournal.com/interface/flat -s -A MacOSX%2DKonfabulator%20Widget%2F1%2E0%2E4 --connect-timeout 10 -b ljfastserver=1 -d mode=checkfriends -d user=[username] -d password=[password]
According to the documentation in order to look at a specific group all i need do is add the "mask" option with an unsigned int as it's value to bring up the group(as in my example below).
curl http://www.livejournal.com/interface/flat -s -A MacOSX%2DKonfabulator%20Widget%2F1%2E0%2E4 --connect-timeout 10 -b ljfastserver=1 -d mode=checkfriends -d user=username -d password=password -d mask=1
I would expect this second command to get me the last updated journal entry in group number 1 this sadly is not the case. What am I doing wrong?
Yep, now convert it back to decimal.
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, etc
So turning on bit 0 means mask = 1.
Turning on bit 1 means mask = 2.
Bit 2 is mask = 4.
If you want to check for posts in groups 2 and 5, you turn on bits 2 and 5, and end up with mask = 36.
could they have made it any more confusing? thanks, I get the picture now.
Thanks for you help, it's amazing how one answer allowed me to finish my Widget. If you are on a Mac I'm willing to share so you can use it. :-D Now I don't have to keep hitting refresh. :-)
Is your widget avaliable for download