2018-10-17 14:39:13 +00:00
|
|
|
"""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
|
2018-10-17 14:39:13 +00:00
|
|
|
|
2021-07-08 14:36:19 +00:00
|
|
|
from app import app
|
2018-10-17 14:39:13 +00:00
|
|
|
|
2022-02-12 06:38:56 +00:00
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
2020-01-31 15:38:58 +00:00
|
|
|
|
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):
|
2018-10-17 14:39:13 +00:00
|
|
|
"""Superfeedr subscription callback handler.
|
|
|
|
|
|
|
|
https://documentation.superfeedr.com/publishers.html#subscription-callback
|
|
|
|
"""
|
2022-02-12 06:38:56 +00:00
|
|
|
logger.info(f'Got:\n{request.get_data(as_text=True)}')
|
2021-07-08 14:36:19 +00:00
|
|
|
return '', 204
|