introduce another layer of abstraction for endpoints
@@ -56,9 +56,9 @@ _error_code_to_message = {
}
-class APIEndpoint(ABC):
- """Abstract implementation of an API endpoint.
- Serves as template for all endpoints for the StreamPipes API.
+class Endpoint(ABC):
+ """Abstract implementation of an StreamPipes endpoint.
+ Serves as template for all endpoints used for interaction with a StreamPipes instance.
By design, endpoints are only instantiated within the `__init__` method of the StreamPipesClient.
Parameters
@@ -85,6 +85,18 @@ class APIEndpoint(ABC):
"""
raise NotImplementedError # pragma: no cover
+
+class APIEndpoint(Endpoint):
+ """Abstract implementation of an API endpoint.
+ Serves as template for all endpoints for the StreamPipes API.
+ By design, endpoints are only instantiated within the `__init__` method of the StreamPipesClient.
+
+ Parameters
+ ----------
+ parent_client: StreamPipesClient
+ This parameter expects the instance of the `client.StreamPipesClient` the endpoint is attached to.
+ """
+
@property
@abstractmethod
def _relative_api_path(self) -> Tuple[str, ...]:
