free web maker

© Copyright 2018 MCGSoft - All Rights Reserved

Welcome to the Module API

Here you can learn how the api works and write your own Modules!

Base information

The module api is made to make it possible to extend the Minestore information further then Minecraft. for example to send notifications showcase information on a website and more

Requirements

All modules need certain information always to be included in the module file.
For example the module needs its own named folder with a module.php in it that contains 4 functions to give out info about the module read more about this below

Making your own Base Module

Great lets get started!

Every module requires the structure like so:

Mymodulename-withoutspaces folder

in that folder put a file called module.php

in that module.php we need some information
in this case we need 4 functions that return information about the module:
Indentify,requirements,description,version
They need to return their info
For intentify its the module name
For requirements its the required module names seperated with , if no requirements are needed leave it emty and return an empty string
For description its a single line description of your module
And last for Version its the version number string of your module 

Bit messy? take a look at our example below:

Great now on to the functionality!
The module system is devided into multiple types
order
sale
are the first ones implemented.
they are send with their values to the api in JSON.
The api sends every module the JSON date gotten from the webreporter.
For your module we need to know which data it needs.
So if you wanna show order information as soon as a order is made use order as type and if you wanna catch any sale you make use sale as type
See the snipped examples below to see what i ment with this:

Now you basically know how to use the system the last thing you need to know are the responce values use the table below as a guide the rest is up to you.
Think about the possibilities like entering stuff in a database emailing information and much much more!

Module api Guide

Name ResponseDescriptionType
playerSTRINGReturns player nameorder
costDOUBLE STRINGReturns order priceorder
productsSTRING SEPERATED BY ,Returns list with Products in order seperated by ,order
stypeSTRINGType of sale (Store , Categoryname)sale
valueINTEGER STRINGPercentage of the sale discountsale
saleSTRINGRaw version of Stype and Valuesale
Resultaat invoerveld gefilterd uit invoervelden