Class: QgsNewsFeedParser

class qgis.core.QgsNewsFeedParser(feedUrl: QUrl, authcfg: str = '', parent: QObject = None)

Bases: PyQt5.QtCore.QObject

Constructor for QgsNewsFeedParser, parsing the specified feedUrl.

The optional authcfg argument can be used to specify an authentication configuration to use when connecting to the feed.

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.

New in version 3.10.

Parameters
  • feedUrl (QUrl) –

  • authcfg (str = '') –

  • parent

class Entry

Bases: sip.wrapper

Represents a single entry from a news feed.

New in version 3.10.

content
expiry
image
imageUrl
key
sticky
title
authcfg(self) → str

Returns the authentication configuration for the parser.

Return type

str

childEvent()
connectNotify()
customEvent()
disconnectNotify()
dismissAll(self)

Dismisses all current news items.

See also

dismissEntry()

dismissEntry(self, key: int)

Dismisses an entry with matching key.

This removes the entry from the local store, ensuring it will never be present again.

See also

dismissAll()

Parameters

key (int) –

entries(self) → List[QgsNewsFeedParser.Entry]

Returns a list of existing entries in the feed.

Return type

List[QgsNewsFeedParser.Entry]

entryAdded

Emitted whenever a new entry is available from the feed (as a result of a call to fetch()).

See also

fetch() [signal]

Parameters

entry (QgsNewsFeedParser.Entry) –

entryDismissed

Emitted whenever an entry is dismissed (as a result of a call to dismissEntry()).

See also

dismissEntry() [signal]

Parameters

entry (QgsNewsFeedParser.Entry) –

fetch(self)

Fetches new entries from the feed’s URL.

See also

fetched()

fetched

Emitted when entries have fetched from the feed.

See also

fetch() [signal]

Parameters

entries (Iterable[QgsNewsFeedParser.Entry]) –

imageFetched

Emitted when the image attached to the entry with the specified key has been fetched and is now available. [signal]

Parameters
  • key (int) –

  • pixmap (QPixmap) –

isSignalConnected()
keyForFeed(baseUrl: str) → str

Returns the settings key used for a feed with the given baseUrl.

Parameters

baseUrl (str) –

Return type

str

receivers()
sender()
senderSignalIndex()
timerEvent()