From 2a1aaa689e89effd02e0351be808db088080e9d5 Mon Sep 17 00:00:00 2001 From: Corban-Lee Jones Date: Fri, 23 Aug 2024 17:45:43 +0100 Subject: [PATCH] function get many filters --- src/api.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/api.py b/src/api.py index 1016ccf..0c03301 100644 --- a/src/api.py +++ b/src/api.py @@ -157,7 +157,7 @@ class API: log.debug("getting tracked content") - return await self._get_many(self.API_ENDPOINT + f"tracked-content/", filters) + return await self._get_many(self.API_ENDPOINT + "tracked-content/", filters) async def get_filter(self, filter_id: int) -> dict: """ @@ -167,3 +167,10 @@ class API: log.debug("getting a filter") return await self._get_one(f"{self.API_ENDPOINT}filter/{filter_id}") + + async def get_filters(self, **filters) -> tuple[list[dict], int]: + """ + Get many instances of Filter. + """ + + return await self._get_many(self.API_ENDPOINT + "filter/", filters)