Commit 2372ba26 authored by jtc42's avatar jtc42
Browse files

Added some basic docs (waiting on auto-doc for args)

parent a8a3cafa
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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()
+4 −0
Original line number Diff line number Diff line
@@ -9,6 +9,10 @@ import logging


class MoveStageAPI(Resource):
    """
    Handle stage movements.
    """

    def post(self):
        microscope = find_device("openflexure_microscope")
        # Create response object
+15 −0
Original line number Diff line number Diff line
@@ -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)
+1 −0
Original line number Diff line number Diff line
@@ -225,6 +225,7 @@ class LabThing(object):
        return endpoint in self.endpoints

    ### Description

    def td(self):
        """
        W3C-style Thing Description