summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/APIDump/Classes
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-04-21 12:01:39 +0200
committerMattes D <github@xoft.cz>2015-04-21 12:01:39 +0200
commit50323b3760abf2fc62774a11dde406ef38d5935a (patch)
tree0c4cf152371dbe6b2a905a755d8ffdcd683c5d75 /MCServer/Plugins/APIDump/Classes
parentWebAdmin: Removed server name, shortened memory report. (diff)
parentAdded URL member to the HTTPRequest API class. (diff)
downloadcuberite-50323b3760abf2fc62774a11dde406ef38d5935a.tar
cuberite-50323b3760abf2fc62774a11dde406ef38d5935a.tar.gz
cuberite-50323b3760abf2fc62774a11dde406ef38d5935a.tar.bz2
cuberite-50323b3760abf2fc62774a11dde406ef38d5935a.tar.lz
cuberite-50323b3760abf2fc62774a11dde406ef38d5935a.tar.xz
cuberite-50323b3760abf2fc62774a11dde406ef38d5935a.tar.zst
cuberite-50323b3760abf2fc62774a11dde406ef38d5935a.zip
Diffstat (limited to 'MCServer/Plugins/APIDump/Classes')
-rw-r--r--MCServer/Plugins/APIDump/Classes/WebAdmin.lua51
1 files changed, 51 insertions, 0 deletions
diff --git a/MCServer/Plugins/APIDump/Classes/WebAdmin.lua b/MCServer/Plugins/APIDump/Classes/WebAdmin.lua
new file mode 100644
index 000000000..808335aea
--- /dev/null
+++ b/MCServer/Plugins/APIDump/Classes/WebAdmin.lua
@@ -0,0 +1,51 @@
+return
+{
+ cWebAdmin =
+ {
+ Desc = "",
+ Functions =
+ {
+ GetHTMLEscapedString = { Params = "string", Return = "string", Notes = "(STATIC) Gets the HTML-escaped representation of a requested string. This is useful for user input and game data that is not guaranteed to be escaped already." },
+ },
+ }, -- cWebAdmin
+
+
+ HTTPFormData =
+ {
+ Desc = "This class stores data for one form element for a {{HTTPRequest|HTTP request}}.",
+ Variables =
+ {
+ Name = { Type = "string", Notes = "Name of the form element" },
+ Type = { Type = "string", Notes = "Type of the data (usually empty)" },
+ Value = { Type = "string", Notes = "Value of the form element. Contains the raw data as sent by the browser." },
+ },
+ }, -- HTTPFormData
+
+
+ HTTPRequest =
+ {
+ Desc = [[
+ This class encapsulates all the data that is sent to the WebAdmin through one HTTP request. Plugins
+ receive this class as a parameter to the function handling the web requests, as registered in the
+ {{cPluginLua}}:AddWebPage().
+ ]],
+ Constants =
+ {
+ FormData = { Notes = "Array-table of {{HTTPFormData}}, contains the values of individual form elements submitted by the client" },
+ Params = { Notes = "Map-table of parameters given to the request in the URL (?param=value); if a form uses GET method, this is the same as FormData. For each parameter given as \"param=value\", there is an entry in the table with \"param\" as its key and \"value\" as its value." },
+ PostParams = { Notes = "Map-table of data posted through a FORM - either a GET or POST method. Logically the same as FormData, but in a map-table format (for each parameter given as \"param=value\", there is an entry in the table with \"param\" as its key and \"value\" as its value)." },
+ },
+
+ Variables =
+ {
+ Method = { Type = "string", Notes = "The HTTP method used to make the request. Usually GET or POST." },
+ Path = { Type = "string", Notes = "The Path part of the URL (excluding the parameters)" },
+ URL = { Type = "string", Notes = "The entire URL used for the request." },
+ Username = { Type = "string", Notes = "Name of the logged-in user." },
+ },
+ }, -- HTTPRequest
+}
+
+
+
+