mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-25 17:23:00 +00:00
Document a bunch more stuff
This commit is contained in:
parent
bc7b499d75
commit
c76602f5de
7 changed files with 104 additions and 12 deletions
|
@ -164,9 +164,13 @@ if($env->is_logged_in)
|
|||
* @apiDefine Anonymous Anybody may use this call.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine UserNotLoggedInError
|
||||
* @apiError UserNotLoggedIn You didn't log in before sending this request.
|
||||
* @apiDefine UserNotLoggedInError
|
||||
* @apiError UserNotLoggedInError You didn't log in before sending this request.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine UserNotModeratorError
|
||||
* @apiError UserNotModeratorError You weren't loggged in as a moderator before sending this request.
|
||||
*/
|
||||
|
||||
|
||||
////////////////////
|
||||
|
@ -2408,7 +2412,9 @@ register_module([
|
|||
* @apiGroup Upload
|
||||
* @apiPermission User
|
||||
*
|
||||
* @apiParam {file} file The file to upload.
|
||||
* @apiParam {string} name The name of the file to upload.
|
||||
* @apiParam {string} description A description of the file.
|
||||
* @apiParam {file} file The file to upload.
|
||||
*
|
||||
* @apiUse UserNotLoggedInError
|
||||
* @apiError UploadsDisabledError Uploads are currently disabled in the wiki's settings.
|
||||
|
@ -2591,6 +2597,19 @@ register_module([
|
|||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* @api {get} ?action=preview Get a preview of a file
|
||||
* @apiName PreviewFile
|
||||
* @apiGroup Upload
|
||||
* @apiPermission Anonymous
|
||||
*
|
||||
* @apiParam {string} page The name of the file to preview.
|
||||
* @apiParam {number} size Optional. The size fo the resulting preview. Will be clamped to fit within the bounds specified in the wiki's settings. May also be set to the keyword 'original', which will cause the original file to be returned with it's appropriate mime type instead.
|
||||
*
|
||||
* @apiError PreviewNoFileError No file was found associated with the specified page.
|
||||
* @apiError PreviewUnknownFileTypeError Pepperminty Wiki was unable to generate a preview for the requested file's type.
|
||||
*/
|
||||
|
||||
/*
|
||||
* ██████ ██████ ███████ ██ ██ ██ ███████ ██ ██
|
||||
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
|
@ -2936,6 +2955,12 @@ register_module([
|
|||
"description" => "Adds the credits page. You *must* have this module :D",
|
||||
"id" => "page-credits",
|
||||
"code" => function() {
|
||||
/**
|
||||
* @api {get} ?action=credits Get the credits page
|
||||
* @apiName Credits
|
||||
* @apiGroup Utility
|
||||
* @apiPermission Anonymous
|
||||
*/
|
||||
|
||||
/*
|
||||
* ██████ ██████ ███████ ██████ ██ ████████ ███████
|
||||
|
@ -3054,6 +3079,14 @@ register_module([
|
|||
"id" => "page-debug-info",
|
||||
"code" => function() {
|
||||
global $settings, $env;
|
||||
/**
|
||||
* @api {get} ?action=debug Get a debug dump
|
||||
* @apiName Debug
|
||||
* @apiGroup Utility
|
||||
* @apiPermission Moderator
|
||||
*
|
||||
* @apiUse UserNotModeratorError
|
||||
*/
|
||||
|
||||
/*
|
||||
* ██████ ███████ ██████ ██ ██ ██████
|
||||
|
@ -3123,6 +3156,19 @@ register_module([
|
|||
"id" => "page-delete",
|
||||
"code" => function() {
|
||||
global $settings;
|
||||
/**
|
||||
* @api {post} ?action=upload Delete a file
|
||||
* @apiDescription Delete a page and all its associated data.
|
||||
* @apiName DeletePage
|
||||
* @apiGroup Page
|
||||
* @apiPermission Moderator
|
||||
*
|
||||
* @apiParam {string} page The name of the page to delete.
|
||||
* @apiParam {string} delete Set to 'yes' to actually delete the page.
|
||||
*
|
||||
* @apiUse UserNotModeratorError
|
||||
* @apiError PageNonExistentError The specified page doesn't exist
|
||||
*/
|
||||
|
||||
/*
|
||||
* ██████ ███████ ██ ███████ ████████ ███████
|
||||
|
|
8
core.php
8
core.php
|
@ -97,9 +97,13 @@ if($env->is_logged_in)
|
|||
* @apiDefine Anonymous Anybody may use this call.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine UserNotLoggedInError
|
||||
* @apiError UserNotLoggedIn You didn't log in before sending this request.
|
||||
* @apiDefine UserNotLoggedInError
|
||||
* @apiError UserNotLoggedInError You didn't log in before sending this request.
|
||||
*/
|
||||
/**
|
||||
* @apiDefine UserNotModeratorError
|
||||
* @apiError UserNotModeratorError You weren't loggged in as a moderator before sending this request.
|
||||
*/
|
||||
|
||||
|
||||
////////////////////
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File\/' prefix.",
|
||||
"id": "feature-upload",
|
||||
"lastupdate": 1465761892,
|
||||
"lastupdate": 1465814688,
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
|
@ -86,7 +86,7 @@
|
|||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Adds the credits page. You *must* have this module :D",
|
||||
"id": "page-credits",
|
||||
"lastupdate": 1460285448,
|
||||
"lastupdate": 1465815023,
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
|
@ -95,7 +95,7 @@
|
|||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Adds a debug action for administrator use only that collects a load of useful information to make reporting bugs easier.",
|
||||
"id": "page-debug-info",
|
||||
"lastupdate": 1453562632,
|
||||
"lastupdate": 1465815112,
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
|
@ -104,7 +104,7 @@
|
|||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Adds an action to allow administrators to delete pages.",
|
||||
"id": "page-delete",
|
||||
"lastupdate": 1465136119,
|
||||
"lastupdate": 1465815312,
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
|
|
|
@ -19,7 +19,9 @@ register_module([
|
|||
* @apiGroup Upload
|
||||
* @apiPermission User
|
||||
*
|
||||
* @apiParam {file} file The file to upload.
|
||||
* @apiParam {string} name The name of the file to upload.
|
||||
* @apiParam {string} description A description of the file.
|
||||
* @apiParam {file} file The file to upload.
|
||||
*
|
||||
* @apiUse UserNotLoggedInError
|
||||
* @apiError UploadsDisabledError Uploads are currently disabled in the wiki's settings.
|
||||
|
@ -202,6 +204,19 @@ register_module([
|
|||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* @api {get} ?action=preview Get a preview of a file
|
||||
* @apiName PreviewFile
|
||||
* @apiGroup Upload
|
||||
* @apiPermission Anonymous
|
||||
*
|
||||
* @apiParam {string} page The name of the file to preview.
|
||||
* @apiParam {number} size Optional. The size fo the resulting preview. Will be clamped to fit within the bounds specified in the wiki's settings. May also be set to the keyword 'original', which will cause the original file to be returned with it's appropriate mime type instead.
|
||||
*
|
||||
* @apiError PreviewNoFileError No file was found associated with the specified page.
|
||||
* @apiError PreviewUnknownFileTypeError Pepperminty Wiki was unable to generate a preview for the requested file's type.
|
||||
*/
|
||||
|
||||
/*
|
||||
* ██████ ██████ ███████ ██ ██ ██ ███████ ██ ██
|
||||
* ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
|
||||
|
|
|
@ -6,6 +6,12 @@ register_module([
|
|||
"description" => "Adds the credits page. You *must* have this module :D",
|
||||
"id" => "page-credits",
|
||||
"code" => function() {
|
||||
/**
|
||||
* @api {get} ?action=credits Get the credits page
|
||||
* @apiName Credits
|
||||
* @apiGroup Utility
|
||||
* @apiPermission Anonymous
|
||||
*/
|
||||
|
||||
/*
|
||||
* ██████ ██████ ███████ ██████ ██ ████████ ███████
|
||||
|
|
|
@ -7,6 +7,14 @@ register_module([
|
|||
"id" => "page-debug-info",
|
||||
"code" => function() {
|
||||
global $settings, $env;
|
||||
/**
|
||||
* @api {get} ?action=debug Get a debug dump
|
||||
* @apiName Debug
|
||||
* @apiGroup Utility
|
||||
* @apiPermission Moderator
|
||||
*
|
||||
* @apiUse UserNotModeratorError
|
||||
*/
|
||||
|
||||
/*
|
||||
* ██████ ███████ ██████ ██ ██ ██████
|
||||
|
|
|
@ -7,6 +7,19 @@ register_module([
|
|||
"id" => "page-delete",
|
||||
"code" => function() {
|
||||
global $settings;
|
||||
/**
|
||||
* @api {post} ?action=upload Delete a file
|
||||
* @apiDescription Delete a page and all its associated data.
|
||||
* @apiName DeletePage
|
||||
* @apiGroup Page
|
||||
* @apiPermission Moderator
|
||||
*
|
||||
* @apiParam {string} page The name of the page to delete.
|
||||
* @apiParam {string} delete Set to 'yes' to actually delete the page.
|
||||
*
|
||||
* @apiUse UserNotModeratorError
|
||||
* @apiError PageNonExistentError The specified page doesn't exist
|
||||
*/
|
||||
|
||||
/*
|
||||
* ██████ ███████ ██ ███████ ████████ ███████
|
||||
|
|
Loading…
Reference in a new issue