Grss.FeedChannel¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Grss.FeedChannel(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
- Return type:
Allocates a new
Grss.FeedChannel
.
- classmethod new_from_file(path)¶
- Parameters:
path (
str
) – path of the file to parse.- Raises:
- Returns:
a
Grss.FeedChannel
, orNone
if the file in path is not a valid document.- Return type:
Allocates a new
Grss.FeedChannel
and init it with contents found in specified file.
- classmethod new_from_memory(data)¶
- Parameters:
data (
str
) – string to parse.- Raises:
- Returns:
a
Grss.FeedChannel
, orNone
if an error occurs.- Return type:
Allocates a new
Grss.FeedChannel
and init it with contents found in specified memory block.
- classmethod new_from_xml(doc)¶
- Parameters:
doc (
libxml2.DocPtr
) – an XML document previously parsed with libxml2.- Raises:
- Returns:
a
Grss.FeedChannel
, orNone
if an error occurs.- Return type:
Allocates a new
Grss.FeedChannel
and init it with contents found in specified XML document.
- classmethod new_with_source(source)¶
- Parameters:
source (
str
) – URL of the feed.- Returns:
- Return type:
Allocates a new
Grss.FeedChannel
and assign it the given remote source.
- add_contributor(contributor)¶
- Parameters:
contributor (
Grss.Person
) – aGrss.Person
.
To add a contributor to the self.
- add_cookie(cookie)¶
- Parameters:
cookie (
Soup.Cookie
) – HTML cookie to add to theGrss.FeedChannel
's cookie jar
To add a cookie related to the self, will be involved in HTTP sessions while fetching it. More cookie can be added to every
Grss.FeedChannel
- fetch()¶
-
Utility to fetch and populate a
Grss.FeedChannel
for the first time, and init all his internal values. Only the source URL has to be set in self (withGrss.FeedChannel.set_source
()). Be aware this function is sync, do not returns until the feed isn’t downloaded and parsed.
- fetch_all()¶
- Raises:
- Returns:
a
GLib.List
ofGrss.FeedItem
, to be completely unreferenced and freed when no longer in use, orNone
if an error occurs.- Return type:
Utility to fetch and populate a
Grss.FeedChannel
, and retrieve all its items.
- fetch_all_async(callback, *user_data)¶
- Parameters:
callback (
Gio.AsyncReadyCallback
orNone
) – function to invoke at the end of the download.
Similar to
Grss.FeedChannel.fetch_all
(), but asyncronous.
- fetch_all_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – theGio.AsyncResult
passed to the callback.- Raises:
- Returns:
list of items fetched from the
Grss.FeedChannel
, orNone
if error is set. The list (and contained items) is freed at the end of the callback- Return type:
Finalizes an asyncronous operation started with
Grss.FeedChannel.fetch_all_async
().
- fetch_async(callback, *user_data)¶
- Parameters:
callback (
Gio.AsyncReadyCallback
orNone
) – function to invoke at the end of the download.
Similar to
Grss.FeedChannel.fetch
(), but asyncronous.
- fetch_cancel()¶
- Returns:
True
if a fetch was scheduled (and now cancelled),False
if this function had nothing to do- Return type:
If a fetch operation was scheduled with
Grss.FeedChannel.fetch_async
() orGrss.FeedChannel.fetch_all_async
(), cancel it.
- fetch_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – theGio.AsyncResult
passed to the callback.- Raises:
- Returns:
True
if self informations have been successfully fetched,False
otherwise.- Return type:
Finalizes an asyncronous operation started with
Grss.FeedChannel.fetch_async
().
- get_category()¶
-
Retrieves category of the self.
- get_contributors()¶
- Returns:
list of contributors to the channel, or
None
.- Return type:
Retrieves reference to the contributors of the self.
- get_cookies()¶
- Returns:
list of cookies to the channel, or
None
.- Return type:
Retrieves reference to the HTML cookies of the self. The list and the individual cookies should all be freed after use. You can use soup_cookies_free.
- get_copyright()¶
-
Retrieves indications about the copyright.
- get_description()¶
-
Retrieves the description of self.
- get_editor()¶
- Returns:
Grss.Person
, orNone
.- Return type:
Retrieves reference to the editor or the self.
- get_generator()¶
-
Retrieves information about the feed’s software generator.
- get_gzip_compression()¶
-
GZIP compression of the channel is either on or off.
- get_homepage()¶
-
Retrieves the homepage of the site for which self is the feed.
- get_icon()¶
-
Retrieves URL of the favicon of the channel (and/or the website for which this is the feed).
- get_image()¶
-
Retrieves the URL of the image assigned to the channel.
- get_language()¶
-
Retrieves the language of the self.
- get_publish_time()¶
- Returns:
time of feed’s publish.
- Return type:
Retrieves the publishing time of self.
- get_pubsubhub(hub)¶
- Parameters:
- Returns:
True
if a valid PubSubHubbub hub has been set for the self,False
otherwise.- Return type:
Retrieves information about the PubSubHubbub hub of the channel.
- get_rsscloud(path, protocol)¶
- Parameters:
- Returns:
True
if a valid RSSCloud path has been set for the self,False
otherwise.- Return type:
Retrieves information about the RSSCloud coordinates of the channel.
- get_update_interval()¶
- Returns:
update interval for the self, in minutes.
- Return type:
Retrieves the update interval for the feed. Pay attention to the fact the value can be unset, and the function returns 0: in this case the caller must manually set a default update interval with
Grss.FeedChannel.set_update_interval
().
- get_update_time()¶
- Returns:
time of the feed’s latest update. If this value was not set (with
Grss.FeedChannel.set_update_time
()) returnsGrss.FeedChannel.get_publish_time
().- Return type:
Retrieves the update time of self.
- get_webmaster()¶
-
Retrieves reference to the webmaster of the feed.
- set_category(category)¶
- Parameters:
category (
str
) – category of the feed.
To set the category of the self.
- set_copyright(copyright)¶
- Parameters:
copyright (
str
) – copyright of the channel.
To set the copyright of the feed.
- set_description(description)¶
- Parameters:
description (
str
) – description of the feed.
To set the description of self.
- set_editor(editor)¶
- Parameters:
editor (
Grss.Person
) – aGrss.Person
.
To set the editor of the self.
- set_format(format)¶
- Parameters:
format (
str
) – format of the file, such as “application/atom+xml” or “application/rss+xml”.
To assign a file format to the feed.
- set_generator(generator)¶
- Parameters:
generator (
str
) – software generator of the feed.
To set information about the software generator of self.
- set_gzip_compression(value)¶
-
Set the GZIP compression for the channel to on or off.
- set_homepage(homepage)¶
- Parameters:
homepage (
str
) – homepage for the main website.- Returns:
- Return type:
To set the homepage of the site the self belongs.
- set_icon(icon)¶
- Parameters:
icon (
str
) – URL where to retrieve the favicon.- Returns:
- Return type:
To set the URL of the icon rappresenting self.
- set_image(image)¶
- Parameters:
image (
str
) – URL of the image.- Returns:
- Return type:
To set a rappresentative image to self.
- set_language(language)¶
- Parameters:
language (
str
) – string holding the language of the feed.
To set the language of self.
- set_publish_time(publish)¶
- Parameters:
publish (
int
) – timestamp of publishing.
To set the time of publishing for the feed.
- set_pubsubhub(hub)¶
- Parameters:
- Returns:
- Return type:
To set information about PubSubHubbub for the channel. To unset the hub, pass
None
as parameter.
- set_rsscloud(path, protocol)¶
- Parameters:
To set information about RSSCloud notifications for the channel.
- set_source(source)¶
- Parameters:
source (
str
) – URL of the feed.- Returns:
- Return type:
To assign the URL where to fetch the feed.
- set_update_interval(minutes)¶
- Parameters:
minutes (
int
) – update interval, in minutes.
To set the update interval for self.