Returns information about a given enumeration type.

Value Description
enum_id Internal enum ID (can be used to identify Enums in collection events).
created_at Time Stamp when the enum is created.
default Default member of this enumerator. The default member is used when implicitly creating a value of this enumerator type. See mod_enum(..) to change the deafult member.
modified_at Time Stamp when the enum is last modified or nil if never modified.
name Enum’s name.
members Array with arrays containing two strings, the name and value.

This function does not generate an event.




Argument Type Description
enum str The name of the enum for which the information has to be returned.

Return value

Returns info about the enumeration type.


This code shows the output of enum_info():

// Just a Type as an example
set_enum('Color', {
    RED: '#ff0000',
    GREEN: '#00ff00',
    BLUE: '#0000ff',

// Return Type info

Example return value in JSON format

    "enum_id": 0,
    "created_at": 1589917348,
    "default": "RED",
    "modified_at": null,
    "name": "Color",
    "members": [
        ["RED", "#ff0000"],
        ["GREEN", "#00ff00"],
        ["BLUE", "#0000ff"]