Skip to content

Commit d924ac8

Browse files
n-thumanngreenbonebot
authored andcommitted
Change: Add token to CLI interface
1 parent 336b2aa commit d924ac8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pontos/nvd/source/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
async def query_changes(args: Namespace) -> None:
16-
async with SourceApi() as api:
16+
async with SourceApi(token=args.token) as api:
1717
async for source in api.sources(
1818
source_identifier=args.source_identifier,
1919
request_results=args.number,

pontos/nvd/source/_parser.py

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
def parse_args(args: Optional[Sequence[str]] = None) -> Namespace:
1212
parser = ArgumentParser()
1313
shtab.add_argument_to(parser)
14+
parser.add_argument("--token", help="API key to use for querying.")
1415
parser.add_argument(
1516
"--source-identifier",
1617
help="Get sources record for this source identifier",

0 commit comments

Comments
 (0)