Skip to content

Commit

Permalink
Change: Update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
n-thumann committed Nov 8, 2023
1 parent 2133181 commit e803227
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions pontos/nvd/cve_change_history/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__(
Expand Down Expand Up @@ -95,19 +96,23 @@ 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
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

Expand Down

0 comments on commit e803227

Please sign in to comment.