From e2cf88f161b16ca0d4fcbaf42bbcf051c5bebe77 Mon Sep 17 00:00:00 2001 From: Lyncoln Date: Sat, 19 Sep 2026 15:05:27 -0400 Subject: [PATCH] Extract shared NPM API client --- dns_sync/npm_client.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dns_sync/npm_client.py b/dns_sync/npm_client.py index e01701b..c292e79 100644 --- a/dns_sync/npm_client.py +++ b/dns_sync/npm_client.py @@ -125,3 +125,14 @@ class NpmClient: ) return data + + + def certificates(self) -> list[dict[str, Any]]: + data = self.get_json("/nginx/certificates") + + if not isinstance(data, list): + raise RuntimeError( + "NPM certificate response was not a list" + ) + + return data