Financial-Times/next-user-preferences-api — pull request #22 by commuterjoy (2014-10-10 09:23:26+00:00)
Title: Notifications

/cc @adgad @railsagainstignorance

An API to add notifications to an individual users' queue. For the moment I've just allowed notifications against favourites.

So, for every favourite on the you can do to collect notifications,

curl -iX GET -H 'X-FT-UID: mattc' localhost:3000/user/notifications/google

(which will be empty), so then push a notification to that queue and do another GET and you should see an item in the queue.

curl -iX PUT -H 'X-FT-UID: mattc' -H 'Content-Type: application/json' -d '{"uuidv3":"google","item":"ce06f15a-4f90-11e4-908e-00144feab7de"}' localhost:3000/user/notifications

Clear the list (say, once the user has) visited the favourite -

curl -iX DELETE -H 'X-FT-UID: mattc' localhost:3000/user/notifications/google