bridgy-fed/superfeedr.py

23 wiersze
632 B
Python
Czysty Zwykły widok Historia

"""Superfeedr callback handlers.
Not really sure what this will be yet. Background:
https://github.com/snarfed/bridgy-fed/issues/18#issuecomment-430731476
https://documentation.superfeedr.com/publishers.html
"""
import logging
2021-07-08 14:36:19 +00:00
from flask import request
2021-07-08 14:36:19 +00:00
from app import app
2021-07-08 14:36:19 +00:00
@app.route(r'/superfeedr/', methods=['GET', 'POST'])
@app.route(r'/superfeedr/<path:_>', methods=['GET', 'POST'])
def superfeedr(_=None):
"""Superfeedr subscription callback handler.
https://documentation.superfeedr.com/publishers.html#subscription-callback
"""
2021-07-08 14:36:19 +00:00
logging.info(f'Got:\n{request.get_data(as_text=True)}')
return '', 204