fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] dw_dev2011-01-01 12:55 pm

Updates to "checkfriends" protocol mode

Working on some long-overdue updates to the checkfriends protocol mode.

Changes not yet live on the site but should be for future code push, but here's the run down:


  • checkfriends no longer works. Instead, use checkforupdates.

  • required arguments to checkforupdates is only authentication information

  • optional argument lastupdate (in "0000-00-00 00:00:00" format). This is the last update time you have, from previous calls to checkforupdates

  • optional argument filter. This is the name of a content filter whose members you want to filter to.

  • return value: new: 1 or 0. 1 only if you pass in a lastupdate and there are new items since then. 0 in all other cases.

  • return value: interval: number of seconds before you can next check for updates. If you check before time expires, you'll get a cached value

  • return value: lastupdate: time someone last updated, in "0000-00-00 00:00:00" format



It's almost exactly the same as checkfriends; the only differences from the frontend are the name change, and replacing the mask argument with a filter argument because the trustmask is no longer relevant since we split up access and subscription.

ETA: Added preliminary documentation on the wiki.
dreamatdrew: An orange leopard gecko half hiding behind the leaf of a 'lucky bamboo' plant, looking directly at you. (Default)

Clarification

[personal profile] dreamatdrew 2011-01-01 05:29 am (UTC)(link)
Is 0000-00-00 YYYY-MM-DD or YYYY-DD-MM?
kareila: (Default)

Re: Clarification

[personal profile] kareila 2011-01-01 07:11 am (UTC)(link)
YYYY-MM-DD is the ISO standard.
alierak: (Default)

[personal profile] alierak 2011-01-01 01:12 pm (UTC)(link)
May I just say, I really really like the use of a filter name instead of mask value; clients should not have to care how filters are implemented inside the database...
kareila: (Default)

[personal profile] kareila 2011-01-01 05:01 pm (UTC)(link)
Using the mask value has the advantage of allowing one to express a combination of filters, but I suspect this wasn't actually used to that effect, and I agree that using the name makes things easier in other respects.
mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)

[staff profile] mark 2011-01-03 06:27 pm (UTC)(link)
+1