From fcd6d15b4c93e9c06015cbfc20eeeb7462560182 Mon Sep 17 00:00:00 2001 From: Kiel Gillard Date: Thu, 5 Dec 2019 18:54:47 +1100 Subject: [PATCH] Feedly articles report the crawled and recrawled date for the date published and updated values. --- .../TestGetPagedStreamContentsService.swift | 4 ++-- .../Feedly/TestGetStreamContentsService.swift | 4 ++-- .../Account/Feedly/Models/FeedlyEntry.swift | 16 ++++++++-------- .../Feedly/Models/FeedlyEntryParser.swift | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Frameworks/Account/AccountTests/Feedly/TestGetPagedStreamContentsService.swift b/Frameworks/Account/AccountTests/Feedly/TestGetPagedStreamContentsService.swift index 0cd88b443..6d56d218c 100644 --- a/Frameworks/Account/AccountTests/Feedly/TestGetPagedStreamContentsService.swift +++ b/Frameworks/Account/AccountTests/Feedly/TestGetPagedStreamContentsService.swift @@ -45,8 +45,8 @@ final class TestGetPagedStreamContentsService: FeedlyGetStreamContentsService { content: content, summary: content, author: nil, - published: Date(), - updated: nil, + crawled: Date(), + recrawled: nil, origin: origin, canonical: nil, alternate: nil, diff --git a/Frameworks/Account/AccountTests/Feedly/TestGetStreamContentsService.swift b/Frameworks/Account/AccountTests/Feedly/TestGetStreamContentsService.swift index 80bbe17ad..dd4636079 100644 --- a/Frameworks/Account/AccountTests/Feedly/TestGetStreamContentsService.swift +++ b/Frameworks/Account/AccountTests/Feedly/TestGetStreamContentsService.swift @@ -35,8 +35,8 @@ final class TestGetStreamContentsService: FeedlyGetStreamContentsService { content: content, summary: content, author: nil, - published: Date(), - updated: nil, + crawled: Date(), + recrawled: nil, origin: origin, canonical: nil, alternate: nil, diff --git a/Frameworks/Account/Feedly/Models/FeedlyEntry.swift b/Frameworks/Account/Feedly/Models/FeedlyEntry.swift index 8fefbb258..33a8d8c2d 100644 --- a/Frameworks/Account/Feedly/Models/FeedlyEntry.swift +++ b/Frameworks/Account/Feedly/Models/FeedlyEntry.swift @@ -34,17 +34,17 @@ struct FeedlyEntry: Decodable { /// the author’s name var author: String? -// /// the immutable timestamp, in ms, when this article was processed by the feedly Cloud servers. -// var crawled: Date -// -// // the timestamp, in ms, when this article was re-processed and updated by the feedly Cloud servers. -// var recrawled: Date? -// + /// the immutable timestamp, in ms, when this article was processed by the feedly Cloud servers. + var crawled: Date + + /// the timestamp, in ms, when this article was re-processed and updated by the feedly Cloud servers. + var recrawled: Date? + /// the timestamp, in ms, when this article was published, as reported by the RSS feed (often inaccurate). - var published: Date +// var published: Date /// the timestamp, in ms, when this article was updated, as reported by the RSS feed - var updated: Date? +// var updated: Date? /// the feed from which this article was crawled. If present, “streamId” will contain the feed id, “title” will contain the feed title, and “htmlUrl” will contain the feed’s website. var origin: FeedlyOrigin? diff --git a/Frameworks/Account/Feedly/Models/FeedlyEntryParser.swift b/Frameworks/Account/Feedly/Models/FeedlyEntryParser.swift index e7a1646b7..5db8b2c0c 100644 --- a/Frameworks/Account/Feedly/Models/FeedlyEntryParser.swift +++ b/Frameworks/Account/Feedly/Models/FeedlyEntryParser.swift @@ -53,11 +53,11 @@ struct FeedlyEntryParser { } var datePublished: Date { - return entry.published + return entry.crawled } var dateModified: Date? { - return entry.updated + return entry.recrawled } var authors: Set? {