@@ 96,6 96,22 @@ class SubscriptionManager(models.Manager
if e.code == 302:
return True
return False
+
+ def retrieve(self, topic, hub=None, debug=False):
+ config = Config()
+ if hub is None:
+ hub = self._get_hub(topic)
+ headers = config.get_extra_hub_headers(topic, hub)
+
+ response = self._send_request(
+ '{0}?hub.mode=retrieve&hub.topic={1}'.format(hub, topic),
+ {},
+ headers,
+ debug,
+ )
+
+ parsed = feedparser.parse(response.read())
+ return parsed
def subscribe(self, topic, **kwargs):
return self.do_action(topic, mode='subscribe', **kwargs)