publish-meetups/publish_meetups/feeds/__init__.py

24 lines
542 B
Python
Raw Normal View History

2024-02-12 21:17:48 +00:00
import logging
2024-02-11 18:00:48 +00:00
class Feed:
2024-02-11 19:48:45 +00:00
@classmethod
def prompt_auth(cls, existing_config: dict) -> dict:
return existing_config
2024-02-12 21:17:48 +00:00
def __init__(self, config: dict = None, **kwargs):
self.logger = logging.getLogger(self.__class__.__name__)
self.config = config or {}
2024-02-11 18:00:48 +00:00
2024-02-11 19:48:45 +00:00
def __enter__(self):
return self
2024-02-12 21:17:48 +00:00
def post(self, message: str, **kwargs):
print(f"Posting {message}")
2024-02-11 19:48:45 +00:00
def run(self):
self.post("Hello, World!")
2024-02-11 18:00:48 +00:00
2024-02-11 19:48:45 +00:00
def __exit__(self, exc_type, exc_value, traceback):
2024-02-11 18:00:48 +00:00
pass