Topic
  • No replies
SystemAdmin
SystemAdmin
17 Posts

Pinned topic Retrieving the new entries of an updated feed/API

‏2008-10-17T11:17:32Z |
iam fetching several ATOM feeds using java programming language................

in that process i encountered the below problem. Can anyone of you please inform me the direction in which i have to proceed.

An illustration of the problem

At 9:00 AM
Feed entries are
X
Y

At 9:10 AM
Feed entries are
a
b
c
X
Y
newly added entries are a,b,c

i read the feed at 9:00am and noted down the entries X,Y
after 10 minutes again i read the feed
using Etag (or) id method i detected that the feed has changed....................

now how to retrieve those newly added entries of a feed at 9:10 Am?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
i thought of following the below approach

at 9:00 Am notedown the id of latest entry...............................

at 9:10 Am (it is modified) read the feed entries until you get the entry who id is equal to the entry which we stored at 9:00Am These entries which we read here are newly added ones...............
is this the right approach to get the newly added entries of a feed?
(or) is there any efficient approach ?

--rama