Grss.FeedItem¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Grss.FeedItem(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(parent)¶
- Parameters:
parent (
Grss.FeedChannel
) – the feed from which the new item belongs.- Returns:
a new
Grss.FeedItem
.- Return type:
To allocate a new empty
Grss.FeedItem
.
- add_category(category)¶
- Parameters:
category (
str
) – a new category to assign to the item.
Adds a category to the self. The complete list can be obtained with
Grss.FeedItem.get_categories
().
- add_contributor(contributor)¶
- Parameters:
contributor (
Grss.Person
) – aGrss.Person
.
To add a contributor to the self.
- add_enclosure(enclosure)¶
- Parameters:
enclosure (
Grss.FeedEnclosure
) – aGrss.FeedEnclosure
to add to the item.
Adds an enclosure to the self. That external elements may be references to images, videos, or other contents (usually multimedial) embedded in the element.
- get_author()¶
- Returns:
Grss.Person
, orNone
.- Return type:
Retrieves the author of self.
- get_categories()¶
- Returns:
list of strings, one for assigned category. Do not free or modify this list.
- Return type:
[
str
]
Retrieves list of categories assigned to the self.
- get_comments_url()¶
-
Retrieves the URL where to catch comments to the self.
- get_contributors()¶
- Returns:
list of contributors to the item.
- Return type:
Retrieves contributors for self.
- get_copyright()¶
-
Retrieves copyright reference for the self.
- get_description()¶
- Returns:
description of self.
- Return type:
Retrieves the description of the self.
- get_enclosures()¶
- Returns:
a list of
Grss.FeedEnclosure
. This is a direct reference to the internal list, do not free or modify it.- Return type:
Retrieves the list of enclosures added with
Grss.FeedItem.add_enclosure
().
- get_geo_point(latitude, longitude)¶
- Parameters:
- Returns:
True
if self has geographic coordinates assigned and latitude and longitude have been set,False
if self has not geo reference.- Return type:
Retrieves the geo reference of the self.
- get_id()¶
- Returns:
ID of the item.
- Return type:
Retrieves the ID assigned to the self. If no ID was set with
Grss.FeedItem.set_id
() this returns the same ofGrss.FeedItem.get_source
(). Pay attention to the fact this library do not check uniqueness of assigned IDs.
- get_parent()¶
- Returns:
the parent feed, as set in
Grss.FeedItem.new
().- Return type:
Retrieves the feed from which the item belongs.
- get_publish_time()¶
- Returns:
publish time of self.
- Return type:
Retrieves the publish time of the item. By default this value is the current timestamp assigned when creating the
Grss.FeedItem
, and may be changed withGrss.FeedItem.set_publish_time
().
- get_real_source(realsource, title)¶
- Parameters:
Retrieves references to the real source of self.
- get_source()¶
-
Retrieves the URL where the self can be found.
- set_author(author)¶
- Parameters:
author (
Grss.Person
) – aGrss.Person
.
To assign an author to the self.
- set_comments_url(url)¶
- Parameters:
url (
str
) – URL where to retrieve comments to the item.- Returns:
- Return type:
To assign the URL where to fetch comments for the item.
- set_copyright(copyright)¶
- Parameters:
copyright (
str
) – copyright declaration for the item.
To set a copyright reference to self.
- set_description(description)¶
- Parameters:
description (
str
) – content of the item.
To set the description of self. Usually “description” means his content.
- set_geo_point(latitude, longitude)¶
- Parameters:
To assign geographic context to the self. Passing -1 as latitude or longitude, the relative value is untouched in the object. This is to easy assignment of coordinates in more than a single step. If both are -1, nothing happens.
- set_id(id)¶
- Parameters:
id (
str
) – the new ID to set.
To set the ID of the self. This parameter has not a particular format: it is just a string used to identify in unique way the item.
- set_publish_time(publish)¶
- Parameters:
publish (
int
) – publishing timestamp of the item.
To set the publish time of the item.
- set_real_source(realsource, title)¶
- Parameters:
- Returns:
- Return type:
To set an alternative real source for self. This parameter is used by web aggregators to explicit the origin of a content reproduced in them.
- Parameters:
related (
str
) – reference to a related post.
To set reference to a post related to self.