From ab2c84f437fbd401bbdb6ffacefcc3529cb7a5e9 Mon Sep 17 00:00:00 2001 From: Adrian Maraj Date: Wed, 19 Jun 2024 12:00:46 +0200 Subject: [PATCH] adding timestamp --- pylookyloo/api.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pylookyloo/api.py b/pylookyloo/api.py index 6f5d237..6372ee1 100644 --- a/pylookyloo/api.py +++ b/pylookyloo/api.py @@ -494,10 +494,12 @@ def send_mail(self, tree_uuid: str, email: str = '', comment: str | None = None) r = self.session.post(urljoin(self.root_url, str(PurePosixPath('json', tree_uuid, 'report'))), json=to_send) return r.json() - def get_recent_captures(self) -> list: + def get_recent_captures(self, timestamp:str) -> list: '''Gets the uuids of the most recent captures + + :param timestamp: Timestamp of the capture ''' - r = self.session.get(urljoin(self.root_url, str(PurePosixPath('json/recent_captures')))) + r = self.session.get(urljoin(self.root_url, str(PurePosixPath('json/recent_captures/', timestamp)))) return r.json() @overload