Grss.FeedsStore

g GObject.Object GObject.Object Grss.FeedsStore Grss.FeedsStore GObject.Object->Grss.FeedsStore

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

add_item_in_channel (channel, item)

get_channels ()

get_items_by_channel (channel)

has_item (channel, id)

switch (run)

Virtual Methods

Inherited:

GObject.Object (7)

do_add_item_in_channel (channel, item)

do_get_channels ()

do_get_items_by_channel (channel)

do_has_item (channel, id)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Grss.FeedsStore(**kwargs)
Bases:

GObject.Object

Abstract:

Yes

Structure:

Grss.FeedsStoreClass

add_item_in_channel(channel, item)
Parameters:

To save a new Grss.FeedItem into the self. It performs a check to grant item is not already saved.

get_channels()
Returns:

list of Grss.FeedChannel found in the self. Do not modify or free it.

Return type:

[Grss.FeedChannel]

To retrieve list of feeds permanently saved into the store.

get_items_by_channel(channel)
Parameters:

channel (Grss.FeedChannel) – parent feed containing required items.

Returns:

list of Grss.FeedItem found in the self. Do not modify or free it.

Return type:

[Grss.FeedItem]

To retrieve list of items saved into the store, assigned to the given channel.

has_item(channel, id)
Parameters:
  • channel (Grss.FeedChannel) – parent feed containing required item.

  • id (str) – unique ID to look for.

Returns:

True if the specified item exists, False otherwise.

Return type:

bool

To retrieve an item into a feed, given his unique ID.

switch(run)
Parameters:

run (bool) – True to run the self, False to stop.

This is to permit the self to auto-update itself: it creates an internal Grss.FeedsPool and listens for his signals, so to implement the whole loop fetch-parse-save trasparently.

do_add_item_in_channel(channel, item) virtual
Parameters:

To save a new Grss.FeedItem into the store. It performs a check to grant item is not already saved.

do_get_channels() virtual
Returns:

list of Grss.FeedChannel found in the store. Do not modify or free it.

Return type:

[Grss.FeedChannel]

To retrieve list of feeds permanently saved into the store.

do_get_items_by_channel(channel) virtual
Parameters:

channel (Grss.FeedChannel) – parent feed containing required items.

Returns:

list of Grss.FeedItem found in the store. Do not modify or free it.

Return type:

[Grss.FeedItem]

To retrieve list of items saved into the store, assigned to the given channel.

do_has_item(channel, id) virtual
Parameters:
  • channel (Grss.FeedChannel) – parent feed containing required item.

  • id (str) – unique ID to look for.

Returns:

True if the specified item exists, False otherwise.

Return type:

bool

To retrieve an item into a feed, given his unique ID.