Gadgets Features

From VZ Developer Wiki
Jump to: navigation, search

General Guidelines | XML Specification | Features | Views | JavaScript API | REST API | Tutorials | OAuth


Including Feature-Specific JavaScript Libraries

To create a gadget that uses a particular feature, such as tabs or a Flash movie, you must include the feature library in your gadget spec using the <Require> tag (inside <ModulePrefs>). For example:

<ModulePrefs 
  title="My Tabbed Gadget">
  <Require feature="tabs"/>
</ModulePrefs>

We provide the following feature libraries:

Feature Library Description Syntax

setprefs

Sets the value of a user preference programmatically.

<Require feature="setprefs"/>

dynamic-height

Gives a gadget the ability to resize itself. (included automatically)

<Require feature="dynamic-height"/>

settitle

Sets a gadget's title programmatically.

<Require feature="settitle"/>

tabs

Adds a tabbed interface to a gadget.

<Require feature="tabs"/>

minimessage

Displays a dismissable, temporary message inside a gadget.

<Require feature="minimessage"/>

flash

Embeds a Flash movie (specifically, a .swf file) in a gadget.

<Require feature="flash"/>

osapi

Activates new OpenSocial OSAPI methods

<Require feature="osapi"/>

opensocial-0.8 or opensocial-0.9 or opensocial-1.0 or opensocial

Activates OpenSocial API

<Require feature="opensocial-0.8"/>

opensocial-data

Activates OpenSocial DataPipelining and DataContext APIs

<Require feature="opensocial-data"/>

opensocial-templates

Activates OpenSocial Templates

<Require feature="opensocial-templates"/>

tracking

Enables VZ specific tracking methods for user interaction. (included automatically)

<Require feature="tracking"/>

cache

Enables VZ specific methods to get URLs to the current CDN directory of the gadget.

<Require feature="cache"/>

invite

Enables VZ specific invitation and suggestion methods.

<Require feature="invite"/>

vcard

Enables VZ specific methods to request vcard changes.

<Require feature="vcard"/>

vzflash

VZ specific method to implement flash using the swfobject library.

<Require feature="vzflash"/>

views

Methods to handle views and navigation between them

<Require feature="views"/>

Gadgets.rpc_(v0.8)

Methods for gadget <-> container communication (included automatically)

<Require feature="rpc"/>

skins

Methods to access vz specific styling information for current platform

<Require feature="skins"/>

pubsub

Methods for inter gadget pubsub communication

<Require feature="pubsub"/>

advertising

Methods for vz specific advertising API

<Require feature="advertising"/>

oauthpopup

Methods for OAuth Popup logic that is needed for proxied OAuth requests

<Require feature="oauthpopup"/>

embed

Methods for vz specific feature to embed a gadget into user generated content

<Require feature="embed"/>

To see all of the methods supported by a given feature, see the JavaScript API Reference.