1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-09-04 03:17:55 +00:00

Add the rest of the feature introduction versions to the docs (#908)

This commit is contained in:
JackMacWindows
2021-08-26 03:02:58 -04:00
committed by GitHub
parent 7cac8401e8
commit 340ade170f
43 changed files with 257 additions and 1 deletions

View File

@@ -12,6 +12,7 @@
-- @treturn boolean If the path is mounted, rather than a normal file/folder.
-- @throws If the path does not exist.
-- @see getDrive
-- @since 1.87.0
function isDriveRoot(path) end
--[[- Provides completion for a file or directory name, suitable for use with
@@ -30,5 +31,6 @@ included in the returned list.
@tparam[opt] boolean include_dirs When @{false}, "raw" directories will not be
included in the returned list.
@treturn { string... } A list of possible completion candidates.
@since 1.74
]]
function complete(path, location, include_files, include_dirs) end

View File

@@ -2,6 +2,7 @@
-- receiving data from them.
--
-- @module http
-- @since 1.1
--- Asynchronously make a HTTP request to the given url.
--
@@ -35,6 +36,11 @@
--
-- @see http.get For a synchronous way to make GET requests.
-- @see http.post For a synchronous way to make POST requests.
--
-- @changed 1.63 Added argument for headers.
-- @changed 1.80pr1 Added argument for binary handles.
-- @changed 1.80pr1.6 Added support for table argument.
-- @changed 1.86.0 Added PATCH and TRACE methods.
function request(...) end
--- Make a HTTP GET request to the given url.
@@ -58,6 +64,12 @@ function request(...) end
-- @treturn string A message detailing why the request failed.
-- @treturn Response|nil The failing http response, if available.
--
-- @changed 1.63 Added argument for headers.
-- @changed 1.80pr1 Response handles are now returned on error if available.
-- @changed 1.80pr1 Added argument for binary handles.
-- @changed 1.80pr1.6 Added support for table argument.
-- @changed 1.86.0 Added PATCH and TRACE methods.
--
-- @usage Make a request to [example.tweaked.cc](https://example.tweaked.cc),
-- and print the returned page.
-- ```lua
@@ -89,6 +101,13 @@ function get(...) end
-- error or connection timeout.
-- @treturn string A message detailing why the request failed.
-- @treturn Response|nil The failing http response, if available.
--
-- @since 1.31
-- @changed 1.63 Added argument for headers.
-- @changed 1.80pr1 Response handles are now returned on error if available.
-- @changed 1.80pr1 Added argument for binary handles.
-- @changed 1.80pr1.6 Added support for table argument.
-- @changed 1.86.0 Added PATCH and TRACE methods.
function post(...) end
--- Asynchronously determine whether a URL can be requested.
@@ -142,6 +161,9 @@ function checkURL(url) end
-- @treturn Websocket The websocket connection.
-- @treturn[2] false If the websocket connection failed.
-- @treturn string An error message describing why the connection failed.
-- @since 1.80pr1.1
-- @changed 1.80pr1.3 No longer asynchronous.
-- @changed 1.95.3 Added User-Agent to default headers.
function websocket(url, headers) end
--- Asynchronously open a websocket.
@@ -154,4 +176,6 @@ function websocket(url, headers) end
-- `ws://` or `wss://` protocol.
-- @tparam[opt] { [string] = string } headers Additional headers to send as part
-- of the initial websocket connection.
-- @since 1.80pr1.3
-- @changed 1.95.3 Added User-Agent to default headers.
function websocketAsync(url, headers) end

View File

@@ -8,6 +8,7 @@ variables and functions exported by it will by available through the use of
@tparam string path The path of the API to load.
@treturn boolean Whether or not the API was successfully loaded.
@since 1.2
@deprecated When possible it's best to avoid using this function. It pollutes
the global table and can mask errors.
@@ -21,6 +22,7 @@ function loadAPI(path) end
-- This effectively removes the specified table from `_G`.
--
-- @tparam string name The name of the API to unload.
-- @since 1.2
-- @deprecated See @{os.loadAPI} for why.
function unloadAPI(name) end
@@ -58,6 +60,7 @@ event, printing the error "Terminated".
end
@see os.pullEventRaw To pull the terminate event.
@changed 1.3 Added filter argument.
]]
function pullEvent(filter) end

View File

@@ -9,5 +9,6 @@ empty, including those outside the crafting "grid".
@treturn[1] true If crafting succeeds.
@treturn[2] false If crafting fails.
@treturn string A string describing why crafting failed.
@since 1.4
]]
function craft(limit) end