Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Created and modified Dublin code attributes #27

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/domain/dublin_core/dublin_core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class DublinCore {
final String publisher;
final String contributor;
final String date;
final String created;
final String modified;
final String type;
final String format;
final String identifier;
Expand All @@ -26,6 +28,8 @@ class DublinCore {
this.publisher,
this.contributor,
this.date,
this.created,
this.modified,
this.type,
this.format,
this.identifier,
Expand All @@ -48,6 +52,8 @@ class DublinCore {
publisher: findElementOrNull(element, "dc:publisher")?.text,
contributor: findElementOrNull(element, "dc:contributor")?.text,
date: findElementOrNull(element, "dc:date")?.text,
created: findElementOrNull(element, "dc:created")?.text,
modified: findElementOrNull(element, "dc:modified")?.text,
type: findElementOrNull(element, "dc:type")?.text,
format: findElementOrNull(element, "dc:format")?.text,
identifier: findElementOrNull(element, "dc:identifier")?.text,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: webfeed
version: 0.4.2
version: 0.4.3
description: webfeed is a dart package for parsing RSS and Atom feeds. Media & DublinCore namespaces are also supported.
author: Wito Chandra <[email protected]>
homepage: https://github.com/witochandra/webfeed
Expand Down
2 changes: 2 additions & 0 deletions test/rss_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ void main() {
expect(feed.dc.publisher, "publisher");
expect(feed.dc.contributor, "contributor");
expect(feed.dc.date, "2000-01-01T12:00+00:00");
expect(feed.dc.created, "2000-01-01T12:00+00:00");
expect(feed.dc.modified, "2000-01-01T12:00+00:00");
expect(feed.dc.type, "type");
expect(feed.dc.format, "format");
expect(feed.dc.identifier, "identifier");
Expand Down
2 changes: 2 additions & 0 deletions test/xml/RSS-DC.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
<dc:publisher>publisher</dc:publisher>
<dc:contributor>contributor</dc:contributor>
<dc:date>2000-01-01T12:00+00:00</dc:date>
<dc:created>2000-01-01T12:00+00:00</dc:created>
<dc:modified>2000-01-01T12:00+00:00</dc:modified>
<dc:type>type</dc:type>
<dc:format>format</dc:format>
<dc:identifier>identifier</dc:identifier>
Expand Down