i worked very hard and here is the first working version of the api
(from the git repo
https://bitbucket.org/kingarthursteam/mt-skin-db/src/7ff0edf2c2af0620fd179a608b3c19f9d898c8ec/api/apidoku.md)[spoiler]getlist
the JSON response for the getlist <pre>/api/get.json.php?getlist&outformat=base64&page=1</pre> this will return a JSON containing an array "skin" wich contains 10 single skins.
Param's
per_page: the amount of the skins can be set with the param per_page. possible values for per_page are 5,10,20 the default is 10.
page: the page is just the number of wich page wich shuld be read.
outformat: the outformat of the binary files. possible values are base64 or hex
example output:
http://minetest.fensta.bplaced.net/api/get.json.php?getlist&page=1&outformat=base64{
"page": 1,
"pages": 3,
"per_page": 10,
"skins": [
{
"id": 1,
"name": "Sam 0",
"author": "Jordach",
"license": "CC BY-SA 3.0",
"uploaded": "0000-00-00 00:00:00",
"type": "image/png",
"img": "iVBOEUgAAAEAAAA.....Bhc3NpdmUvSHVtYW7b7F0Y"
},
{
"id": 2,
"name": "Sam I",
"author": "Jordach",
"license": "CC BY-SA 3.0",
"uploaded": "0000-00-00 00:00:00",
"type": "image\/png",
"img": "iVBORw0KGgoA.....WhQTz\/1+E5ErkJggg=="
},
{
...
},
...
],
"success"=true
}
the json format:
the json format is a very strong data-interchange format wich can be readen and written by very much programming languages.
only lua dose it not know by default. but there exist a function to transform it into a luatable.
http://regex.info/blog/lua/jsonbase64 or hex?:
base64 is a format for binary files wich needs less space than the hex format.
for one skin its 0,2 KB less than hex. for the whole skin list its 2 KB lesser. to convert a base64 string into a binary string you can show at this page:
http://lua-users.org/wiki/BaseSixtyFour.[/spoiler]
maybe ill change something in the backend, but i think the output and input of this will keep as it is.
so you can now do some experiments with that :)