Skip to content

Instantly share code, notes, and snippets.

@oeway
Created February 14, 2021 20:42
Show Gist options
  • Select an option

  • Save oeway/d8d297350f32a456677c99cf9146b437 to your computer and use it in GitHub Desktop.

Select an option

Save oeway/d8d297350f32a456677c99cf9146b437 to your computer and use it in GitHub Desktop.
<docs>
[TODO: write documentation for this plugin.]
</docs>
<config lang="json">
{
"name": "OpenFlexureSnapImageTemplate",
"type": "web-worker",
"tags": [],
"ui": "",
"version": "0.1.0",
"cover": "",
"description": "[TODO: describe this plugin with one sentence.]",
"icon": "extension",
"inputs": null,
"outputs": null,
"api_version": "0.1.8",
"env": "",
"permissions": [],
"requirements": [],
"dependencies": []
}
</config>
<script lang="javascript">
class ImJoyPlugin {
async setup() {
api.log('initialized')
}
async run(ctx) {
// get a list of service
const services = await api.getServices({name: "OpenFlexure"});
// get the first service
const ofm = services[0];
// snap an image
await ofm.snapImage();
}
}
api.export(new ImJoyPlugin())
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment