Gadget XML Schema
Module Element
This forms the Gadget XML root element.
ModulePrefs Element
This serves as application metadata. At least one is required as a child element of the Module element.
| Attribute | Value | Required |
|---|---|---|
| title | The title of the application | Y |
Link Element
This primarily defines lifecycle events. More than one may be defined as child elements of a ModulePrefs element.
| Attribute | Value |
|---|---|
| rel | Event type (event.addapp |
| href | URL for receiving notifications on partner server = Endpoint URL |
| method | Type of request for Endpoint URL (GET |
The types of events which are designated with the rel attribute are as follows:
| Event | Description |
|---|---|
| event.addapp | Application installed |
| event.removeapp | Application uninstalled |
| event.joingroup | Joined official group for the game |
| event.leavegroup | Left official group for the game |
| event.postdiary | Posted diary entry relating to game |
Require Element
This designates an add-on function for the application in question.
| Attribute | Value | Required |
|---|---|---|
| feature | See below | Y |
Supported features
| Name | Function |
|---|---|
| opensocial-0.8 | Function using OpenSocial JS API v0.8.1 |
| flash | Function which embeds Flash content |
| views | Function which manipulates views |
| dynamic-height | Function which manipulates application display sizes, etc. |
| tabs | Function which manipulates tabs |
| mbga | Mobage Open Platform proprietary function |
Content Element
This describes content. At least one is required as a child element of the Module Element.
| Attribute | Value | Required |
|---|---|---|
| view | touch | Y |
| type | url | Y |
| href | Application start URL | Y |
Output DOCTYPE Declaration
| Attribute | Value | Required |
|---|---|---|
| quirks | if true, DOCTYPE declaration is not output; if false it is output. |
Examples
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Sample Application">
<Link rel="event.addapp" href="http://www.example.com/addapp" method="POST" />
<Link rel="event.removeapp" href="http://www.example.com/removeapp" method="GET" />
<Link rel="event.joingroup" href="http://www.example.com/joingroup" method="GET" />
<Link rel="event.leavegroup" href="http://www.example.com/leavegroup" method="GET" />
<Link rel="event.postdiary" href="http://www.example.com/postdiary" method="GET" />
</ModulePrefs>
<Content view="touch" type="url" href="http://www.example.com/index.html" />
</Module>
Revision History
- 03/01/2013
- Initial release.