558 def fetchn(self, feed, feedId, n, continuation=None):
559
560 if continuation is None:
561 apiUrl = '%s/stream/contents/%s?n=%d' % (READER_API, feedId, n)
562 else:
563 apiUrl = '%s/stream/contents/%s?n=%d&c=%s' % (READER_API, feedId, n,
564 continuation)
565
566 logging.info('fetching: %s' % apiUrl)
567 result = urlfetch.fetch(apiUrl)
568
569 if result.status_code == 200:
570 data = json.loads(result.content)
572 elif result.status_code == 401:
573 self.response.out.write('<pre>%s</pre>' % result.content)
574 else:
575 self.response.out.write(result.status_code)
576
577
def collectFeed(feed, data, continuation=None)