elemental-lowcode

Elemental lowcode development platform.

View the Project on GitHub PhilipSkinner/elemental-lowcode

Back to Services

Integrations Service

The integrations service allows you to call into any integrations defined within the system. It surfaces the following methods:

These methods are covered in more detail below.

callIntegration

Parameters:

Calls the named integration with the paramters given and returns the JSON response (as a parsed object) within a promise. This method can reject with an error and needs to be handled correctly.

This can be called from your controllers like so:

module.exports = {
	events : {
		load : (event) => {
			return this.integrationService.callIntegration(
				"getWeatherReport",
				"get",
				{
					location : "Cullingworth, UK"
				}
			).then((result) => {
				...
			}).catch((err) => {
				...
			});
		}
	}
};