Skip to main content

Dump

An easy to use and functional interface for processing and accessing Roblox API dump data.

Properties

Filter

Dump.Filter: Filter

A frozen list of various filters that can be used to filter out API members from the dump. This is useful for filtering members, such as those that are deprecated or inaccessible to non-CoreScripts.

Types

Dump.Types: {}

A reference to the Types module, which contains various types used within the API dump parser.

Functions

new

Dump.new(dumpAPIDump) → Dump

Creates a new Dump instance from the given API dump. We don't necessarily care where the dump came from, as long as it's properly formatted.

fetchRawDump

Dump.fetchRawDump(hashOrVersionstring?) → (
versionHash
)

Fetches the raw API dump for the current version of Roblox from the Roblox API. If a hash or version is provided, it will attempt to fetch the dump for that hash or version.

fetchFromServer

Dump.fetchFromServer(hashOrVersionstring?) → Dump

Performs the same actions as fetchRawDump, but returns a Dump instance instead of the raw API data.

GetAncestry

Dump:GetAncestry(classstring | Class) → {string}

Given a class, returns an array of class names the current class inherits, where the first entry is top-level ancestor.

GetClasses

Dump:GetClasses(...(string | Instance | GenericFilter<Class>)?) → {[string]Class}

Gets all the classes from the API dump. If any arguments are passed, it will filter the classes based on the given arguments.

GetClass

Dump:GetClass(classstring | Instance) → Class

Gets the class with the given name from the API dump. If the class is not found, it will throw an error. If an instance is passed, it will determine the class name from Instance.ClassName.

GetProperties

Dump:GetProperties(
classstring | Instance,
...(string | GenericFilter<Property>)?
) → {[string]Property}

Gets a list of properties for the given class. If an Instance is passed, it will determine the class from Instance.ClassName. Additional arguments can be passed to filter the properties.

This differs from Class:GetProperties in that it will return a pre-filtered table of properties, where properties are not deprecated and are safe to read from normal scripts.

Consider adding the Filter.Invert(Filter.ReadOnly) filter to filter out read-only properties. Filter.Invert(Filter.HasTag("Hidden")) may also be useful in certain scenarios.

GetChangedProperties

Dump:GetChangedProperties(
instanceInstance,
...(string | GenericFilter<Property>)?
) → {[string]Property}

Gets a list of properties that have been changed from the default value for the given instance.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Creates a new Dump instance from the given API dump. We don't\nnecessarily care where the dump came from, as long as it's\nproperly formatted.",
            "params": [
                {
                    "name": "dump",
                    "desc": "",
                    "lua_type": "APIDump"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Dump"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 69,
                "path": "src/init.lua"
            }
        },
        {
            "name": "fetchRawDump",
            "desc": "Fetches the raw API dump for the current version of Roblox from the\nRoblox API. If a hash or version is provided, it will attempt to\nfetch the dump for that hash or version.",
            "params": [
                {
                    "name": "hashOrVersion",
                    "desc": "",
                    "lua_type": "string?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "(APIDump, versionHash)"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 96,
                "path": "src/init.lua"
            }
        },
        {
            "name": "fetchFromServer",
            "desc": "Performs the same actions as [`fetchRawDump`][Dump.fetchRawDump], but\nreturns a [Dump] instance instead of the raw API data.",
            "params": [
                {
                    "name": "hashOrVersion",
                    "desc": "",
                    "lua_type": "string?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Dump"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 115,
                "path": "src/init.lua"
            }
        },
        {
            "name": "findRawClassEntry",
            "desc": "An internal method that finds the class entry for the given\nclass name. If the class entry cannot be found, it will throw\nan error.",
            "params": [
                {
                    "name": "className",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Class"
                }
            ],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 135,
                "path": "src/init.lua"
            }
        },
        {
            "name": "GetAncestry",
            "desc": "Given a class, returns an array of class names the current class\ninherits, where the first entry is top-level ancestor.",
            "params": [
                {
                    "name": "class",
                    "desc": "",
                    "lua_type": "string | Class"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ string }"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 154,
                "path": "src/init.lua"
            }
        },
        {
            "name": "constructRawClass",
            "desc": "An internal method that constructs a table of raw class data from\nthe given class object, merging in all the class ancestors' members.",
            "params": [
                {
                    "name": "class",
                    "desc": "",
                    "lua_type": "Class"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "ClassWithInheritance"
                }
            ],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 184,
                "path": "src/init.lua"
            }
        },
        {
            "name": "filterClasses",
            "desc": "Accepts a table of filters and returns a table of classes that\nmatch the given filters. The keys of the returned table are the\nclass names, and the values are the class entries.",
            "params": [
                {
                    "name": "filters",
                    "desc": "",
                    "lua_type": "{ string | GenericFilter<Class> | Instance }"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ [string]: Class }"
                }
            ],
            "function_type": "method",
            "private": true,
            "source": {
                "line": 225,
                "path": "src/init.lua"
            }
        },
        {
            "name": "GetClasses",
            "desc": "Gets all the classes from the API dump. If any arguments are\npassed, it will filter the classes based on the given arguments.",
            "params": [
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "(string | Instance | GenericFilter<Class>)?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ [string]: Class }"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 266,
                "path": "src/init.lua"
            }
        },
        {
            "name": "GetClass",
            "desc": "Gets the class with the given name from the API dump. If the\nclass is not found, it will throw an error. If an instance is\npassed, it will determine the class name from `Instance.ClassName`.",
            "params": [
                {
                    "name": "class",
                    "desc": "",
                    "lua_type": "string | Instance"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Class"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 280,
                "path": "src/init.lua"
            }
        },
        {
            "name": "GetProperties",
            "desc": "Gets a list of properties for the given class. If an Instance\nis passed, it will determine the class from `Instance.ClassName`.\nAdditional arguments can be passed to filter the properties.\n\nThis differs from [`Class:GetProperties`][Class.GetProperties] in\nthat it will return a pre-filtered table of properties, where\nproperties are not deprecated and are safe to read from normal\nscripts.\n\nConsider adding the `Filter.Invert(Filter.ReadOnly)` filter to\nfilter out read-only properties. `Filter.Invert(Filter.HasTag(\"Hidden\"))`\nmay also be useful in certain scenarios.",
            "params": [
                {
                    "name": "class",
                    "desc": "",
                    "lua_type": "string | Instance"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "(string | GenericFilter<Property>)?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ [string]: Property }"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 310,
                "path": "src/init.lua"
            }
        },
        {
            "name": "GetChangedProperties",
            "desc": "Gets a list of properties that have been changed from the\ndefault value for the given instance.",
            "params": [
                {
                    "name": "instance",
                    "desc": "",
                    "lua_type": "Instance"
                },
                {
                    "name": "...",
                    "desc": "",
                    "lua_type": "(string | GenericFilter<Property>)?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "{ [string]: Property }"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 331,
                "path": "src/init.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "Filter",
            "desc": "A frozen list of various filters that can be used to filter out\nAPI members from the dump. This is useful for filtering members,\nsuch as those that are deprecated or inaccessible to\nnon-CoreScripts.",
            "lua_type": "Filter",
            "source": {
                "line": 48,
                "path": "src/init.lua"
            }
        },
        {
            "name": "Types",
            "desc": "A reference to the `Types` module, which contains various\ntypes used within the API dump parser.",
            "lua_type": "{}",
            "source": {
                "line": 57,
                "path": "src/init.lua"
            }
        }
    ],
    "types": [],
    "name": "Dump",
    "desc": "An easy to use and functional interface for processing and\naccessing Roblox API dump data.",
    "source": {
        "line": 8,
        "path": "src/init.lua"
    }
}