ESI-Example

This is an example of documentation!

Changes

version date description

1

2018-01-10

Initial release

Available functions

INFO

This is a mandatory function for every ESI library.

Usage

    local JSON = require('dkjson')
    local ESI = require('esi-example')
    local result = ESI:INFO()
    error(JSON.encode(result))

Example response

return {
    version = {
        major = 0,
        minor = 1,
        revision = 1
    },
    contacts = {
        {
            name = "Timo Klingenmeier",
            email = "timo.klingenmeier@inmation.com"
        },
        {
            name = "Marc van de Langenberg",
            email = "marc.vandelangenberg@inmation.com"
        }
    }
    library = {
        -- Filename is always modulename .. "-lib" and the modulename must be
        -- used for the ScriptLibrary.LuaModuleName property.
        modulename = "esi-example"
    }
}

multiply

Multiplies a with b

    local ESI = require('esi-example')
    local result = ESI:multiply(10, 20)
    error(tostring(result))

Breaking changes

  • Not Applicable