Esempio n. 1
0
def list_feeds():
    """
    List all feeds. Returns a list of dicts.
    """
    feeds = []
    for c in manager.list_feeds():
        feeds.append(Feed(c.get_config()))
    return feeds
Esempio n. 2
0
def update_feed(feed, verbose=False):
    """
    Update a feed.
    """
    if isinstance(feed, dict):
        feed = feed.get('id')
    for c in manager.list_feeds():
        if feed == c.id:
            return c.update(verbose)
Esempio n. 3
0
def remove_feed(feed):
    """
    Remove a feed.
    """
    if isinstance(feed, dict):
        feed = feed.get('id')
    for c in manager.list_feeds():
        if feed == c.id:
            manager.remove_feed(c)
            return True
    return False