1
0
Fork 0
forked from waifu/kemoverse
kemoverse/bot/client.py

45 lines
1.2 KiB
Python

from abc import abstractmethod
from typing import Iterable, override
import misskey
import config
class FediverseNote:
"""Abstraction for notes Use this to talk to per-software implementations"""
def __init__(self, note):
pass
class FediverseClient:
def __init__(self, instance, software):
self.instance = instance
self.software = software
@abstractmethod
def get_notifications(self) -> Iterable[FediverseNote]:
"""Page through notifications from the instance"""
pass
@abstractmethod
def create_note(self, text, visibility, addressee, attachment):
"""Create a new note"""
pass
class MisskeyClient(FediverseClient):
def __init__(self, instance, software):
super().__init__(instance, software)
def get_notifications(self) -> Iterable[FediverseNote]:
pass
def create_note(self, text, visibility, addressee, attachment):
pass
class PleromaClient(FediverseClient):
def __init__(self, instance, software):
super().__init__(instance, software)
def get_notifications(self) -> Iterable[FediverseNote]:
pass
def create_note(self, text, visibility, addressee, attachment):
pass