Skip to content

Commit

Permalink
feat(api): add hash to url_scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertCraigie committed Jul 16, 2024
1 parent ca2bde2 commit 28c06a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/cloudflare/resources/url_scanner/url_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def scan(
asn: str | NotGiven = NOT_GIVEN,
date_end: Union[str, datetime] | NotGiven = NOT_GIVEN,
date_start: Union[str, datetime] | NotGiven = NOT_GIVEN,
hash: str | NotGiven = NOT_GIVEN,
hostname: str | NotGiven = NOT_GIVEN,
ip: str | NotGiven = NOT_GIVEN,
is_malicious: bool | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -97,6 +98,8 @@ def scan(
date_start: Filter scans requested after date (inclusive).
hash: Filter scans by hash of any html/js/css request made by the webpage.
hostname: Filter scans by hostname of _any_ request made by the webpage.
ip: Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage.
Expand Down Expand Up @@ -146,6 +149,7 @@ def scan(
"asn": asn,
"date_end": date_end,
"date_start": date_start,
"hash": hash,
"hostname": hostname,
"ip": ip,
"is_malicious": is_malicious,
Expand Down Expand Up @@ -189,6 +193,7 @@ async def scan(
asn: str | NotGiven = NOT_GIVEN,
date_end: Union[str, datetime] | NotGiven = NOT_GIVEN,
date_start: Union[str, datetime] | NotGiven = NOT_GIVEN,
hash: str | NotGiven = NOT_GIVEN,
hostname: str | NotGiven = NOT_GIVEN,
ip: str | NotGiven = NOT_GIVEN,
is_malicious: bool | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -229,6 +234,8 @@ async def scan(
date_start: Filter scans requested after date (inclusive).
hash: Filter scans by hash of any html/js/css request made by the webpage.
hostname: Filter scans by hostname of _any_ request made by the webpage.
ip: Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage.
Expand Down Expand Up @@ -278,6 +285,7 @@ async def scan(
"asn": asn,
"date_end": date_end,
"date_start": date_start,
"hash": hash,
"hostname": hostname,
"ip": ip,
"is_malicious": is_malicious,
Expand Down
3 changes: 3 additions & 0 deletions src/cloudflare/types/url_scanner/url_scanner_scan_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class URLScannerScanParams(TypedDict, total=False):
date_start: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
"""Filter scans requested after date (inclusive)."""

hash: str
"""Filter scans by hash of any html/js/css request made by the webpage."""

hostname: str
"""Filter scans by hostname of _any_ request made by the webpage."""

Expand Down

0 comments on commit 28c06a7

Please sign in to comment.