Added new documentation sections

This commit is contained in:
Joel Collins 2020-01-21 17:05:31 +00:00
parent 03d6a70237
commit aeff3d14cf
8 changed files with 280 additions and 21 deletions

View file

@ -23,10 +23,12 @@ A simple extension file, with no API views but application-available methods may
parent_camera = microscope.camera
parent_stage = microscope.stage
response = "My parent camera is {}, and my parent stage is {}.".format(parent_camera,
parent_stage)
response = "My parent camera is {}, and my parent stage is {}.".format(
parent_camera, parent_stage
)
return response
def rename(new_name):
"""
Rename the microscope
@ -36,14 +38,14 @@ A simple extension file, with no API views but application-available methods may
microscope.name = new_name
microscope.save_settings()
# Create your extension object
my_extension = BaseExtension("com.myname.myextension", version="0.0.0")
# Add methods to your extension
my_extension.add_method(identify, "identify")
my_extension.add_method(hello_world, "rename")
my_extension.add_method(rename, "rename")
Once this extension is loaded, any other extensions will have access to your methods: