I will try to describe here the protocol used for the widget downloader. The system is based on a mysql-database which is accessible by a PHP-script hosted on a webserver. Requests are done via an HTTP-GET-Request to the following URL followed by some GET-parameters:

 http://spring.vsync.de/luaManager/lua_manager.php

* NEW 18/07/2009: Popularity-Rating added! (Downloads Per Day)

Protocol primitives

The parameter "m" defines which function to execute:

m Description Additional Parameters
0 Get Overview LUA List. Returns all available LUAs in the latest version which are active.
1 Get a list of all files to a LUA ID.id=[LuaID]
2 Get a single LUA by its ID.id=[LuaID]
3 Get All LUAs. Returns a list of all active LUAs including all versions.
4 Get image infos by NameID. Returns a list of images for a given NameID.id=[NameID]
5 Increments the download counter for a widget. Call it after downloading a widget.id=[LuaID]
6 Get all LUAs for a given nameID (returns all LUA-versions for a widget)id=[NameID]

Request Examples

The following examples can also be executed in a browser to test them out.

Get the overview list:

 http://spring.vsync.de/luaManager/lua_manager.php?m=0

Get image information for the widget-name-object that has (Name)ID 42:

 http://spring.vsync.de/luaManager/lua_manager.php?m=4&id=42

Return values

The server will answer your request with an XML-Document containing the requested information.

Object types

It is essential to know that there is a distinction between a widget's basic information (name, author, etc.) and a current version of a widget (version number, changelog, etc.). The basic information stuff is refered to as the widget's "name object". The name object is shared by all versions of a widget (referenced by NameID) and contains the following fields:

  • ID (a unique number -> NameID)
  • Widget Name
  • Widget Author
  • Supported Mods
  • Description
  • Image Count (how many gallery images are available)

A LUA-Object is a specific version of a widget. It contains these fields:

  • ID (a unique number -> LuaID)
  • Version
  • Entry-Date
  • Changelog
  • Download-Count
  • Downloads Per Day
  • NameID (-> Links to a "name object")
  • List of Files

File-Object:

  • URL (You can download the file via this URL)
  • MD5-Hash
  • Local-Path (a relative path inside the spring directory where this file has to be stored after download)

Image-Object:

  • URL (download the image via this URL)

Notes

  • When requesting LUA-objects, the fields of the corresponding name-object are merged into the reply.

Downloading Widgets

To download a widget, use the URL-fields from the file object as a file source. Same for gallery images.