http.rss
#
- class platypush.message.event.http.rss.NewFeedEvent(request, response: list, source_id=None, source_title=None, source_url=None, title=None, digest_format=None, digest_filename=None, *args, **kwargs)[source]#
Bases:
HttpEvent
Event triggered when a monitored RSS feed has some new content
- __init__(request, response: list, source_id=None, source_title=None, source_url=None, title=None, digest_format=None, digest_filename=None, *args, **kwargs)[source]#
- Parameters:
request – Original request
response – Received response
source_id – ID of the source that generated the event
source_title – Name of the source, if available
source_url – URL of the source
title – Title of the new element
digest_format – Format of the digest - either ‘html’ or ‘pdf’, if set
digest_filename – File name of the digest, if it was dumped to file
- as_dict()#
Converts the event into a dictionary
- classmethod build(msg)#
Builds an event message from a JSON UTF-8 string/bytearray, a dictionary, or another Event
- matches_condition(condition)#
If the event matches an event condition, it will return an EventMatchResult :param condition: The platypush.event.hook.EventCondition object
- classmethod parse(msg)#
Parse a generic message into a key-value dictionary
- Parameters:
msg – Original message. It can be a dictionary, a Message, or a string/bytearray, as long as it’s valid UTF-8 JSON
- classmethod to_dict(msg)#
Converts a Message object into a dictionary
- Parameters:
msg – Message object