From 882d1e6719006cd1e7e41b4aac4b309b72ac86a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Wed, 4 Dec 2013 09:29:47 -0800 Subject: [PATCH] Created APIs (markdown) --- APIs.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 APIs.md diff --git a/APIs.md b/APIs.md new file mode 100644 index 0000000..cb0516d --- /dev/null +++ b/APIs.md @@ -0,0 +1,27 @@ +Standard Libraries +------------------ + +First and foremost you should get familiar with the [Lua reference manual][lua-manual], if you are new to Lua. You will find most basic Lua functionality explained there, as well as a bunch of standard library functions. + +OpenComputers makes an effort to largely emulate the standard library in areas that would usually interact with the host system - that being the I/O library. There are a few differences, which you can look up here: [[differences in the standard libraries|NonstandardLuaLibs]]. Most notably, the debug and package libraries are not available, and `load` only accepts text source files, no binary / pre-compiled Lua programs (for security reasons). + +Custom Libraries +---------------- + +The standard libraries aside, OpenComputers comes with a couple of additional, built-in libraries. Here is a list of all these libraries. Note that some of these may not be usable depending on your configuration (HTTP) and context (Robot library on computers), but they'll still be there. + +- [[Colors|API/Colors]]: a global table that allows referencing standard Minecraft colors by name. +- [[Component|API/Component]]: look-up and management of components attached to the computer. +- [[Event|API/Event]]: a very rudimentary event system (intended for libraries) and filtered signal pulling. +- [[FileSystem|API/FileSystem]: abstracted interaction with file system components. +- [[HTTP|API/HTTP]]: a simple wrapper for HTTP requests. +- [[Keyboard|API/Keyboard]]: a table of key codes by name and pressed key tracking. +- [[Robot|API/Robot]]: abstracted access to robot actions. +- [[Shell|API/Shell]]: working path tracking and program execution. +- [[Sides|API/Sides]]: a global table that allows referencing sides by name. +- [[Term|API/Term]]: provides a simple readline implementation and text output. +- [[Text|API/Text]]: provides text utilities such as serialization and tab to space conversion. +- [[Unicode|API/Unicode]]: provides Unicode aware implementations of some functions in the string library. + + +[lua-manual]: http://www.lua.org/manual/5.2/manual.html#3.1 \ No newline at end of file