Exemple #1
0
def get_feed_with_items(url, min_timestamp=None):
    feed = get_feed(url)
    if feed is None:
        return None

    items = get_feeditems(url, min_timestamp)
    return feed_from_model(feed, items)
Exemple #2
0
def get_feed_with_items(url, min_timestamp=None):
    feed = get_feed(url)
    if feed is None:
        return None

    items = get_feeditems(url, min_timestamp)
    return feed_from_model(feed, items)
Exemple #3
0
def put_feed(url, user, title=None, description=None, tag=None):
    if title is None:
        title = domain_from_url(url)
    if description is None:
        description = ""

    feed = FeedModel(key=FeedModelKey(user, url),
                     user=user,
                     timestamp=datetime_now(),
                     title=title,
                     description=description,
                     link=url,
                     tag=tag)

    feed.put()

    return feed_from_model(feed)
Exemple #4
0
def put_feed(url, user, title=None, description=None, tag=None):
    if title is None:
        title = domain_from_url(url)
    if description is None:
        description = ""

    feed = FeedModel(
        key=FeedModelKey(user, url),
        user=user,
        timestamp=datetime_now(),
        title=title,
        description=description,
        link=url,
        tag=tag,
    )

    feed.put()

    return feed_from_model(feed)