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
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
Every module requires the structure like so:
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:
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
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!
|player||STRING||Returns player name||order|
|cost||DOUBLE STRING||Returns order price||order|
|products||STRING SEPERATED BY ,||Returns list with Products in order seperated by ,||order|
|stype||STRING||Type of sale (Store , Categoryname)||sale|
|value||INTEGER STRING||Percentage of the sale discount||sale|
|sale||STRING||Raw version of Stype and Value||sale|