from abc import ABC

from abra_python.requestor import Requestor


class BaseResource(ABC):
    def __init__(self, requestor: Requestor):
        self._requestor = requestor

    @staticmethod
    def fill_content(**kwargs) -> dict:
        values = {}
        for k in kwargs:
            if kwargs[k] is not None:
                values[k] = kwargs[k]
        return values

    @property
    def requestor(self) -> Requestor:
        return self._requestor

    def list(self, take: int) -> list:
        pass

    def get(self, object_id: int):
        pass

    def create(self, payload: dict):
        pass

    def update(self, object_id: int, payload: dict):
        pass
