Well it appears there are two methods to do this. The first is straight forward. Lets try it...
After all feeds have been processed, make a GET
request to "http://www.google.com/reader/atom/user/-/state/com.google/reading-list?n=1" and from the received XML(see Reference Feed structure) extract the feed id and timestamp values.
to "http://www.google.com/reader/api/0/mark-all-as-read" with the data "s=<Feed ID>&ts=<TimeStamp in microseconds>&T=<token>" (may need to URI encode values)
Note that this must be done AFTER the articles have been processed/saved as they cannot be downloaded again after successfully marking all as read. If possible, do it after the ebook as been generated and saved successfully so that conversion or other external errors done mess this up.
Reference Feed structure
To get the Feed ID:
read value at <feed><id>[VALUE]<id>....</feed>
XPATH = //feed/id
To get the Time Stamp:
read value at
Note 1: we only need the time stamp of the FIRST <entry>
Note 2: The value in the feeds is in millisecond but for the "mark-all-as-read" we need microsecond. So to get the right value do this: Microsecond_Time_Stamp = ((MiliSecond_Time_Stamp + 1) * 1000) -1
To get Token value
Execute a GET request for "http://www.google.com/reader/api/0/token" and read the response. it is a 57 chars string.
Final Note 1: All and any requests must include the "Authorization=GoogleLogin auth=<AUTH TOKEN>" header.
if this doesnt work then we will have to try the other method that will be more complicated as low performing. I.e. mark individual items as read.