Coding your plugin
Last updated
Was this helpful?
Last updated
Was this helpful?
The code of your plugin should implement specific routes, depending on the plugin type. In order to help you, we provide you with starter projects and our .
Each plugin type has a different starter project.
Plugins have the following general structure:
src Folder containing the plugin code
index.ts Root declaration of your plugin
MyPluginImpl.ts Extends the correct Plugin SDK class
tests Tests declaration
... Other folders and files as you wish
build.sh Build script
package.json
run.sh Run script
Our handles common operations like building the required routes. It is already being used in starter projects, and you only have to override specific functions and ensure it returns the right response.
Testing your project relies heavily on unit tests. You should aim at maximizing the code coverage of your tests, and mocking possible inbound queries.
To build the project and run unit tests, simply launch the build.sh script in the root folder of your project.
It is frequent to get properties about a user, like the profile of someone at the origin of an activity processed by an activity analyzer. It is recommended to use for this purpose, as all the data linked to a user is retrievable through a single query.