Skip to content

Commit

Permalink
Merge pull request #15 from PitterPatterPython/add-ato-breach
Browse files Browse the repository at this point in the history
Add ato breach
  • Loading branch information
robd518 authored Sep 17, 2024
2 parents 18757fd + 84c7e55 commit 5798e1e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions ppp_connectors/spycloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,28 @@ def spycloud_ato_phone_number(phone_number:str, **kwargs: Dict[str, Any]) -> Res
result: Response = make_request(method=method, url=url, headers=headers, params=params)

return result

def spycloud_ato_breach_catalog(query:str, **kwargs: Dict[str, Any]) -> Response:

# Define required environment variables
required_vars: List[str] = [
'SPYCLOUD_API_ATO_KEY'
]

# Check and ensure that required variables are present, exits if not
check_required_env_vars(env_config, required_vars)

method: str = 'get'
url: str = f'https://api.spycloud.io/sp-v2/breach/catalog'
headers: Dict = {
'accept': 'application/json',
'x-api-key': env_config['SPYCLOUD_API_ATO_KEY']
}
params: Dict = {
'query': query,
**kwargs
}

result: Response = make_request(method=method, url=url, headers=headers, params=params)

return result
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "ppp-connectors"
packages = [{ include = "ppp_connectors" }]
version = "0.2.0"
version = "0.2.1"
description = "A simple, lightweight set of connectors and functions to various APIs, controlled by a central broker."
authors = [
"Rob D'Aveta <[email protected]>",
Expand Down

0 comments on commit 5798e1e

Please sign in to comment.