Added some basic docs (waiting on auto-doc for args)
This commit is contained in:
parent
a8a3cafa97
commit
2372ba26e1
4 changed files with 28 additions and 0 deletions
|
|
@ -56,6 +56,11 @@ class CaptureAPI(Resource):
|
|||
|
||||
|
||||
class GPUPreviewStartAPI(Resource):
|
||||
"""
|
||||
Start the onboard GPU preview.
|
||||
Optional "window" parameter can be passed to control the position and size of the preview window,
|
||||
in the format ``[x, y, width, height]``.
|
||||
"""
|
||||
def post(self):
|
||||
microscope = find_device("openflexure_microscope")
|
||||
payload = JsonResponse(request)
|
||||
|
|
@ -76,6 +81,9 @@ class GPUPreviewStartAPI(Resource):
|
|||
|
||||
|
||||
class GPUPreviewStopAPI(Resource):
|
||||
"""
|
||||
Start the onboard GPU preview.
|
||||
"""
|
||||
def post(self):
|
||||
microscope = find_device("openflexure_microscope")
|
||||
microscope.camera.stop_preview()
|
||||
|
|
|
|||
|
|
@ -9,6 +9,10 @@ import logging
|
|||
|
||||
|
||||
class MoveStageAPI(Resource):
|
||||
"""
|
||||
Handle stage movements.
|
||||
"""
|
||||
|
||||
def post(self):
|
||||
microscope = find_device("openflexure_microscope")
|
||||
# Create response object
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ from openflexure_microscope.common.flask_labthings.find import find_device
|
|||
|
||||
|
||||
class CaptureList(Resource):
|
||||
"""
|
||||
List all image captures
|
||||
"""
|
||||
def get(self):
|
||||
microscope = find_device("openflexure_microscope")
|
||||
image_list = microscope.camera.images
|
||||
|
|
@ -19,6 +22,9 @@ class CaptureList(Resource):
|
|||
|
||||
|
||||
class CaptureResource(Resource):
|
||||
"""
|
||||
Description of a single image capture
|
||||
"""
|
||||
def get(self, id):
|
||||
microscope = find_device("openflexure_microscope")
|
||||
capture_obj = microscope.camera.image_from_id(id)
|
||||
|
|
@ -41,6 +47,9 @@ class CaptureResource(Resource):
|
|||
|
||||
|
||||
class CaptureDownload(Resource):
|
||||
"""
|
||||
Image data for a single image capture
|
||||
"""
|
||||
def get(self, id, filename):
|
||||
|
||||
microscope = find_device("openflexure_microscope")
|
||||
|
|
@ -73,6 +82,9 @@ class CaptureDownload(Resource):
|
|||
|
||||
|
||||
class CaptureTags(Resource):
|
||||
"""
|
||||
Tags associated with a single image capture
|
||||
"""
|
||||
def get(self, id):
|
||||
|
||||
microscope = find_device("openflexure_microscope")
|
||||
|
|
@ -120,6 +132,9 @@ class CaptureTags(Resource):
|
|||
|
||||
|
||||
class CaptureMetadata(Resource):
|
||||
"""
|
||||
All metadata associated with a single image capture
|
||||
"""
|
||||
def get(self, id):
|
||||
microscope = find_device("openflexure_microscope")
|
||||
capture_obj = microscope.camera.image_from_id(id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue