From 4df5fc78dfe09bcd5aae7872b9cd9c4071e2bdf7 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Tue, 28 Jan 2014 12:22:55 -0800 Subject: [PATCH] Adding IFTTT meta data to new stories. --- apps/oauth/views.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/oauth/views.py b/apps/oauth/views.py index ff5f1912c..4caa66cc8 100644 --- a/apps/oauth/views.py +++ b/apps/oauth/views.py @@ -415,6 +415,10 @@ def api_unread_story(request, unread_score=None): "story_author": story['story_authors'], "story_date": story['story_date'], "story_score": score, + "ifttt": { + "id": story['story_hash'], + "timestamp": story['story_date'].strftime("%f") + }, }) return {"data": entries} @@ -447,6 +451,10 @@ def api_saved_story(request): "story_author": story['story_authors'], "story_date": story['story_date'], "saved_date": story['starred_date'], + "ifttt": { + "id": story['story_hash'], + "timestamp": story['story_date'].strftime("%f") + }, }) return {"data": entries} @@ -508,6 +516,10 @@ def api_shared_story(request): "story_author": story['story_authors'], "story_date": story['story_date'], "story_score": score, + "ifttt": { + "id": story['story_hash'], + "timestamp": story['story_date'].strftime("%f") + }, }) return {"data": entries}