Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(sdk): say when the Python catalog reads return None

Yudhi Armyndharis40ace8911fc7
diff --git a/sdk/python/openwa/resources/catalog.py b/sdk/python/openwa/resources/catalog.py
index ef5a59d35..6905431e9 100644
--- a/sdk/python/openwa/resources/catalog.py
+++ b/sdk/python/openwa/resources/catalog.py
@@ -30,6 +30,7 @@ class CatalogResource:
self._http = http
def info(self, session_id: str) -> CatalogInfo | None:
+ """Get catalog info, or None when the account has no catalog."""
return self._http.request("GET", f"/api/sessions/{quote_segment(session_id)}/catalog")
def products(
@@ -40,6 +41,7 @@ class CatalogResource:
)
def product(self, session_id: str, product_id: str) -> CatalogProduct | None:
+ """Get one product, or None when no product has that id."""
return self._http.request(
"GET", f"/api/sessions/{quote_segment(session_id)}/catalog/products/{quote_segment(product_id)}"
)