Skip to content

Commit 435e5e1

Browse files
docs: add query method docstring
1 parent 24bc614 commit 435e5e1

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

autumn/client.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,5 +286,22 @@ def query(
286286
*,
287287
range: Literal["24h", "7d", "30d", "90d", "last_cycle"] = "30d"
288288
) -> QueryResponse:
289+
"""
290+
Query usage analytics for a customer on a specific feature.
291+
292+
Parameters
293+
----------
294+
customer_id: str
295+
The ID of the customer to query for.
296+
feature_id:
297+
The ID of the feature you want to query analytics for.
298+
range: Literal["24h", "7d", "30d", "90d", "last_cycle"]
299+
Analytics time period.
300+
301+
Returns
302+
-------
303+
:class:`~autumn.models.response.QueryResponse`
304+
The response from the API.
305+
"""
289306
payload = _build_payload(locals(), self.query)
290-
return self.http.request("POST", "/query", QueryResponse, json=payload)
307+
return self.http.request("POST", "/query", QueryResponse, json=payload)

0 commit comments

Comments
 (0)