Class: QgsNewsFeedParser¶
Parser for published QGIS news feeds.
This class is designed to work with the specialized QGIS news feed API. See https://github.com/elpaso/qgis-feed.
Added in version 3.10.
Class Hierarchy¶
Base classes¶
Methods
Returns the authentication configuration for the parser.  | 
|
Dismisses all current news items.  | 
|
Dismisses an entry with matching key.  | 
|
Returns a list of existing entries in the feed.  | 
|
Fetches new entries from the feed's URL.  | 
Static Methods
Returns the settings key used for a feed with the given baseUrl.  | 
Signals
Emitted whenever a new entry is available from the feed (as a result of a call to   | 
|
Emitted whenever an entry is dismissed (as a result of a call to   | 
|
Emitted whenever an existing entry is available from the feed (as a result of a call to   | 
|
Emitted when entries have been fetched from the feed.  | 
|
Emitted when the image attached to the entry with the specified key has been fetched and is now available.  | 
- class qgis.core.QgsNewsFeedParser[source]¶
 Bases:
QObject- __init__(feedUrl: QUrl, authcfg: str | None = '', parent: QObject | None = None)
 Constructor for QgsNewsFeedParser, parsing the specified
feedUrl.The optional
authcfgargument can be used to specify an authentication configuration to use when connecting to the feed.- Parameters:
 feedUrl (QUrl)
authcfg (Optional[str] = '')
parent (Optional[QObject] = None)
- class Entry[source]¶
 Bases:
objectRepresents a single entry from a news feed.
Added in version 3.10.
- content¶
 HTML content of news entry
- expiry¶
 Optional auto-expiry time for entry
- image¶
 Optional image data
- imageUrl¶
 Optional URL for image associated with entry
- key¶
 Unique entry identifier
- link¶
 Optional URL link for entry
- sticky¶
 Trueif entry is “sticky” and should always be shown at the top
- title¶
 Entry title
- authcfg(self) str[source]¶
 Returns the authentication configuration for the parser.
- Return type:
 str
- dismissEntry(self, key: int)[source]¶
 Dismisses an entry with matching
key.This removes the entry from the local store, ensuring it will never be present again.
See also
- Parameters:
 key (int)
- entries(self) List[QgsNewsFeedParser.Entry]¶
 Returns a list of existing entries in the feed.
- Return type:
 List[QgsNewsFeedParser.Entry]
- signal entryAdded(entry: QgsNewsFeedParser.Entry)[source]¶
 Emitted whenever a new
entryis available from the feed (as a result of a call tofetch()).See also
- Parameters:
 entry (QgsNewsFeedParser.Entry)
- signal entryDismissed(entry: QgsNewsFeedParser.Entry)[source]¶
 Emitted whenever an
entryis dismissed (as a result of a call todismissEntry()).See also
- Parameters:
 entry (QgsNewsFeedParser.Entry)
- signal entryUpdated(entry: QgsNewsFeedParser.Entry)[source]¶
 Emitted whenever an existing
entryis available from the feed (as a result of a call tofetch()).See also
Added in version 3.36.
- Parameters:
 entry (QgsNewsFeedParser.Entry)
- signal fetched(entries: List[QgsNewsFeedParser.Entry])[source]¶
 Emitted when
entrieshave been fetched from the feed.See also
- Parameters:
 entries (List[QgsNewsFeedParser.Entry])