VulpesCloud Docs
Developer

Using the API

Node API

For easy access to the Node API there is the VulpesNode object.

Example:

import de.vulpescloud.node.VulpesNode

fun test() {
    VulpesNode.serviceProvider
    VulpesNode.taskProvider
}
You might have to add Koin as a Dependency in your project!

Service API

On services, you have the VulpesBridge object.

Example:

import de.vulpescloud.bridge.VulpesBridge

fun test() {
    VulpesBridge.getServiceProvider()
    VulpesBridge.getEventManager()
}

ServiceProvider

Common

Both in the Node and Bridge implementation you have these methods:

  • fun getServiceByName(name: String): ServiceInfo? Get a Service by it's name, returns null if the Service cannot be found!

  • fun getServiceByUUID(uuid: UUID): ServiceInfo? Get a Service by it's UUID, returns null if the Service cannot be found!

  • fun services(): List<ServiceInfo> Get a list of all Services!

  • fun getServicesByFilter(filter: ServiceFilter): List<ServiceInfo> Get a list of Services by a ServiceFilter

Bridge

With the Bridge implementation you can additonally get the LocalService

  • fun getLocalService(): ServiceInfo