I forgot to mention, that there is a variable "type" and by default it is CC which means it will be readable with textUtils.serialize() but you can do type=json and then it will return everything in json!
It will be a GET api, so basically an example:
I want to return a user with id of 1:
Input:?command=user&subcommand=get&id=1
Output:
{["id"]=1,["username"]="Vilsol",["email"]="vilsol2000@gmail.com",["admin"]=1,["mcusername"]="Vilsol",["rank"]=2,["applications"]={[1]={["id"]=2,["userid"]=1,["name"]="Another App",["icon"]="80 80 80 80 80 80 *80 80 80N80o80 80 *80 80I80c80o80n80 *80 80 80 80 80 80 *",["description"]="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",["shortdescription"]="",["views"]=0,["category"]="Misc",["date"]=1378456955,["version"]=1,["accepted"]=0,["totalrating"]=0,["ratingcount"]=0,["downloads"]=0},[2]={["id"]=5,["userid"]=1,["name"]="Void OS",["icon"]="80 80 80 80 80 80 *80 80 80N80o80 80 *80 80I80c80o80n80 *80 80 80 80 80 80 *",["description"]="Operating system that is trying to stretch out to every day people.",["shortdescription"]="Operating system that is trying to stretch out to every day people.",["views"]=0,["category"]="OS",["date"]=1378509352,["version"]=1.5,["accepted"]=0,["totalrating"]=21,["ratingcount"]=5,["downloads"]=0}}}
Now the same, but with JSON:
Input:?command=user&subcommand=get&id=1&type=json
Output:{"id":"1","username":"Vilsol","email":"vilsol2000@gmail.com","admin":"1","mcusername":"Vilsol","rank":"2","applications":[{"id":"2","userid":"1","name":"Another App","icon":"80 80 80 80 80 80 *80 80 80N80o80 80 *80 80I80c80o80n80 *80 80 80 80 80 80 *","description":"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.","shortdescription":"","views":"0","category":"Misc","date":"1378456955","version":"1","accepted":"0","totalrating":"0","ratingcount":"0","downloads":"0"},{"id":"5","userid":"1","name":"Void OS","icon":"80 80 80 80 80 80 *80 80 80N80o80 80 *80 80I80c80o80n80 *80 80 80 80 80 80 *","description":"Operating system that is trying to stretch out to every day people.","shortdescription":"Operating system that is trying to stretch out to every day people.","views":"0","category":"OS","date":"1378509352","version":"1.5","accepted":"0","totalrating":"21","ratingcount":"5","downloads":"0"}]}
Now an example if I am searching for an application:
Input:?command=application&subcommand=search&name=pear
Output:{[1]={["id"]=1,["userid"]=2,["name"]="PearOS",["icon"]="00 00 00 8f 00 00 *00 00 8f 00 00 00 *00 8f 8f 8f 00 00 *08P08e08a08r08O08S*",["description"]="In short, PearOS is a graphical 'OS' for ComputerCraft. It completely (will, at this stage there are a few things that need to be added) removes the need to use the console. Why? Most of the people who play FTB with me have no idea how to use the computers and end up just playing 'adventure' on them. So, this is my answer to that problem.",["shortdescription"]="This is a but redundant, people won't want to enter it twice and will probably just copy and paste, but I'll ask that on the forums.",["views"]=0,["category"]="OS",["date"]=1378455254,["version"]=2,["accepted"]=0,["totalrating"]=9,["ratingcount"]=2,["downloads"]=0}}
Now if you searched for something that doesn't exist or wasn't found:
{["error"]=16,["message"]="Nothing has been found!"}
Also, if you do a function and it shouldn't give out any information like computer install command it would return like this:
{["success"]=1,["message"]="Successfully installed!"}
But you don't have to worry about making your own api for computers, because store will be giving an API which would work like this:
doRequest(command, subcommand, values)