Grss.FeedFormatter¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Grss.FeedFormatter(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
- add_item(item)¶
- Parameters:
item (
Grss.FeedItem
) – aGrss.FeedItem
to add into the self.
Adds a single
Grss.FeedItem
in the self.
- add_items(items)¶
- Parameters:
items ([
Grss.FeedItem
]) – a list ofGrss.FeedItems
to add into the self.
Adds a list of
Grss.FeedItems
in the self.
- format()¶
- Returns:
a string containing the plain text rappresentation of the given channel containing the given items.
- Return type:
Formats the assigned
Grss.FeedChannel
andGrss.FeedItems
into a plain text string, accordly to the currentGrss.FeedFormatter
instance.
- get_channel()¶
- Returns:
a
Grss.FeedChannel
, orNone
if none has been assigned.- Return type:
Gets the current
Grss.FeedChannel
assigned to the self.
- get_items()¶
- Returns:
a list of
Grss.FeedItems
, orNone
if none has been assigned.- Return type:
Gets the current
Grss.FeedItems
assigned to the self.
- reset()¶
Resets the status of the
Grss.FeedFormatter
, cleaning up the assignedGrss.FeedChannel
and relatedGrss.FeedItems
. This way self is ready to be used again with new data.
- set_channel(channel)¶
- Parameters:
channel (
Grss.FeedChannel
) – the referenceGrss.FeedChannel
for the self.
Inits the
Grss.FeedFormatter
with the given channel. AGrss.FeedFormatter
can format a singleGrss.FeedChannel
each time, but may be reused by callingGrss.FeedFormatter.reset
()
- do_format() virtual¶
- Returns:
a string containing the plain text rappresentation of the given channel containing the given items.
- Return type:
Formats the assigned
Grss.FeedChannel
andGrss.FeedItems
into a plain text string, accordly to the currentGrss.FeedFormatter
instance.