Implemented root API v2 routes
This commit is contained in:
parent
5aa783c269
commit
6581612312
27 changed files with 1205 additions and 148 deletions
|
|
@ -130,16 +130,19 @@ class ListAPI(MicroscopeView):
|
|||
output.file, use_video_port=use_video_port, resize=resize, bayer=bayer
|
||||
)
|
||||
|
||||
metadata.update(
|
||||
{
|
||||
"microscope_settings": self.microscope.read_config(),
|
||||
# Inject system metadata
|
||||
system_metadata = {
|
||||
"microscope_settings": self.microscope.read_settings(),
|
||||
"microscope_state": self.microscope.state,
|
||||
"microscope_id": self.microscope.id,
|
||||
"microscope_name": self.microscope.name,
|
||||
}
|
||||
)
|
||||
output.system_metadata.update(system_metadata)
|
||||
|
||||
# Insert custom metadata
|
||||
output.put_metadata(metadata)
|
||||
|
||||
# Insert custom tags
|
||||
output.put_tags(tags)
|
||||
|
||||
return jsonify(output.state)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class ZoomAPI(MicroscopeView):
|
|||
:<header Content-Type: application/json
|
||||
:status 200: preview started/stopped
|
||||
"""
|
||||
zoom_value = self.microscope.camera.state["zoom_value"]
|
||||
zoom_value = self.microscope.camera.status["zoom_value"]
|
||||
|
||||
return jsonify({"zoom_value": zoom_value})
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ class ZoomAPI(MicroscopeView):
|
|||
|
||||
self.microscope.camera.set_zoom(zoom_value)
|
||||
|
||||
return jsonify(self.microscope.camera.state)
|
||||
return jsonify(self.microscope.camera.status)
|
||||
|
||||
|
||||
class OverlayAPI(MicroscopeView):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue