fromRss2 static method
Implementation
static WebFeed fromRss2(RssFeed rssFeed) {
return WebFeed(
title: rssFeed.title ?? rssFeed.dc?.title ?? '',
description: rssFeed.description ?? rssFeed.dc?.description ?? '',
links: [rssFeed.link],
items: rssFeed.items
.map(
(item) => WebFeedItem(
title: item.title ?? item.dc?.title ?? '',
body: item.description ?? item.dc?.description ?? '',
updated: SafeParseDateTime.safeParse(item.pubDate) ??
SafeParseDateTime.safeParse(item.dc?.date),
links: [item.link],
),
)
.toList(),
);
}