diff options
author | 2019-02-03 20:56:41 +0100 | |
---|---|---|
committer | 2019-02-03 20:56:41 +0100 | |
commit | 394149b1147d8e5e4339635b21f8627e375d22ac (patch) | |
tree | a1359a56d7a5fc9bdf4dd6127e8f2bee11483253 /tests | |
parent | a29512deee9c39dcf537d0cac84a4866fc71923c (diff) | |
download | rss-bridge-394149b1147d8e5e4339635b21f8627e375d22ac.tar.gz rss-bridge-394149b1147d8e5e4339635b21f8627e375d22ac.tar.zst rss-bridge-394149b1147d8e5e4339635b21f8627e375d22ac.zip |
core: Add item uid (#1017)
'uid' represents the unique id for a feed item. This item is null by
default and can be set to any string value. The provided string value
is always hashed to sha1 to make it the same length in all cases.
References #977, #1005
Diffstat (limited to 'tests')
-rw-r--r-- | tests/samples/expectedAtomFormat/feed.common.xml | 2 | ||||
-rw-r--r-- | tests/samples/expectedJsonFormat/feed.common.json | 2 | ||||
-rw-r--r-- | tests/samples/feed.common.json | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/tests/samples/expectedAtomFormat/feed.common.xml b/tests/samples/expectedAtomFormat/feed.common.xml index 0d696c03..80cb0df4 100644 --- a/tests/samples/expectedAtomFormat/feed.common.xml +++ b/tests/samples/expectedAtomFormat/feed.common.xml @@ -57,7 +57,7 @@ <title type="html">Atom draft-07 snapshot</title> <published>2005-07-31T12:29:29+00:00</published> <updated>2005-07-31T12:29:29+00:00</updated> - <id>http://example.org/2005/04/02/atom</id> + <id>urn:sha1:dd6b6c920d3b340ab9e07faf6682f2a7c4f70134</id> <link href="http://example.org/2005/04/02/atom" rel="alternate" type="text/html"/> <author> <name>Mark Pilgrim</name> diff --git a/tests/samples/expectedJsonFormat/feed.common.json b/tests/samples/expectedJsonFormat/feed.common.json index 5a0e1b5a..0b3e97b0 100644 --- a/tests/samples/expectedJsonFormat/feed.common.json +++ b/tests/samples/expectedJsonFormat/feed.common.json @@ -26,7 +26,7 @@ }, "content_html": "<p>We — Manton Reece and Brent Simmons — have noticed that JSON has become the developers’ choice for APIs, and that developers will often go out of their way to avoid XML. JSON is simpler to read and write, and it’s less prone to bugs.</p>\n\n<p>So we developed JSON Feed, a format similar to <a href=\"http://cyber.harvard.edu/rss/rss.html\">RSS</a> and <a href=\"https://tools.ietf.org/html/rfc4287\">Atom</a> but in JSON. It reflects the lessons learned from our years of work reading and publishing feeds.</p>\n\n<p><a href=\"https://jsonfeed.org/version/1\">See the spec</a>. It’s at version 1, which may be the only version ever needed. If future versions are needed, version 1 feeds will still be valid feeds.</p>\n\n<h4>Notes</h4>\n\n<p>We have a <a href=\"https://github.com/manton/jsonfeed-wp\">WordPress plugin</a> and, coming soon, a JSON Feed Parser for Swift. As more code is written, by us and others, we’ll update the <a href=\"https://jsonfeed.org/code\">code</a> page.</p>\n\n<p>See <a href=\"https://jsonfeed.org/mappingrssandatom\">Mapping RSS and Atom to JSON Feed</a> for more on the similarities between the formats.</p>\n\n<p>This website — the Markdown files and supporting resources — <a href=\"https://github.com/brentsimmons/JSONFeed\">is up on GitHub</a>, and you’re welcome to comment there.</p>\n\n<p>This website is also a blog, and you can subscribe to the <a href=\"https://jsonfeed.org/xml/rss.xml\">RSS feed</a> or the <a href=\"https://jsonfeed.org/feed.json\">JSON feed</a> (if your reader supports it).</p>\n\n<p>We worked with a number of people on this over the course of several months. We list them, and thank them, at the bottom of the <a href=\"https://jsonfeed.org/version/1\">spec</a>. But — most importantly — <a href=\"http://furbo.org/\">Craig Hockenberry</a> spent a little time making it look pretty. :)</p>" },{ - "id": "http://example.org/2005/04/02/atom", + "id": "dd6b6c920d3b340ab9e07faf6682f2a7c4f70134", "url": "http://example.org/2005/04/02/atom", "title": "Atom draft-07 snapshot", "date_modified": "2005-07-31T12:29:29+00:00", diff --git a/tests/samples/feed.common.json b/tests/samples/feed.common.json index be0c56a9..080ba01a 100644 --- a/tests/samples/feed.common.json +++ b/tests/samples/feed.common.json @@ -25,6 +25,7 @@ "content": "<p>We — Manton Reece and Brent Simmons — have noticed that JSON has become the developers’ choice for APIs, and that developers will often go out of their way to avoid XML. JSON is simpler to read and write, and it’s less prone to bugs.</p>\n\n<p>So we developed JSON Feed, a format similar to <a href=\"http://cyber.harvard.edu/rss/rss.html\">RSS</a> and <a href=\"https://tools.ietf.org/html/rfc4287\">Atom</a> but in JSON. It reflects the lessons learned from our years of work reading and publishing feeds.</p>\n\n<p><a href=\"https://jsonfeed.org/version/1\">See the spec</a>. It’s at version 1, which may be the only version ever needed. If future versions are needed, version 1 feeds will still be valid feeds.</p>\n\n<h4>Notes</h4>\n\n<p>We have a <a href=\"https://github.com/manton/jsonfeed-wp\">WordPress plugin</a> and, coming soon, a JSON Feed Parser for Swift. As more code is written, by us and others, we’ll update the <a href=\"https://jsonfeed.org/code\">code</a> page.</p>\n\n<p>See <a href=\"https://jsonfeed.org/mappingrssandatom\">Mapping RSS and Atom to JSON Feed</a> for more on the similarities between the formats.</p>\n\n<p>This website — the Markdown files and supporting resources — <a href=\"https://github.com/brentsimmons/JSONFeed\">is up on GitHub</a>, and you’re welcome to comment there.</p>\n\n<p>This website is also a blog, and you can subscribe to the <a href=\"https://jsonfeed.org/xml/rss.xml\">RSS feed</a> or the <a href=\"https://jsonfeed.org/feed.json\">JSON feed</a> (if your reader supports it).</p>\n\n<p>We worked with a number of people on this over the course of several months. We list them, and thank them, at the bottom of the <a href=\"https://jsonfeed.org/version/1\">spec</a>. But — most importantly — <a href=\"http://furbo.org/\">Craig Hockenberry</a> spent a little time making it look pretty. :)</p>" },{ "uri": "http://example.org/2005/04/02/atom", + "uid": "tag:example.org,2003:3.2397", "title": "Atom draft-07 snapshot", "timestamp": 1122812969, "author": "Mark Pilgrim", |