diff --git a/docs/pages/Roblox - API Reference.md b/docs/pages/Roblox - API Reference.md index 3ad43b2..641fc32 100644 --- a/docs/pages/Roblox - API Reference.md +++ b/docs/pages/Roblox - API Reference.md @@ -1,9 +1,52 @@ - - + -# Classes +# API Reference -## `Instance` +Welcome to the API reference page for the built-in `roblox` library! + +All of the following static functions, classes, and datatypes can be imported using `require("@lune/roblox")`. + +## Static Functions + +### `readPlaceFile` + +Reads a place file into a DataModel instance. + +```lua +local roblox = require("@lune/roblox") +local game = roblox.readPlaceFile("filePath.rbxl") +``` + +### `readModelFile` + +Reads a model file into a table of instances. + +```lua +local roblox = require("@lune/roblox") +local instances = roblox.readModelFile("filePath.rbxm") +``` + +### `writePlaceFile` + +Writes a DataModel instance to a place file. + +```lua +local roblox = require("@lune/roblox") +roblox.writePlaceFile("filePath.rbxl", game) +``` + +### `writeModelFile` + +Writes one or more instances to a model file. + +```lua +local roblox = require("@lune/roblox") +roblox.writeModelFile("filePath.rbxm", { instance1, instance2, ... }) +``` + +## Classes + +### `Instance` Currently implemented APIs: @@ -31,14 +74,14 @@ Not yet implemented, but planned: - [`GetAttributes`](https://create.roblox.com/docs/reference/engine/classes/Instance#GetAttributes) - [`SetAttribute`](https://create.roblox.com/docs/reference/engine/classes/Instance#SetAttribute) -## `DataModel` +### `DataModel` Currently implemented APIs: - [`GetService`](https://create.roblox.com/docs/reference/engine/classes/ServiceProvider#GetService) - [`FindService`](https://create.roblox.com/docs/reference/engine/classes/ServiceProvider#FindService) -# Datatypes +## Datatypes Currently implemented datatypes: