diff --git a/ppp_connectors/spycloud.py b/ppp_connectors/spycloud.py index 6147c30..d12db18 100644 --- a/ppp_connectors/spycloud.py +++ b/ppp_connectors/spycloud.py @@ -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 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ebe1d17..e3686f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 ",