diff --git a/pyproject.toml b/pyproject.toml index 920768b..642ecb7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "python-catalyst" -version = "0.1.3" +version = "0.1.4" description = "Python client for the PRODAFT CATALYST API" readme = "README.md" license = { file = "LICENSE" } diff --git a/python_catalyst/client.py b/python_catalyst/client.py index 0863898..fecb4f9 100644 --- a/python_catalyst/client.py +++ b/python_catalyst/client.py @@ -148,14 +148,13 @@ def get_member_contents( if tlp: if len(tlp) > 0: - first_tlp = tlp[0] - params["tlp"] = ( - first_tlp.value if isinstance(first_tlp, TLPLevel) else first_tlp - ) - if len(tlp) > 1: - self.logger.debug( - f"Multiple TLP values provided but API only supports one. Using: {params['tlp']}" - ) + tlps = [] + for t in tlp: + if isinstance(t, TLPLevel): + tlps.append(t.value) + else: + tlps.append(t) + params["tlp"] = tlps if published_on_after: params["published_on_after"] = published_on_after.isoformat() diff --git a/setup.py b/setup.py index 69ff9e2..6689657 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="python-catalyst", - version="0.1.3", + version="0.1.4", description="Python client for the PRODAFT CATALYST API", long_description=long_description, long_description_content_type="text/markdown", diff --git a/tests/test_client.py b/tests/test_client.py index eb5df6c..642de6f 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -84,7 +84,7 @@ def test_get_member_contents(self, mock_handle_request): self.client.content_endpoint, params={ "category": "RESEARCH", - "tlp": "TLP:AMBER", + "tlp": ["TLP:AMBER"], "published_on_after": test_datetime.isoformat(), "published_on_before": test_datetime.isoformat(), "updated_on_after": test_datetime.isoformat(),