From e803227ae5291bd17bb240db72924411e3e1bfe1 Mon Sep 17 00:00:00 2001 From: Nicolas Thumann Date: Wed, 8 Nov 2023 15:48:35 +0100 Subject: [PATCH] Change: Update docstrings --- pontos/nvd/cve_change_history/api.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/pontos/nvd/cve_change_history/api.py b/pontos/nvd/cve_change_history/api.py index 56c2b1bc..d1e2900e 100644 --- a/pontos/nvd/cve_change_history/api.py +++ b/pontos/nvd/cve_change_history/api.py @@ -47,10 +47,11 @@ class CVEChangeHistoryApi(NVDApi): Example: .. code-block:: python - from pontos.nvd.cve import CVEApi + from pontos.nvd.cve_change_history import CVEChangeHistoryApi - async with CVEApi() as api: - cve = await api.cve("CVE-2022-45536") + async with CVEChangeHistoryApi() as api: + async for cve_change in api.cve_changes(event_name=EventName.INITIAL_ANALYSIS): + print(cve_change) """ def __init__( @@ -95,7 +96,11 @@ async def cve_changes( https://nvd.nist.gov/developers/vulnerabilities#divGetCves Args: - TODO: ... + change_start_date: Return all CVE changes after this date. + change_end_date: Return all CVE changes before this date. + cve_id: Return all CVE changes for this Common Vulnerabilities and Exposures identifier. + event_name: Return all CVE changes with this event name. + Returns: An async iterator to iterate over CVEChange model instances @@ -103,11 +108,11 @@ async def cve_changes( Example: .. code-block:: python - from pontos.nvd.cve import CVEApi + from pontos.nvd.cve_change_history import CVEChangeHistoryApi - async with CVEApi() as api: - async for cve in api.cves(keywords=["Mac OS X", "kernel"]): - print(cve.id) + async with CVEChangeHistoryApi() as api: + async for cve_change in api.cve_changes(event_name=EventName.INITIAL_ANALYSIS): + print(cve_change) """ total_results: Optional[int] = None