You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by bo...@apache.org on 2022/11/24 19:05:31 UTC
[streampipes] branch STREAMPIPES-607 updated: [STREAMPIPES-607] implement general get() method for an endpoint
This is an automated email from the ASF dual-hosted git repository.
bossenti pushed a commit to branch STREAMPIPES-607
in repository https://gitbox.apache.org/repos/asf/streampipes.git
The following commit(s) were added to refs/heads/STREAMPIPES-607 by this push:
new 0e7a6260f [STREAMPIPES-607] implement general get() method for an endpoint
0e7a6260f is described below
commit 0e7a6260fa04dcf8b10f06276d2270f358167c6d
Author: bossenti <bo...@posteo.de>
AuthorDate: Thu Nov 24 20:04:20 2022 +0100
[STREAMPIPES-607] implement general get() method for an endpoint
---
.../streampipes_client/endpoint/endpoint.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/streampipes-client-python/streampipes_client/endpoint/endpoint.py b/streampipes-client-python/streampipes_client/endpoint/endpoint.py
index b28f5e35e..b5e1fd63b 100644
--- a/streampipes-client-python/streampipes_client/endpoint/endpoint.py
+++ b/streampipes-client-python/streampipes_client/endpoint/endpoint.py
@@ -191,7 +191,9 @@ class APIEndpoint(ABC):
-------
The specified resource as an instance of the corresponding model class (`model.Resource`).
"""
- raise NotImplementedError(
- "We're sorry! This functionality is not yet part of the StreamPipes Python client."
- "Stay tuned, we will add this shortly."
- ) # pragma: no cover
+
+ response = self._make_request(
+ request_method=self._parent_client.request_session.get, url=f"{self.build_url()}/{identifier}"
+ )
+
+ return self._container_cls._resource_cls()(**response.json())