Skip to content
Starbeamrainbowlabs edited this page Mar 14, 2015 · 4 revisions

API Reference

This is an API reference for Pepperminty Wiki. It details all the different kinds of requests that you can make, how you should make them, and what you can expect to get back.

The Pepperminty Wiki is based on the action GET parameter. The following headings detail each action that Pepperminty Wiki currently understands.

view

This is the default action. If you don't specify an action, this action will be performed. Displays the content of a page.

Parameter Method Optional? Default Value Meaning
page GET Yes (set in the settings) The name of the page you want to view.
printable GET Yes no Determines whether the output is 'printable'. May be set to either yes or no. yes causes Pepperminty Wiki to miss out the top navbar and add a special footer to the bottom of the page.

edit

Presents you with a page that you can use to edit your wiki.

Parameter Method Optional? Default Value Meaning
page GET Yes (set in the settings) The name of the page you want to edit.
newpage GET Yes (not set) Whether a new page is being created. All this does is change the title of the page and blank the edit box.

save

Saves the edits you made on the page outputted by the edit action.

Parameter Method Optional? Default Value Meaning
page GET Yes (set in the settings) The name of the page you want to save to.
content POST No n/a The new content of the page to save to disk.

list

Lists all the pages on your wiki.

(no parameters may be used with this action)

delete

Deletes a page. You must be logged into an admin account in order to use this action.

Parameter Method Optional? Default Value Meaning
page GET Yes (set in the settings) The name of the page you want to delete.
delete GET Yes no Set this to yes if you really want to delete a page. Otherwise, you get a confirmation page with a link that includes delete=yes.

move

Moves a page from one name to another. You must be logged into an admin account to use this action.

Parameter Method Optional? Default Value Meaning
page GET Yes (set in the settings) The name of the page you want to move.
new_name GET Yes n/a The new name for the page you want to move. Omitting this causes Pepperminty WIki to output a page that asks you for the new name.

help

Gives you some help on how to use Pepperminty Wiki. Includes some basic instructions on how to navigate and edit, and also a quick markdown editing reference.

(no parameters may be used with this action)

update

Updates your wiki. Requesting this action without any parameters returns a webpage that you can use to update your wiki.

Parameter Method Optional? Default Value Meaning
do GET yes n/a Set this to true to actually go ahead and update the wiki.
secret GET yes n/a Set this to the wiki's site secret in order to be allowed to update it.

login

Gives you a page that you can use to login.

Parameter Method Optional? Default Value Meaning
failed GET Yes no Setting failed to yes causes a message to appear above the input boxes saying something along the lines of "Login Failed".

checklogin

Actually performs the login. Uses PHP sessions to remember whether you logged in or not. Once you are logged in, Pepperminty Wiki will remember you for 30 days, or until you log out.

Parameter Method Optional? Default Value Meaning
user POST No n/a Your username.
pass POST No n/a Your password.

logout

Causes Pepperminty Wiki to delete your session information, logging you out.

(no parameters may be used with this action)

credits

Gives you a page containing the Pepperminty Wiki credits.

(no parameters may be used with this action)

hash

Utility action that hashes a given string so you can set your password more easily. It is strongly recommended that if you use this action, you do so in an incognito or private browsing window so that your password is not present in your browsing history.

Parameter Method Optional? Default Value Meaning
string GET No n/a The string you want to hash.
Clone this wiki locally