python-feedgen/api.entry.html

526 lines
36 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<title>feedgen.entry &#8212; python-feedgen 1.0.0 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/lernfunk.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="feedgen.util" href="api.util.html" />
<link rel="prev" title="feedgen.feed" href="api.feed.html" />
</head><body>
<div class="header" role="banner"><h1 class="heading"><a href="index.html">
<span>python-feedgen 1.0.0 documentation</span></a></h1>
<h2 class="heading"><span>feedgen.entry</span></h2>
</div>
<div class="topnav" role="navigation" aria-label="top navigation">
<p>
«&#160;&#160;<a href="api.feed.html">feedgen.feed</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="api.util.html">feedgen.util</a>&#160;&#160;»
</p>
</div>
<div class="content" role="main">
<script type=application/javascript src=_static/theme_extras.js></script>
<div class="apititle"><b>Contents</b></div>
<div class="apitoc"></div><span class="target" id="module-feedgen.entry"></span><section id="feedgen-entry">
<h1>feedgen.entry<a class="headerlink" href="#feedgen-entry" title="Permalink to this heading"></a></h1>
<dl class="field-list simple">
<dt class="field-odd">copyright<span class="colon">:</span></dt>
<dd class="field-odd"><p>2013-2020, Lars Kiesow &lt;<a class="reference external" href="mailto:lkiesow&#37;&#52;&#48;uos&#46;de">lkiesow<span>&#64;</span>uos<span>&#46;</span>de</a>&gt;</p>
</dd>
<dt class="field-even">license<span class="colon">:</span></dt>
<dd class="field-even"><p>FreeBSD and LGPL, see license.* for more details.</p>
</dd>
</dl>
</section>
<dl class="py class">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">feedgen.entry.</span></span><span class="sig-name descname"><span class="pre">FeedEntry</span></span><a class="headerlink" href="#feedgen.entry.FeedEntry" title="Permalink to this definition"></a></dt>
<dd><p>FeedEntry call representing an ATOM feeds entry node or an RSS feeds
item node.</p>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.atom_entry">
<span class="sig-name descname"><span class="pre">atom_entry</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">extensions</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.atom_entry" title="Permalink to this definition"></a></dt>
<dd><p>Create an ATOM entry and return it.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.author">
<span class="sig-name descname"><span class="pre">author</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">author</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">replace</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.author" title="Permalink to this definition"></a></dt>
<dd><p>Get or set author data. An author element is a dict containing a
name, an email address and a uri. Name is mandatory for ATOM, email is
mandatory for RSS.</p>
<p>This method can be called with:
- the fields of an author as keyword arguments
- the fields of an author as a dictionary
- a list of dictionaries containing the author fields</p>
<p>An author has the following fields:
- <em>name</em> conveys a human-readable name for the person.
- <em>uri</em> contains a home page for the person.
- <em>email</em> contains an email address for the person.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>author</strong> Dict or list of dicts with author data.</p></li>
<li><p><strong>replace</strong> Add or replace old data.</p></li>
</ul>
</dd>
</dl>
<p>Example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">author</span><span class="p">({</span><span class="s1">&#39;name&#39;</span><span class="p">:</span><span class="s1">&#39;John Doe&#39;</span><span class="p">,</span> <span class="s1">&#39;email&#39;</span><span class="p">:</span><span class="s1">&#39;jdoe@example.com&#39;</span><span class="p">})</span>
<span class="go">[{&#39;name&#39;:&#39;John Doe&#39;,&#39;email&#39;:&#39;jdoe@example.com&#39;}]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">author</span><span class="p">([{</span><span class="s1">&#39;name&#39;</span><span class="p">:</span> <span class="s1">&#39;Mr. X&#39;</span><span class="p">},</span> <span class="p">{</span><span class="s1">&#39;name&#39;</span><span class="p">:</span> <span class="s1">&#39;Max&#39;</span><span class="p">}])</span>
<span class="go">[{&#39;name&#39;:&#39;John Doe&#39;,&#39;email&#39;:&#39;jdoe@example.com&#39;},</span>
<span class="go"> {&#39;name&#39;:&#39;John Doe&#39;}, {&#39;name&#39;:&#39;Max&#39;}]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">author</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s1">&#39;John Doe&#39;</span><span class="p">,</span> <span class="n">email</span><span class="o">=</span><span class="s1">&#39;jdoe@example.com&#39;</span><span class="p">,</span> <span class="n">replace</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="go">[{&#39;name&#39;:&#39;John Doe&#39;,&#39;email&#39;:&#39;jdoe@example.com&#39;}]</span>
</pre></div>
</div>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.category">
<span class="sig-name descname"><span class="pre">category</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">category</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">replace</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.category" title="Permalink to this definition"></a></dt>
<dd><p>Get or set categories that the entry belongs to.</p>
<p>This method can be called with:
- the fields of a category as keyword arguments
- the fields of a category as a dictionary
- a list of dictionaries containing the category fields</p>
<p>A categories has the following fields:
- <em>term</em> identifies the category
- <em>scheme</em> identifies the categorization scheme via a URI.
- <em>label</em> provides a human-readable label for display</p>
<p>If a label is present it is used for the RSS feeds. Otherwise the term
is used. The scheme is used for the domain attribute in RSS.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>category</strong> Dict or list of dicts with data.</p></li>
<li><p><strong>replace</strong> Add or replace old data.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>List of category data.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.comments">
<span class="sig-name descname"><span class="pre">comments</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">comments</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.comments" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the value of comments which is the URL of the comments
page for the item. This is a RSS only value.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>comments</strong> URL to the comments page.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>URL to the comments page.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.content">
<span class="sig-name descname"><span class="pre">content</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">content</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">src</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.content" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the content of the entry which contains or links to the
complete content of the entry. Content must be provided for ATOM
entries if there is no alternate link, and should be provided if there
is no summary. If the content is set (not linked) it will also set
rss:description.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>content</strong> The content of the feed entry.</p></li>
<li><p><strong>src</strong> Link to the entries content.</p></li>
<li><p><strong>type</strong> If type is CDATA content would not be escaped.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Content element of the entry.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.contributor">
<span class="sig-name descname"><span class="pre">contributor</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">contributor</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">replace</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.contributor" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the contributor data of the feed. This is an ATOM only
value.</p>
<p>This method can be called with:
- the fields of an contributor as keyword arguments
- the fields of an contributor as a dictionary
- a list of dictionaries containing the contributor fields</p>
<p>An contributor has the following fields:
- <em>name</em> conveys a human-readable name for the person.
- <em>uri</em> contains a home page for the person.
- <em>email</em> contains an email address for the person.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>contributor</strong> Dictionary or list of dictionaries with contributor
data.</p></li>
<li><p><strong>replace</strong> Add or replace old data.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>List of contributors as dictionaries.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.description">
<span class="sig-name descname"><span class="pre">description</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">description</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">isSummary</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.description" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the description value which is the item synopsis.
Description is an RSS only element. For ATOM feeds it is split in
summary and content. The isSummary parameter can be used to control
which ATOM value is set when setting description.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>description</strong> Description of the entry.</p></li>
<li><p><strong>isSummary</strong> If the description should be used as content or
summary.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The entries description.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.enclosure">
<span class="sig-name descname"><span class="pre">enclosure</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">url</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">length</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.enclosure" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the value of enclosure which describes a media object
that is attached to the item. This is a RSS only value which is
represented by link(rel=enclosure) in ATOM. ATOM feeds can furthermore
contain several enclosures while RSS may contain only one. That is why
this method, if repeatedly called, will add more than one enclosures to
the feed. However, only the last one is used for RSS.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>url</strong> URL of the media object.</p></li>
<li><p><strong>length</strong> Size of the media in bytes.</p></li>
<li><p><strong>type</strong> Mimetype of the linked media.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Data of the enclosure element.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.guid">
<span class="sig-name descname"><span class="pre">guid</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">guid</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">permalink</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.guid" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the entries guid which is a string that uniquely
identifies the item. This will also set atom:id.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>guid</strong> Id of the entry.</p></li>
<li><p><strong>permalink</strong> If this is a permanent identifier for this item</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Id and permalink setting of the entry.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.id">
<span class="sig-name descname"><span class="pre">id</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.id" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the entry id which identifies the entry using a
universally unique and permanent URI. Two entries in a feed can have
the same value for id if they represent the same entry at different
points in time. This method will also set rss:guid with permalink set
to False. Id is mandatory for an ATOM entry.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>id</strong> New Id of the entry.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Id of the entry.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.link">
<span class="sig-name descname"><span class="pre">link</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">link</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">replace</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.link" title="Permalink to this definition"></a></dt>
<dd><p>Get or set link data. An link element is a dict with the fields
href, rel, type, hreflang, title, and length. Href is mandatory for
ATOM.</p>
<p>This method can be called with:
- the fields of a link as keyword arguments
- the fields of a link as a dictionary
- a list of dictionaries containing the link fields</p>
<p>A link has the following fields:</p>
<ul>
<li><p><em>href</em> is the URI of the referenced resource (typically a Web page)</p></li>
<li><p><em>rel</em> contains a single link relationship type. It can be a full URI,
or one of the following predefined values (default=alternate):</p>
<blockquote>
<div><ul class="simple">
<li><p><em>alternate</em> an alternate representation of the entry or feed, for
example a permalink to the html version of the entry, or the
front page of the weblog.</p></li>
<li><p><em>enclosure</em> a related resource which is potentially large in size
and might require special handling, for example an audio or video
recording.</p></li>
<li><p><em>related</em> an document related to the entry or feed.</p></li>
<li><p><em>self</em> the feed itself.</p></li>
<li><p><em>via</em> the source of the information provided in the entry.</p></li>
</ul>
</div></blockquote>
</li>
<li><p><em>type</em> indicates the media type of the resource.</p></li>
<li><p><em>hreflang</em> indicates the language of the referenced resource.</p></li>
<li><p><em>title</em> human readable information about the link, typically for
display purposes.</p></li>
<li><p><em>length</em> the length of the resource, in bytes.</p></li>
</ul>
<p>RSS only supports one link with nothing but a URL. So for the RSS link
element the last link with rel=alternate is used.</p>
<p>RSS also supports one enclusure element per entry which is covered by
the link element in ATOM feed entries. So for the RSS enclusure element
the last link with rel=enclosure is used.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>link</strong> Dict or list of dicts with data.</p></li>
<li><p><strong>replace</strong> Add or replace old data.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>List of link data.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.load_extension">
<span class="sig-name descname"><span class="pre">load_extension</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">atom</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rss</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.load_extension" title="Permalink to this definition"></a></dt>
<dd><p>Load a specific extension by name.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>name</strong> Name of the extension to load.</p></li>
<li><p><strong>atom</strong> If the extension should be used for ATOM feeds.</p></li>
<li><p><strong>rss</strong> If the extension should be used for RSS feeds.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.pubDate">
<span class="sig-name descname"><span class="pre">pubDate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">pubDate</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.pubDate" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the pubDate of the entry which indicates when the entry
was published. This method is just another name for the published(…)
method.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.pubdate">
<span class="sig-name descname"><span class="pre">pubdate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">pubDate</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.pubdate" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the pubDate of the entry which indicates when the entry
was published. This method is just another name for the published(…)
method.</p>
<p>pubdate(…) is deprecated and may be removed in feedgen ≥ 0.8. Use
pubDate(…) instead.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.published">
<span class="sig-name descname"><span class="pre">published</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">published</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.published" title="Permalink to this definition"></a></dt>
<dd><p>Set or get the published value which contains the time of the
initial creation or first availability of the entry.</p>
<p>The value can either be a string which will automatically be parsed or
a datetime.datetime object. In any case it is necessary that the value
include timezone information.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>published</strong> The creation date.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Creation date as datetime.datetime</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.register_extension">
<span class="sig-name descname"><span class="pre">register_extension</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">namespace</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">extension_class_entry</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">atom</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rss</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.register_extension" title="Permalink to this definition"></a></dt>
<dd><p>Register a specific extension by classes to a namespace.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>namespace</strong> namespace for the extension</p></li>
<li><p><strong>extension_class_entry</strong> Class of the entry extension to load.</p></li>
<li><p><strong>atom</strong> If the extension should be used for ATOM feeds.</p></li>
<li><p><strong>rss</strong> If the extension should be used for RSS feeds.</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.rights">
<span class="sig-name descname"><span class="pre">rights</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rights</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.rights" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the rights value of the entry which conveys information
about rights, e.g. copyrights, held in and over the entry. This ATOM
value will also set rss:copyright.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>rights</strong> Rights information of the feed.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Rights information of the feed.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.rss_entry">
<span class="sig-name descname"><span class="pre">rss_entry</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">extensions</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.rss_entry" title="Permalink to this definition"></a></dt>
<dd><p>Create a RSS item and return it.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.source">
<span class="sig-name descname"><span class="pre">source</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">url</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">title</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.source" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the source for the current feed entry.</p>
<p>Note that ATOM feeds support a lot more sub elements than title and URL
(which is what RSS supports) but these are currently not supported.
Patches are welcome.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>url</strong> Link to the source.</p></li>
<li><p><strong>title</strong> Title of the linked resource</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Source element as dictionaries.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.summary">
<span class="sig-name descname"><span class="pre">summary</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">summary</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.summary" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the summary element of an entry which conveys a short
summary, abstract, or excerpt of the entry. Summary is an ATOM only
element and should be provided if there either is no content provided
for the entry, or that content is not inline (i.e., contains a src
attribute), or if the content is encoded in base64. This method will
also set the rss:description field if it wasnt previously set or
contains the old value of summary.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>summary</strong> Summary of the entries contents.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Summary of the entries contents.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.title">
<span class="sig-name descname"><span class="pre">title</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">title</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.title" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the title value of the entry. It should contain a human
readable title for the entry. Title is mandatory for both ATOM and RSS
and should not be blank.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>title</strong> The new title of the entry.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The entriess title.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.ttl">
<span class="sig-name descname"><span class="pre">ttl</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ttl</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.ttl" title="Permalink to this definition"></a></dt>
<dd><p>Get or set the ttl value. It is an RSS only element. ttl stands for
time to live. Its a number of minutes that indicates how long a
channel can be cached before refreshing from the source.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>ttl</strong> Integer value representing the time to live.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Time to live of of the entry.</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="feedgen.entry.FeedEntry.updated">
<span class="sig-name descname"><span class="pre">updated</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">updated</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#feedgen.entry.FeedEntry.updated" title="Permalink to this definition"></a></dt>
<dd><p>Set or get the updated value which indicates the last time the entry
was modified in a significant way.</p>
<p>The value can either be a string which will automatically be parsed or
a datetime.datetime object. In any case it is necessary that the value
include timezone information.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>updated</strong> The modification date.</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>Modification date as datetime.datetime</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<div class="bottomnav" role="navigation" aria-label="bottom navigation">
<p>
«&#160;&#160;<a href="api.feed.html">feedgen.feed</a>
&#160;&#160;::&#160;&#160;
<a class="uplink" href="index.html">Contents</a>
&#160;&#160;::&#160;&#160;
<a href="api.util.html">feedgen.util</a>&#160;&#160;»
</p>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2013-2016, Lars Kiesow.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
</div>
</body>
</html>