Connectors
Featured
Build your own !
Quick example of a Groovy connector
import org.apache.unomi.api.services.EventService
import org.jsoup.nodes.Document
import static groovyx.net.http.HttpBuilder.configure
Document page = configure {
request.uri = 'https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-all'
}.get()
String license = page.select('span.b.lic').collect { it.text() }.join(', ')
println "Event type:${event.getEventType()}"
println "Profile ID=${event.getProfile().getItemId()}"
println "Action name=${action.actionType.metadata.name}"
println "Action parameters=${action.parameterValues}"
println "Groovy is licensed under: ${license}"
EventService.NO_CHANGE
Learn more about building your own Groovy connector !