Follow

Atom Document Type

Overview

Provides the list of pages inside a single edition, with enhanced metadata for documents. The edition feed is based on Atom.

General

  • The file should be served with the mime-type application/atom+xml
  • The resource is requested every time a client downloads the edition, so should be cached
  • The resource should be protected if the edition is not freely available

Testing and Validation

  • Feeds should validate using the W3C Feed Validator, with the exception of the format of the IDs which are often not URIs in Pugpig feeds.

Fields 

Top Level Fields

PropertyOccursTypeDescription
atom:id 1 Tag URI Universal Unique Identifier of the edition. Should match the entries in the OPDS feed.
atom:link 1 URI This URL to this document (rel=“self” type=“application/atom+xml”)
atom:title 1 Text Title of the edition. Should match OPDS entry.
atom:subtititle 1 Text Subtitle of the edition. Required by Atom. Not used.
atom:author 0..1 Atom Author The author of the items in this edition. Should match OPDS entry.
atom:updated 1 Time stamp Time when this edition or its contents was last significant updated. Should match OPDS entry.
atom:entry 0..n Atom Entry An entry for each page in the edition.

 

Entry Fields

PropertyOccursTypeDescriptionExample
atom:id 1 Tag URI Universal Unique Identifier of the article. Should be a unique ID appended to the edition ID. <id>com.pugpig.edition01.page01</id>
atom:link (rel=“alternate” type=“text/html”) 1 URI A link to the HTML page that contains the contents of this page. <link type="text/html" href="index.html" rel="alternate"/>
atom:link (rel=“related” type=“text/cache-manifest”) 1 URI A link to the HTML5 manifest containing all of the assets needed to render this page. <link type="text/cache-manifest" href="pugpig.manifest" rel="related"/>
atom:link (rel=“bookmark” type=“text/html”) 1 URI A share link for email, twitter and facebook to an externalHTML page that contains the contents of the page being shared. <link type="text/html" href="http://mysite.com/page01.html" rel="bookmark"/>
atom:link (rel=“icon” type=“image/jpeg”) 1 URI A url to an image that can represent this page in, for example, a table of contents. <link type="image/png" href="myicon.png" rel="icon" title="Page Icon"/>
atom:title 1 Text Title of the article. <title>Best Article Title</title>
atom:author 1 * Atom Author The author of this item. Required unless the top level feed has an author. <author><name>Bob Smith</name></author>
atom:updated 1 Time stamp Time when this article was last significant updated. Used internally for caching. <updated>2022-08-01T00:00:00-07:00</updated>
atom:summary 1 Text Summary of the article. <summary type="text">A lovely page</summary>
atom:published 0..1 Time stamp Time when this article was first published. Exposed for display but not used internally. <published>2022-07-31T18:00:00-07:00</published>
atom:category /section 0..1 Text The name of the section in which the entry appears, for example “Latest News”. <category scheme="http://schema.pugpig.com/section" term="Business"/>
atom:category /pagetype 0..1 Text The type of the page, for example index page, article or product. <category scheme="http://schema.pugpig.com/pagetype" term="section_index"/>
atom:category /level 0..1 Integer The level of the entry should it appear in a hierarchical index. 1 is the top level <category scheme="http://schema.pugpig.com/level" term="1"/>
atom:category /access 0..1 Text The access of the page, is it protected (e.g paid for) or free <category scheme="http://schema.pugpig.com/access" term="protected"/>
atom:category /header_style 0..1 Text Used to theme elements in Pugpig Product applications <category scheme="http://schema.pugpig.com/header_style" term="display: image"/>
atom:category /toc_style 0..1 Text Used to theme or hide table of contents elements in Pugpig Product applications <category scheme="http://schema.pugpig.com/toc_style" term="color:#ffffff; hidden"/>
atom:category /custom_analytics 0..1 Text Used for custom analytics <category scheme="http://schema.pugpig.com/custom_analytics/ArticleCategoryData#39" term="Home"/>
atom:category /tag 0..1 Text Used for journey filters in Pugpig Product applications <category scheme="http://schema.pugpig.com/tag" term="Dubai"/>
atom:category /sharing_mode 0..1 Text Used to determine what is shared in native Pugpig Product applications. Options include: url, content, screenshot (semi-colon separated). Url is the default if nothing is supplied. <category scheme="http://schema.pugpig.com/sharing_mode" term="url;screenshot"/>

 

Atom Example

<feed xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app">
<id>Sample01</id>
<title>Sample Edition</title>
<subtitle>This is a sample edition with 3 entries</subtitle>
<updated>2013-09-12T00:12:00Z</updated>
<author>
   <name>John Doe</name>
</author>
<entry>
   <id>page01</id>
   <title>Latest Top Stories</title>
   <summary>This is the summary</summary>
   <updated>2013-09-12T00:12:00Z</updated>
   <published>2013-09-12T00:12:00</published>
   <link rel="alternate" type="text/html" href="sample_page01.html" />
   <link rel="related" type="text/cache-manifest" href="everything.manifest" />
   <category scheme="http://schema.pugpig.com/section" term="Top Stories" />
</entry>
<entry>
   <id>page02</id>
   <title>Pugpig Launched</title>
   <updated>2013-09-12T00:12:00Z</updated>
   <published>2013-09-12T00:12:00</published>
   <link rel="alternate" type="text/html" href="sample_page02.html" />
   <link rel="related" type="text/cache-manifest" href="everything.manifest" />
   <category scheme="http://schema.pugpig.com/section" term="News" />
</entry>
<entry>
   <id>page03</id>
   <title>Pugpig wins an award</title>
   <updated>2013-09-12T00:12:00Z</updated>
   <published>2013-09-12T00:12:00</published>
   <link rel="alternate" type="text/html" href="sample_page03.html" />
   <link rel="related" type="text/cache-manifest" href="everything.manifest" />
   <category scheme="http://schema.pugpig.com/section" term="News" />
</entry>

Note: A published feed should only show published posts, while a draft feed could show all posts.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk