<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/xsl' href='./OpenSocial.xslt' ?>
<?rfc toc="yes"?>
<?rfc-ext allow-markup-in-artwork="yes"?>
<!DOCTYPE rfc PUBLIC "-//IETF//DTD RFC 2629//EN"
"http://xml.resource.org/authoring/rfc2629.dtd">
<rfc ipr="full3978"
     docName="opensocial-social-gadget-specification-1-0"
     xmlns:x="http://purl.org/net/xml2rfc/ext">
 <front>
  <title abbrev="Social-Gadget">OpenSocial Social Gadget Specification 1.0</title>
  <author fullname="OpenSocial and Gadgets Specification Group">
   <address>
    <email>opensocial-and-gadgets-spec@googlegroups.com</email>
   </address>
  </author>
  <date month="March"
        year="2010" />
  <abstract>
   <t>This document defines additional APIs to add social capabilities to a <xref target="Core-Gadget">Core Gadget container</xref>.</t>
  </abstract>
  <area>General</area>
  <keyword>OpenSocial</keyword>
  <keyword>social networking</keyword>
  <keyword>REST</keyword>
  <keyword>XML</keyword>
  <keyword>Extensible Markup Language</keyword>
  <keyword>JSON</keyword>
  <keyword>JavaScript Object Notation</keyword>
  <keyword>Atom</keyword>
 </front>
 <middle>
  <section title="Notation and Conventions">
   <t>Domain name examples use <xref target="RFC2606">RFC2606</xref>.</t>
    <section title="Requirements">
   <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in 
   <xref target="RFC2119">RFC2119</xref>.</t>
 </section>
  </section>
  <section title="Overview">
   <t>OpenSocial provides three ways for gadgets to access social data.  First, the JavaScript API contains methods in the osapi.* namespace which map to the services defined in the Social API Server Specification. Second, Data Pipelining is a declarative syntax for specifying the social data a gadget will need, allowing the container to prefetch data for faster gadget rendering. Third, Templating provides several tags to accomplish common tasks, like displaying the UI for selecting friends from a list.</t>
  </section>
  <section title="JavaScript API Reference"
           anchor="JavaScriptAPIReference">
      <t>For an overview of the patterns used in the following reference, see the introduction to the <eref target="Core-Gadget.xml#JavaScript-API-Reference">JavaScript API Reference</eref> in <xref target="Core-Gadget" /></t>
      <section title="osapi.people"
               anchor="osapi.people">
       <t>Service object with functions that map to the 
       <eref target="./Social-API-Server.xml#People-Service">People service</eref>.</t>
       <section title="Method Details">
        <section title="get"
                 anchor="osapi.people.get">
         <list style="hanging">
         <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.people.get(params)</t>
         <t hangText="Description">Builds a request to retrieve information from the
         People service. When no parameter is specified, the container MUST use the 
         default values, returning the the viewer's information.</t>
         <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#People-Service-Get">People service's get method</eref>.</t>
         <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to retrieve information from the People service. Executing this request MUST return a <eref target="./Social-Data.xml#Person">Person</eref> object or a <eref target="./Core-Data.xml#Collection">Collection</eref> of <eref target="./Social-Data.xml#Person">Person</eref> objects.</t>
       </list>
        </section>
        <section title="getViewer"
                 anchor="osapi.people.getViewer">
         <list style="hanging">
          <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> }
         osapi.people.getViewer(params)</t>
          <t hangText="Description">A convenience over osapi.people.get() that builds a
         request to retrieve the viewer, as specified in the security token,
         from the People service.</t>
          <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#People-Service-Get">People service's get method</eref>, except that the value for the userId parameter is set to '@viewer'.</t>
          <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to retrieve information from the People service.  Executing this request MUST return a <eref target="./Social-Data.xml#Person">Person</eref> object representing the viewer.</t>
         </list>
        </section>
        <section title="getViewerFriends"
                 anchor="osapi.people.getViewerFriends">
         <list style="hanging">
          <t hangText="Signature">&lt;static&gt; {
         <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> }
         osapi.people.getViewerFriends(params)</t>
         <t hangText="Description">A convenience over osapi.people.get() that builds a
         request to retrieve the viewer's friends, as specified in the security
         token, from the People service.</t>
         <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#People-Service-Get">People service's get method</eref>, except that the value for the userId parameter is set to '@viewer' and the groupId parameter is set to "@friends".</t>
         <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to retrieve information from the People service. Executing this request MUST return a <eref target="./Core-Data.xml#Collection">Collection</eref> of <eref target="./Social-Data.xml#Person">Person</eref> objects representing the viewer's friends.</t>
        </list>
        </section>
        <section title="getOwner"
                 anchor="osapi.people.getOwner">
         <list style="hanging">
          <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> }
         osapi.people.getOwner(params)</t>
          <t hangText="Description">A convenience over osapi.people.get() that builds a
         request to retrieve the owner, as specified in the security token,
         from the People service.</t>
          <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#People-Service-Get">People service's get method</eref>, except that the value for the userId parameter is set to '@owner'.</t>
          <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to retrieve information from the People service.  Executing this request MUST return a <eref target="./Social-Data.xml#Person">Person</eref> object representing the owner.</t>
         </list>
        </section>
        <section title="getOwnerFriends"
                 anchor="osapi.people.getOwnerFriends">
         <list style="hanging">
          <t hangText="Signature">&lt;static&gt; {
         <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> }
         osapi.people.getOwnerFriends(params)</t>
         <t hangText="Description">A convenience over osapi.people.get() that builds a
         request to retrieve the owner's friends, as specified in the security
         token, from the People service.</t>
         <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#People-Service-Get">People service's get method</eref>, except that the value for the userId parameter is set to '@owner' and the groupId parameter is set to "@friends".</t>
         <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to retrieve information from the People service. Executing this request MUST return a <eref target="./Core-Data.xml#Collection">Collection</eref> of <eref target="./Social-Data.xml#Person">Person</eref> objects representing the owner's friends.</t>
        </list>
        </section>
       </section>
       <section title="Examples">
        <figure>
         <preamble>A Person request, the most basic example:</preamble>
         <artwork xml:space="preserve">
osapi.people.getViewer().execute(function(result) {
  if (!result.error) {
    alert('Your name is ' + result.displayName + '!');
  }
});</artwork>
        </figure>
        <figure>
         <preamble>A Person request with a JSON request parameter object
       specifying which fields to retrieve:</preamble>
         <artwork xml:space="preserve">
osapi.people.getViewer({fields: ['displayName', 'birthday']}).execute(function(result) {
  if (!result.error) {
    alert('Your name is ' + result.displayName + '!');
    alert('Your birthday is ' + result.birthday + '!');
  }
});
</artwork>
        </figure>
        <figure>
         <preamble>A simple example to request the owner's friends:</preamble>
         <artwork xml:space="preserve">
osapi.people.get({userId: '@owner', groupId: '@friends'}).execute(function(result) {
  if (!result.error) {
    alert('You have ' + result.totalResults + ' friends');
  }
});
</artwork>
        </figure>
        <figure>
         <preamble>An example that illustrates all available request
         parameters:</preamble>
         <artwork xml:space="preserve">
var params = {
    userId: "@owner", 
    groupId: "@friends",
    fields: "@all",
    count: 10,
    startIndex: 0, 
    startPage: 0
};
osapi.people.get(params).execute(function(result) {
  if (!result.error) {
    alert('You have ' + result.totalResults + ' friends');
  }
});
</artwork>
        </figure>
       </section>
      </section>
      <section title="osapi.activities"
               anchor="osapi.activities">
       <t>Service object with functions that map to the 
       <eref target="./Social-API-Server.xml#Activities-Service">Activities service</eref>.</t>
       <section title="Method Details">
        <section title="get"
                 anchor="osapi.activities.get">
         <list style="hanging">
          <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.activities.get(params)</t>
          <t hangText="Description">Builds a request to retrieve information from the
          Activities service. When no parameter is specified, the container MUST use the 
          default values, returning the viewer's activities.</t>
          <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#Activities-Service-Get">Activities service's get method</eref>, except that the 'appId' parameter can not be changed from "@app".</t>
          <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to retrieve information from the Activities service. Executing this request MUST return a <eref target="./Social-Data.xml#Activity">Activity</eref> object or a <eref target="./Core-Data.xml#Collection">Collection</eref> of <eref target="./Social-Data.xml#Activity">Activity</eref> objects.</t>
         </list>
        </section>
        <section title="create"
                 anchor="osapi.activities.create">
         <list style="hanging">
          <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.activities.get(params)</t>
          <t hangText="Description">Builds a request to create a new activity using the Activities service.</t>
          <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#Activities-Service-Create">Activities service's create method</eref>, except that the 'appId' parameter can not be changed from "@app".  This parameter is REQUIRED and MUST contain the 'activity' property.</t>
          <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to retrieve information from the Activities service. Executing this request MUST attempt to create the specified Activity and return the newly-created <eref target="./Social-Data.xml#Activity">Activity</eref> object if successful.</t>
         </list>
        </section>
       </section>
       <section title="Examples">
        <figure>
         <preamble>A simple example to retrieve the activities of the viewer's
         friends:</preamble>
         <artwork xml:space="preserve">
osapi.activities.get({userId: '@viewer', groupId: '@friends', count: 20}).execute(myCallback);
</artwork>
        </figure>
        <figure>
         <preamble>An example illustrating all available request parameters for
         osapi.activites.get():</preamble>
         <artwork xml:space="preserve">
var params = {
    userId: "@me", 
    groupId: "@self",
    activityIds = ["YYYYYYY", "ZZZZZZZ"],
    fields: "@all",
    count: 10,
    startIndex: 0, 
    startPage: 0
};
osapi.activities.get(params).execute(myCallback);
</artwork>
        </figure>
        <figure>
         <preamble>A simple example to create an activity for the
         viewer:</preamble>
         <artwork xml:space="preserve">
osapi.activities.create({userId: '@viewer', activity: {title: 'Hello!', url: 'http://mysite.com'}}).execute(myCallback);
</artwork>
        </figure>
        <figure>
         <preamble>An example illustrating all available request parameters for
         osapi.activites.create():</preamble>
         <artwork xml:space="preserve">
var params = {
    userId: "@viewer", 
    groupId: "@self",
    activity: {title: 'Hello!', url: 'http://mysite.com'}
};
osapi.activities.create(params).execute(myCallback);
</artwork>
        </figure>
       </section>
      </section>
      <section title="osapi.appdata"
               anchor="osapi.appdata">
       <t>Service object with functions that map to the 
       <eref target="./Social-API-Server.xml#AppData-Service">AppData service</eref>.</t>
       <section title="Method Details">
        <section title="get"
                 anchor="osapi.appdata.get">
         <list style="hanging">
          <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.appdata.get(params)</t>
          <t hangText="Description">Builds a request to retrieve information from the
          AppData service.</t>
          <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#AppData-Service-Get">AppData service's get method</eref>, except that the 'appId' parameter can not be changed from "@appId".  This parameter is REQUIRED, and MUST include the 'keys' property.</t>
          <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to retrieve information from the AppData service. Executing this request MUST return a JavaScript object where each of the requested keys is a property, and each property is populated with the corresponding value that was persisted using the AppData service.</t>
         </list>
        </section>
        <section title="update"
                 anchor="osapi.appdata.update">
         <list style="hanging">
          <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.appdata.update(params)</t>
          <t hangText="Description">Builds a request to update information stored in the
          AppData service.</t>
          <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#AppData-Service-Update">AppData service's update method</eref>, except that the 'appId' parameter can not be changed from "@appId".  This parameter is REQUIRED and MUST include the 'data' property.</t>
          <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to retrieve information from the AppData service. Executing this request MUST overwrite the existing AppData on the server, but does not return any values.</t>
         </list>
        </section>
        <section title="delete"
                 anchor="osapi.appdata.delete">
         <list style="hanging">
          <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.appdata.delete(params)</t>
          <t hangText="Description">Builds a request to delete information stored in the AppData service.</t>
          <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#AppData-Service-Delete">AppData service's delete method</eref>, except that the 'appId' parameter can not be changed from "@appId".  This parameter is REQUIRED and MUST include the 'keys' property.</t>
          <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to retrieve information from the AppData service. Executing this request MUST remove the specified key/value pairs from the server and return them as a JavaScript object.</t>
         </list>
        </section>
       </section>
       <section title="Examples">
        <figure>
         <preamble>A simple example to retrieve, update, and delete a piece of
         app data:</preamble>
         <artwork xml:space="preserve">
osapi.appdata.get({userId: '@viewer', groupId: '@friends', keys: ['gifts']}).execute(myGetCallback);
osapi.appdata.update({userId: '@viewer', data: {gifts: 'a crazed monkey'}}).execute(myUpdateCallback);
osapi.appdata.delete({keys: ['gifts']}).execute(myDeleteCallback)
</artwork>
        </figure>
        <figure>
         <preamble>An example illustrating all available request parameters for
         osapi.appdata.get():</preamble>
         <artwork xml:space="preserve">
var getParams = {
    userId: "@viewer", 
    groupId: "@friends",
    keys: ['gifts', 'wishlist']
};
osapi.appdata.get(getParams).execute(myGetCallback);
</artwork>
        </figure>
        <figure>
         <preamble>An example illustrating all available request parameters for
         osapi.appdata.update():</preamble>
         <artwork xml:space="preserve">
var updateParams = {
    auth: {"default" : null, "type" : "AuthToken"},
    userId: "@viewer", 
    groupId: "@friends",
    data: {gifts: 'a crazed monkey', wishlist: 'a banana peel'}
};
osapi.appdata.update(updateParams).execute(myUpdateCallback);
</artwork>
        </figure>
        <figure>
         <preamble>An example illustrating all available request parameters for
         osapi.appdata.delete():</preamble>
         <artwork xml:space="preserve">
var deleteParams = {
    userId: "@viewer", 
    groupId: "@friends",
    keys: ['gifts', 'wishlist']
};
osapi.appdata.delete(deleteParams).execute(myDeleteCallback)
</artwork>
        </figure>
       </section>
      </section>
<!-- ************************** -->
      <section title="osapi.groups"
               anchor="osapi.groups">
       <t>Service object with functions that map to the 
       <eref target="./Social-API-Server.xml#Groups-Service">Groups service</eref>.</t>
       <section title="Method Details">

        <section title="create"
                 anchor="osapi.groups.create">
         <list style="hanging">
          <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.groups.create(params)</t>
          <t hangText="Description">Builds a request to create a group via the Groups service.</t>
          <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="./Social-API-Server.xml#Groups-Service-Create">Groups service's create method</eref>, except that the 'userId' property can not be changed from the default value of '@me'. This parameter is REQUIRED, and MUST include the 'group' property.</t>
          <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to create a group via the Groups service. Executing this request MUST create a group and return the newly created group.</t>
         </list>
        </section>

        <section title="get"
                 anchor="osapi.groups.get">
         <list style="hanging">
          <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.groups.get(params)</t>
          <t hangText="Description">Builds a request to get a group or groups via the Groups service.</t>
          <t hangText="Parameters">This method takes one parameter, which is a JavaScript object representing the parameters defined by the <eref target="./Social-API-Server.xml#Groups-Service-Get">Groups service's get method</eref>, except that the 'userId' property can not be changed from the default value of '@me'. This parameter is REQUIRED, and MUST include the 'message' property.</t>
          <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to get a group or groups via the Groups service. Executing this request MUST return a <eref target="./Social-Data.xml#Group">Group</eref> or a <eref target="./Core-Data.xml#Collection">Collection</eref> of Groups.</t>
 </list>
</section>

<section title="update"
         anchor="osapi.groups.update">
 <list style="hanging">
  <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.groups.update(params)</t>
  <t hangText="Description">Builds a request to update a group via the Groups service.</t>
  <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="./Social-API-Server.xml#Groups-Service-Update">Groups service's update method</eref>, except that the 'userId' property can not be changed from the default value of '@me'. This parameter is REQUIRED, and MUST include the 'group' property.</t>
  <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to update a group via the Groups service. Executing this request MUST update a group, but does not return any information.</t>
 </list>
</section>

<section title="delete"
         anchor="osapi.groups.delete">
 <list style="hanging">
  <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.groups.delete(params)</t>
  <t hangText="Description">Builds a request to delete a group via the Groups service.</t>
  <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="./Social-API-Server.xml#Groups-Service-Delete">Groups service's delete method</eref>, except that the 'userId' property can not be changed from the default value of '@me'. This parameter is REQUIRED, and MUST include the 'message' property.</t>
  <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to delete a group via the Groups service. Executing this request MUST delete a group, but does not return any information.</t>
 </list>
</section>

</section>
</section>
<!-- ************************** -->
<section title="osapi.messages"
       anchor="osapi.messages">
<t>Service object with functions that map to the 
<eref target="./Social-API-Server.xml#Messages-Service">Messages service</eref>.</t>
<section title="Method Details">
<section title="send"
         anchor="osapi.messages.send">
 <list style="hanging">
  <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.messages.send(params)</t>
  <t hangText="Description">Builds a request to send a message via the Messages service.</t>
  <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#Messages-Service-Send">Messages service's send method</eref>, except that the 'userId' property can not be changed from the default value of '@me'. This parameter is REQUIRED, and MUST include the 'message' property.</t>
  <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to send a message via the Messages service. Executing this request MUST send a message, but does not return any information.</t>
 </list>
</section>
</section>
<section title="Examples">
<figure>
 <preamble>An example illustrating how to send a message using
 osapi.messages.send():</preamble>
 <artwork xml:space="preserve">
var params = {
message: {
"recipients" : ["example.org:AD38B3886625AAF", "example.org:997638BAA6F25AD"],
"title" : "You have a message from Joe",
"body" : "Some content",
"type" : "EMAIL"
},
};
osapi.messages.send(params).execute(messageSentCallback);
</artwork>
</figure>
</section>
</section>
<section title="osapi.albums" anchor="osapi.albums">
<t>Service object with functions that map to the 
<eref target="./Social-API-Server.xml#Albums-Service">Albums service</eref>.</t>
<section title="Method Details">
<section title="get"
         anchor="osapi.albums.get">
 <list style="hanging">
  <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.albums.get(params)</t>
  <t hangText="Description">Builds a request to retrieve information from the
  Albums service.</t>
  <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#Albums-Service-Get">Albums service's get method</eref>, except that the 'appId' parameter can not be changed from "@appId".</t>
  <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to retrieve information from the Albums service. Executing this request MUST return a <eref target="./Social-Data.xml#Album">Album</eref> object or a <eref target="./Core-Data.xml#Collection">Collection</eref> of <eref target="./Social-Data.xml#Album">Album</eref> objects.</t>
 </list>
</section>
<section title="create"
                 anchor="osapi.albums.create">
         <list style="hanging">
          <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.albums.get(params)</t>
          <t hangText="Description">Builds a request to create a new album using the Albums service.</t>
          <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#Albums-Service-Create">Albums service's create method</eref>, except that the 'appId' parameter can not be changed from "@app".  This parameter is REQUIRED and MUST contain the 'data' property.</t>
          <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to retrieve information from the Albums service. Executing this request MUST attempt to create the specified Album and return the newly-created <eref target="./Social-Data.xml#Album">Albums</eref> object if successful.</t>
         </list>
        </section>
        <section title="update"
                 anchor="osapi.albums.update">
         <list style="hanging">
          <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.albums.update(params)</t>
          <t hangText="Description">Builds a request to update information stored in the
          Activities service.</t>
          <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#Albums-Service-Update">Albums service's update method</eref>, except that the 'appId' parameter can not be changed from "@appId".  This parameter is REQUIRED and MUST include the 'data' property.</t>
          <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to retrieve information from the Albums service. Executing this request MUST overwrite the existing Albums on the server, but does not return any values.</t>
         </list>
        </section>
        <section title="delete"
                 anchor="osapi.albums.delete">
         <list style="hanging">
          <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.albums.delete(params)</t>
          <t hangText="Description">Builds a request to delete information stored in the Albums service.</t>
          <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#Albums-Service-Delete">Albums service's delete method</eref>, except that the 'appId' parameter can not be changed from "@appId".  This parameter is REQUIRED and MUST include the 'ids' property.</t>
          <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to retrieve information from the Albums service. Executing this request MUST remove the specified Albums from the server and return them as a JavaScript object.</t>
         </list>
        </section>
        </section>
        <section title="Examples">
        </section>
      </section>
      <section title="osapi.mediaitems" anchor="osapi.mediaitems">
       <t>Service object with functions that map to the 
       <eref target="./Social-API-Server.xml#MediaItems-Service">MediaItems service</eref>.</t>
        <section title="Method Details">
        <section title="get"
                 anchor="osapi.mediaItems.get">
         <list style="hanging">
          <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.mediaItems.get(params)</t>
          <t hangText="Description">Builds a request to retrieve information from the
          MediaItems service.</t>
          <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#MediaItems-Service-Get">MediaItems service's get method</eref>, except that the 'appId' parameter can not be changed from "@appId".</t>
          <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to retrieve information from the MediaItems service. Executing this request MUST return a <eref target="./Social-Data.xml#MediaItem">MediaItems</eref> object or a <eref target="./Core-Data.xml#Collection">Collection</eref> of <eref target="./Social-Data.xml#MediaItem">MediaItems</eref> objects.</t>
         </list>
        </section>
        <section title="create"
                 anchor="osapi.mediaItems.create">
         <list style="hanging">
          <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.mediaItems.get(params)</t>
          <t hangText="Description">Builds a request to create a new media item using the MediaItems service.</t>
          <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#MediaItems-Service-Create">MediaItems service's create method</eref>, except that the 'appId' parameter can not be changed from "@app".  This parameter is REQUIRED and MUST contain the 'data' property.</t>
          <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to retrieve information from the MediaItems service. Executing this request MUST attempt to create the specified MediaItems and return the newly-created <eref target="./Social-Data.xml#MediaItem">MediaItem</eref> object if successful.</t>
         </list>
        </section>
        <section title="update"
                 anchor="osapi.mediaItems.update">
         <list style="hanging">
          <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.mediaItems.update(params)</t>
          <t hangText="Description">Builds a request to update information stored in the
          MediaItems service.</t>
          <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#MediaItems-Service-Update">MediaItems service's update method</eref>, except that the 'appId' parameter can not be changed from "@appId".  This parameter is REQUIRED and MUST include the 'data' property.</t>
          <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to retrieve information from the MediaItems service. Executing this request MUST overwrite the existing MediaItems on the server, but does not return any values.</t>
         </list>
        </section>
        <section title="delete"
                 anchor="osapi.mediaItems.delete">
         <list style="hanging">
          <t hangText="Signature">&lt;static&gt; { <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> } osapi.mediaItems.delete(params)</t>
          <t hangText="Description">Builds a request to delete information stored in the MediaItems service.</t>
          <t hangText="Parameters">This method takes a single parameter, which is a JavaScript object representing the parameters defined by the <eref target="Social-API-Server.xml#MediaItems-Service-Delete">MediaItems service's delete method</eref>, except that the 'appId' parameter can not be changed from "@appId".  This parameter is REQUIRED and MUST include the 'ids' property.</t>
          <t hangText="Returns">A <eref target="Core-Gadget.xml#osapi.Request">osapi.Request</eref> to retrieve information from the MediaItems service. Executing this request MUST remove the specified MediaItems from the server and return them as a JavaScript object.</t>
         </list>
        </section>
        </section>
        <section title="Examples">
        </section>
      </section> 
    <section title="opensocial"
             anchor="opensocial">
     <t>Namespace for top-level people functions.</t>
     <t>There are cases where a gadget may wish to perform an action that needs
     approval by the user or mediation by the container. OpenSocial supports
     "request" features that allow the container to decide how to handle the
     interaction with the user. Functions like
     opensocial.requestCreateActivity, and opensocial.requestPermission allow
     the container to inject its own policy decisions into the gadget execution
     flow and notify the gadget of the result. Under this specification, it is
     equally valid for a container to defer to the user, always approve, always
     deny, or use any other method to determine responses to request calls.
     Additionally, this allows the container to enforce UI flows in a safe and
     integrated way.</t>
     <section title="Method Details">
      <section title="getEnvironment"
               anchor="opensocial.getEnvironment">
       <list style="hanging">
       <t hangText="Signature">&lt;static&gt; 
       <x:ref>opensocial.Environment</x:ref>
       opensocial.getEnvironment()</t>
       <t hangText="Description">Gets the current environment for this gadget. You can
       use the environment to make queries such as what profile fields and
       surfaces are supported by this container, what parameters were passed to
       the current gadget, and so on.</t>
       <t hangText="Parameters">None.</t>
       <t hangText="Returns">
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>
         <x:ref>opensocial.Environment</x:ref>
        </c>
        <c>The current environment.</c>
       </texttable></t>
       </list>
      </section>
      <section title="hasPermission"
               anchor="opensocial.hasPermission">
       <list style="hanging">
       <t hangText="Signature">&lt;static&gt; <eref target="./Core-Data.xml#Boolean">Boolean</eref>
       opensocial.hasPermission(permission)</t>
       <t hangText="Description">Returns true if the current gadget has access to the
       specified permission. If the gadget calls opensocial.requestPermission
       and permissions are granted then this function must return true on all
       subsequent calls.</t>
       <t hangText="Parameters"> 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>permission</c>
        <c><x:ref>opensocial.Permission</x:ref></c>
        <c>The permission.</c>
       </texttable></t>
       <t hangText="Returns">
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c><eref target="./Core-Data.xml#Boolean">Boolean</eref></c>
        <c>True if the gadget has access for the permission; false if it
        doesn't.</c>
       </texttable></t>
       </list>
      </section>
      <section title="newNavigationParameters"
               anchor="opensocial.newNavigationParameters">
       <list style="hanging">
       <t hangText="Signature">&lt;static&gt; <x:ref>opensocial.NavigationParameters</x:ref>
       opensocial.newNavigationParameters(parameters)</t>
       <t hangText="Description">Creates a NavigationParameters object. See also: 
       <xref target="opensocial.requestShareApp">
       requestShareApp()</xref>.</t>
       <t hangText="Parameters"> 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>parameters</c>
        <c>Map.&lt;<x:ref>opensocial.NavigationParameters.Field</x:ref>|Object&gt;</c>
        <c>Parameters defining the navigation</c>
       </texttable></t>
       <t hangText="Returns">
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c><x:ref>opensocial.NavigationParameters</x:ref></c>
        <c>The new NavigationParameters object</c>
       </texttable></t>
       </list>
      </section>
      <section title="requestPermission"
               anchor="opensocial.requestPermission">
       <list style="hanging">
       <t hangText="Signature">&lt;static&gt; void opensocial.requestPermission(permissions, reason,
       opt_callback)</t>
       <t hangText="Description">Requests the user to grant access to the specified
       permissions. If the container does not support this method the callback
       will be called with a opensocial.ResponseItem. The response item will
       have its error code set to 'notImplemented'.</t>
       <t hangText="Parameters">
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>permissions</c>
        <c>Array.&lt;<x:ref>opensocial.Permission</x:ref>&gt;</c>
        <c>The permissions to request from the viewer</c>
        <c>reason</c>
        <c>String</c>
        <c>Displayed to the user as the reason why these permissions are
        needed</c>
        <c>opt_callback</c>
        <c>Function</c>
        <c>The function to call once the request has been processed; either
        this callback will be called or the gadget will be reloaded from
        scratch. This function will be passed one parameter, an
        opensocial.ResponseItem. The error code will be set to reflect whether
        there were any problems with the request. If there was no error, all
        permissions were granted. If there was an error, you can use
        opensocial.hasPermission to check which permissions are still denied.
        The data on the response item will be set. It will be an array of the
        opensocial.Permissions that were granted. The callback function will
        not be called until after the existing callstack has completed
        execution.</c>
       </texttable></t>
       <t hangText="Returns">None.</t>
       </list>
      </section>
      <section title="requestShareApp"
               anchor="opensocial.requestShareApp">
       <list style="hanging">
       <t hangText="Signature">&lt;static&gt; void opensocial.requestShareApp(recipients, reason,
       opt_callback, opt_params)</t>
       <t hangText="Description">Requests that the container share this gadget with the
       specified users. The callback function is passed one parameter, an
       opensocial.ResponseItem. The error code will be set to reflect whether
       there were any problems with the request. If there was no error, the
       sharing request was sent. If there was an error, you can use the
       response item's getErrorCode method to determine how to proceed. The
       data on the response item will not be set. If the container does not support this method the callback will be called with a opensocial.ResponseItem. The response item will have its
       error code set to 'notImplemented'.</t>
       <t hangText="Parameters"> 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>recipients</c>
        <c><x:ref>opensocial.IdSpec</x:ref></c>
        <c>An IdSpec used to specify which people/groups to send the ShareApp
        request to.</c>
        <c>reason</c>
        <c><x:ref>opensocial.Message</x:ref></c>
        <c>The reason the user wants the gadget to share itself. This reason
        can be used by the container when prompting the user for permission to
        share the app. It may also be ignored.</c>
        <c>opt_callback</c>
        <c>Function</c>
        <c>The function to call once the request has been processed; either
        this callback will be called or the gadget will be reloaded from
        scratch. The callback function will not be called until after the
        existing callstack has completed execution.</c>
        <c>opt_params</c>
        <c><x:ref>opensocial.NavigationParameters</x:ref></c>
        <c>The optional parameters indicating where to send a user when a
        request is made, or when a request is accepted; options are of type 
        NavigationParameters.DestinationType.</c>
       </texttable></t>
       <t hangText="Returns">None.</t>
       </list>
      </section>
     </section>
    </section>
    <section title="opensocial.Environment"
             anchor="opensocial.Environment">
     <t>Represents the current environment for a gadget. See also: 
     <xref target="opensocial.getEnvironment">
     opensocial.getEnvironment()</xref>.</t>
     <section title="Method Details">
      <section title="getDomain"
               anchor="opensocial.Environment.getDomain">
       <list style="hanging">
       <t hangText="Signature">String getDomain()</t>
       <t hangText="Description">Returns the current domain. for example, "orkut.com" or
       "myspace.com".</t>
       <t hangText="Parameters">None.</t>
       <t hangText="Returns">
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The domain</c>
       </texttable></t>
       </list>
      </section>
      <section title="supportsField"
               anchor="opensocial.Environment.supportsField">
       <list style="hanging">
       <t hangText="Signature"><eref target="./Core-Gadget.xml#Boolean">Boolean</eref> supportsField(objectType, fieldName)</t>
       <t hangText="Description">Returns true if the specified field is supported in this
       container on the given object type, and returns false otherwise.</t>
       <t hangText="Parameters">
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>objectType</c>
        <c><x:ref>opensocial.Environment.ObjectType</x:ref></c>
        <c>The object type to check for the field</c>
        <c>fieldName</c>
        <c>String</c>
        <c>The name of the field to check for</c>
       </texttable></t>
       <t hangText="Returns">
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c><eref target="./Core-Gadget.xml#Boolean">Boolean</eref></c>
        <c>True if the field is supported on the specified object type</c>
       </texttable></t>
       </list>
      </section>
     </section>
    </section>
    <section title="opensocial.Environment.ObjectType"
             anchor="opensocial.Environment.ObjectType">
     <t>The types of objects in this container. 
     <t>See also: 
     <xref target="opensocial.Environment.supportsField">
     Environment.supportsField()</xref> </t></t>
     <list style="hanging">
      <t hangText="ACTIVITY">
       <t>This field may be used interchangeably with the string
       'activity'.</t>
      </t>
      <t hangText="ADDRESS">
       <t>This field may be used interchangeably with the string
       'address'.</t>
      </t>
      <t hangText="BODY_TYPE">
       <t>This field may be used interchangeably with the string
       'bodyType'.</t>
      </t>
      <t hangText="EMAIL">
       <t>This field may be used interchangeably with the string
       'email'.</t>
      </t>
      <t hangText="FILTER_TYPE">
       <t>This field may be used interchangeably with the string
       'filterType'.</t>
      </t>
      <t hangText="MEDIA_ITEM">
       <t>This field may be used interchangeably with the string
       'mediaItem'.</t>
      </t>
      <t hangText="MESSAGE">
       <t>This field may be used interchangeably with the string
       'message'.</t>
      </t>
      <t hangText="MESSAGE_TYPE">
       <t>This field may be used interchangeably with the string
       'messageType'.</t>
      </t>
      <t hangText="NAME">
       <t>This field may be used interchangeably with the string
       'name'.</t>
      </t>
      <t hangText="ORGANIZATION">
       <t>This field may be used interchangeably with the string
       'organization'.</t>
      </t>
      <t hangText="PERSON">
       <t>This field may be used interchangeably with the string
       'person'.</t>
      </t>
      <t hangText="PHONE">
       <t>This field may be used interchangeably with the string
       'phone'.</t>
      </t>
      <t hangText="SORT_ORDER">
       <t>This field may be used interchangeably with the string
       'sortOrder'.</t>
      </t>
      <t hangText="URL">
       <t>This field may be used interchangeably with the string
       'url'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.NavigationParameters"
             anchor="opensocial.NavigationParameters">
     <t>Parameters used by RequestShareApp to instruct the container on where
     to go after the request is made. It could be used, for example, to specify
     where viewers get routed in one of two cases: 
     <list style="numbers">
      <t>After a user gets a shareApp invitation or receives a message a gadget
      developer should be able to send that user to a context sensitive
      place.</t>
      <t>After a viewer actually shares an app with someone else the gadget
      developer should be able to redirect the viewer to a context sensitive
      place.</t>
     </list></t>
     <section title="Method Details">
      <section title="getField"
               anchor="opensocial.NavigationParameters.getField">
       <list style="hanging">
       <t hangText="Signature">String getField(key, opt_params)</t>
       <t hangText="Description">Gets the data from the NavigationParameters that is associated
       with the specified key.</t>
       <t hangText="Parameters">
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to get data for; see <x:ref>opensocial.NavigationParameters.Field</x:ref> class for supported values</c>
        <c>opt_params</c>
        <c>Map.&lt;<x:ref>opensocial.DataRequest.DataRequestFields</x:ref>|Object&gt;</c>
        <c>Additional params to pass to the request.</c>
       </texttable></t>
       <t hangText="Returns">
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The data</c>
       </texttable></t>
       </list>
      </section>
      <section title="setField"
               anchor="opensocial.NavigationParameters.setField">
       <list style="hanging">
       <t hangText="Signature">void setField(key, data)</t>
       <t hangText="Description">Sets data for this NavigationParameters associated with
       the given key.</t>
       <t hangText="Parameters"> 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to set data for</c>
        <c>data</c>
        <c>Object</c>
        <c>The data to set</c>
       </texttable></t>
       <t hangText="Returns">None.</t>
       </list>
      </section>
     </section>
    </section>
    <section title="opensocial.NavigationParameters.DestinationType"
             anchor="opensocial.NavigationParameters.DestinationType">
     <t>The destinations available for navigation in 
     <xref target="opensocial.requestShareApp">requestShareApp</xref> and 
     <xref target="opensocial.requestSendMessage">
     requestSendMessage</xref>.</t>
     <list style="hanging">
      <t hangText="RECIPIENT_DESTINATION">
       <t>This field may be used interchangeably with the string
       'recipientDestination'.</t>
      </t>
      <t hangText="VIEWER_DESTINATION">
       <t>This field may be used interchangeably with the string
       'viewerDestination'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.NavigationParameters.Field"
             anchor="opensocial.NavigationParameters.Field">
     <t>All of the fields that NavigationParameters can have. 
     <t>See also: 
     <xref target="opensocial.NavigationParameters.getField">
     opensocial.NavigationParameters.getField()</xref> </t></t>
     <list style="hanging">
      <t hangText="OWNER">
       <t>A string representing the owner id. This field may be
       used interchangeably with the string 'owner'.</t>
      </t>
      <t hangText="PARAMETERS">
       <t>An optional list of parameters passed to the gadget once
       the new view, with the new owner, has been loaded. This field may be
       used interchangeably with the string 'parameters'.</t>
      </t>
      <t hangText="VIEW">
       <t>The gadgets.views.View to navigate to. This field may be
       used interchangeably with the string 'view'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.Permission"
             anchor="opensocial.Permission">
     <t>The permissions an app can ask for. 
     <t>See also: 
     <xref target="opensocial.hasPermission">opensocial.hasPermission()</xref>,
     
     <xref target="opensocial.requestPermission">
     opensocial.requestPermission()</xref> </t></t>
     <list style="hanging">
      <t hangText="VIEWER">

       <t>Access to the viewer person object This field may be
       used interchangeably with the string 'viewer'.</t>
      </t>
     </list>
    </section>
  </section>
  <section title="Data Pipelining">
    <t>The Social Gadget Specification extends the <eref target="./Core-Gadget.xml#Data-Pipelining">Data Pipelining</eref> capabilities of the Core Gadget Specification by adding support for the following tags:</t>
  <section title="&lt;os:PeopleRequest&gt;"
           anchor="PeopleRequest">
   <list style="hanging">
    <t hangText="Description">A request to get profile information for a group or list of people. This is
    equivalent to using &lt;os:DataRequest&gt; with @method of "people.get".</t>
    <t hangText="Attributes">The attributes of this tag are equivalent to the parameters defined by the <eref target="Social-API-Server.xml#People-Service-Get">People service's get method</eref>.</t> 
    <t hangText="Returns">A <eref target="./Social-Data.xml#Person">Person</eref> object or a <eref target="./Core-Data.xml#Collection">Collection</eref> of <eref target="./Social-Data.xml#Person">Person</eref> objects.</t>
   </list>
   <figure>
    <preamble>Example</preamble>
    <artwork xml:space="preserve">
&lt;os:PeopleRequest key="PagedFriends" userId="@owner" groupId="@friends" startIndex="40" count="20"/&gt;
</artwork>
   </figure>
  </section>
  <section title="&lt;os:ViewerRequest&gt;, &lt;os:OwnerRequest&gt;"
           anchor="ViewerRequest">
   <list style="hanging">
    <t hangText="Description">A request to get the viewer's or owner's profile information. This is equivalent to
   using &lt;os:DataRequest&gt; with @method of "people.get", with @userId of either "@viewer" or "@owner".</t>
    <t hangText="Attributes">The attributes of this tag are equivalent to the parameters defined by the <eref target="Social-API-Server.xml#People-Service-Get">People service's get method</eref>, except that the 'userId' parameter can not be changed from "@viewer" or "@owner".</t>
    <t hangtext="Returns">A <eref target="./Social-Data.xml#Person">Person</eref> object.</t>
   </list>
   <figure>
    <preamble>Example</preamble>
    <artwork xml:space="preserve">
&lt;os:ViewerRequest key="Viewer" fields="name, birthday"/&gt;
</artwork>
   </figure>
  </section>
  <section title="&lt;os:ActivitiesRequest&gt;"
           anchor="ActivitiesRequest">
   <list style="hanging">
    <t hangText="Description">A request to get activities. This is equivalent to using
   &lt;os:DataRequest&gt; with @method of "activities.get".</t>
    <t hangText="Attributes">The attributes of this tag are equivalent to the parameters defined by the <eref target="Social-API-Server.xml#Activities-Service-Get">Activities service's get method</eref>, except the 'appId' parameter can not be changed from "@app".</t> 
    <t hangtext="Returns">A <eref target="./Social-Data.xml#Activity">Activity</eref> object or a <eref target="./Core-Data.xml#Collection">Collection</eref> of <eref target="./Social-Data.xml#Activity">Activity</eref> objects.</t>
   </list>
   <figure>
    <preamble>Example:</preamble>
    <artwork xml:space="preserve">
&lt;os:ActivitiesRequest key="ViewerActivities" userid="@viewer" startIndex="40" count="20"/&gt;
</artwork>
   </figure>
  </section>
  </section>
  <section title="Templating">
  <t>This specification defines a set of tags, known as OpenSocial Markup Language (OSML) tags, that extend the templating capabilities of the Core Gadget Container specification.</t>
  <section title="Gadget Feature Name">
   <t>To use OSML tags, you need to add the "osml" feature to your gadget spec:   
   <figure>
    <artwork xml:space="preserve">
&lt;Require feature="osml"&gt;
</artwork>
   </figure>OSML tags are a strict subset of OpenSocial Templating, you can
   also use tags if you use the "opensocial-templates" feature: 
   <figure>
    <artwork xml:space="preserve">
&lt;Require feature="opensocial-templates"&gt;
</artwork>
   </figure>The reason for separate require features is that templates may not
   be supported on all views for all containers, due to processing and/or
   latency costs. OSML tags must be supported in all views.</t>
  </section>
  <section title="Tag Invocation">
   <t>An OSML tag is invoked much like an OpenSocial template. It needs to be
   surrounded by a &lt;script&gt; tag with @type="text/os-template": 
   <figure>
    <artwork xml:space="preserve">
Welcome, &lt;script type="text/os-template" xmlns:os="http://ns.opensocial.org/2008/markup"&gt;&lt;os:Name person="${Viewer}"/&gt;&lt;/script&gt;!                                     
</artwork>
   </figure></t>
  </section>
  <section title="Tags">
   <t>An implementing Container MUST support at least the tags listed in this
   section. A Container MAY support additional tags - an effort will be made to
   make such support as consistent as possible across different Containers, and
   tags that are deemed useful may be adopted into this specification in the
   future.</t>
   <section title="&lt;os:Name&gt;">
    <t>Inline tag to show a person's name. If a profile URL is available it
    will be linked to. The tag may display additional container bling (i.e.
    more information on hover), but must do so without breaking up text
    flow.</t>
    <t>Attributes: 
    <list style="symbols">
     <t>@person {Object} The person object. (required)</t>
    </list>
    <figure>
     <preamble>Example</preamble>
     <artwork xml:space="preserve">
&lt;script type="text/os-template" xmlns:os="http://ns.opensocial.org/2008/markup"&gt;Welcome, &lt;os:Name person="${Viewer}"/&gt;&lt;/script&gt;
</artwork>
    </figure></t>
   </section>
   <section title="&lt;os:PeopleSelector&gt;">
    <t>Tag to show a UI that chooses from a list of people, and set a form
    field with the associated value.</t>
    <t>Attributes: 
    <list style="symbols">
     <t>@group {Object} An array of person objects.</t>
     <t>@inputName {string} Name of the form input element that will contain
     selected id(s). Containers can provide a default here. (optional)</t>
     <t>@multiple {boolean} Allow multiple selections? (optional)</t>
     <t>@max {number} Maximum number of people that can be selected.
     (optional)</t>
     <t>@var{string} Name of the top level DataContext variable that is set
     with the selected person object (or array of objects). (optional)</t>
     <t>@onselect {string|function} Client side script function to invoke when
     a selection is made. The function will get the selected person object (or
     array of objects) as a parameter. (optional)</t>
    </list>
    <figure>
     <preamble>Example</preamble>
     <artwork xml:space="preserve">
&lt;form action="/top_friends.php" method="POST"&gt;
  Select your top 8 friends:
  &lt;script type="text/os-template" xmlns:os="http://ns.opensocial.org/2008/markup"&gt;
    &lt;os:PeopleSelector group="${ViewerFriends}" multiple="true" max="8" inputName="top8"/&gt;
  &lt;/script&gt;  
&lt;/form&gt;
</artwork>
    </figure></t>
   </section>
   <section title="&lt;os:Badge&gt;">
    <t>Block level tag to show information about a person in the style of the
    container, usually with an image.</t>
    <t>Attributes: 
    <list style="symbols">
     <t>@person {string|Object} The person object or DataContext key referring
     to a person object. (required)</t>
    </list>
    <figure>
     <preamble>Example</preamble>
     <artwork xml:space="preserve">
My best friend is:&lt;br/&gt;
&lt;script type="text/os-template" xmlns:os="http://ns.opensocial.org/2008/markup"&gt;&lt;os:Badge person="${TopFriend}"/&gt;&lt;/script&gt;
</artwork>
    </figure></t>
   </section>
  </section>
  <section title="Non-Tags">
   <t>There are a number of potential tags that can be better supported using
   templating, for reasons outlined below.</t>
   <t>Note that most of these capabilities will require using the
   "opensocial-templates" feature.</t>
   <section title="Non-Tag: Inserting Text Content">
    <t>For generating text content, expressions are used instead of tags.</t>
    <t>Example: 
    <list style="symbols">
     <t>${Viewer.name} or</t>
     <t>${Owner.jobs[0].Title} instead of</t>
     <t>&lt;os:Name&gt; (note that &lt;os:Name&gt; is for showing a linked
     name, not for inserting text only).</t>
    </list>Reasoning: 
    <list style="symbols">
     <t>Extends to all OpenSocial fields (see the <eref target="Social-Data.xml#Person">Person</eref> object for a
     list).</t>
     <t>Can be used in attributes, such as &lt;input type="submit" value="Share
     with ${Name}"&gt;.</t>
    </list></t>
    <section title="Non-Tags: Flow Control">
     <t>For conditional content, a conditional statement in OpenSocial
     templating is used along with an expression.</t>
     <t>Example: 
     <list style="symbols">
      <t>&lt;div if="${!viewer.hasApp}"&gt;&lt;a href="..."&gt;Click here to
      install!&lt;/a&gt;&lt;/div&gt; or</t>
      <t>&lt;div if="${jobs[0].Title}"&gt;${name}'s job is
      ${jobs[0].Title}"&lt;/div&gt;</t>
     </list>instead of 
     <list style="symbols">
      <t>&lt;os:HasApp&gt; etc.</t>
     </list>Reasoning: 
     <list style="symbols">
      <t>Extends well to a large number of conditional constructs (no need for
      one tag per condition).</t>
      <t>Equivalently simple to use.</t>
     </list></t>
    </section>
    <section title="Non-Tags: Pronoun">
     <t>For pronouns, conditional HTML blocks based on gender are used.</t>
     <t>Example: 
     <list style="symbols">
      <t>&lt;span if="${person.gender == 'MALE'}"&gt;He said "boo"&lt;/span&gt;
      &lt;span if="${person.gender == 'FEMALE'}"&gt;She said "boo"&lt;/span&gt;
      instead of</t>
      <t>&lt;span&gt;&lt;os:Pronoun&gt; said "boo"&lt;/span&gt;</t>
     </list>Reasoning: 
     <list style="symbols">
      <t>You need full sentences to localize properly.</t>
     </list></t>
    </section>
    <section title="Non-Tags: Get">
     <t>Inlining of remote HTML markup is possible via a combination of Data
     Pipelining's &lt;os:HttpRequest&gt; tag and OpenSocial Templates variable
     inlining via the ${data} syntax. Thus a dedicated &lt;os:Get&gt; tag is
     not needed.</t>
     <t>Example: 
     <list style="symbols">
      <t>&lt;os:HttpRequest key="Data" href="http://example.com/data.html"
      format="text"&gt;</t>
      <t>Then use &lt;os:Html code="${Data}"/&gt; in your template.</t>
     </list>Reasoning: 
     <list style="symbols">
      <t>Re-using existing capabilities avoids doing the same thing in two
      different ways.</t>
     </list></t>
    </section>
   </section>
  </section>
  <section title="Interaction with Proxied Content">
   <t>The combination of tags, templates, and proxied content leads to a number
   of combinations for developer to use.</t>
   <t>Here are a few common use cases and how developers might handle them.
   This is for informational purposes only - it doesn't extend the proposal,
   but hopefully clarifies a few use cases.</t>
   <section title="Flow control and repeated elements">
    <t>OpenSocial data will be posted on the developer server and flow control
    will be handled on the developers own server, in PHP, JSP, ASP, or the
    language of the developer's choice. 
    <figure>
     <preamble>Example Gadget XML</preamble>
     <artwork xml:space="preserve">
&lt;Content href="http://developer.com/canvas" xmlns:os="http://ns.opensocial.org/2008/markup"&gt;
  &lt;os:PeopleRequest userId="@viewer" groupId="@friends" fields="name,birthday" key="ViewerFriends"&gt;
&lt;/Content&gt;
</artwork>
    </figure>
    <figure>
     <preamble>Example PHP</preamble>
     <artwork xml:space="preserve">
&lt;?php
// Some code that pulls POST param into $ViewerFriends here
foreach ($ViewerFriends as $friend) {
  if ($friend['birthday']) {
    echo "&lt;div&gt;".$friend['name']."'s birthday is".$friend['birthday']"&lt;/div&gt;";
  }
}
?&gt;
</artwork>
    </figure></t>
   </section>
   <section title="Tags">
    <t>Tags can be inserted into the output and will be processed by the
    container or JavaScript on the client side. 
    <figure>
     <preamble>Example Gadget XML</preamble>
     <artwork xml:space="preserve">
&lt;Content href="http://developer.com/canvas" xmlns:os="http://ns.opensocial.org/2008/markup"&gt;
  &lt;os:PersonRequest userId="@owner" key="Owner"/&gt;
&lt;/Content&gt;
</artwork>
    </figure>
    <figure>
     <preamble>Example PHP</preamble>
     <artwork xml:space="preserve">
&lt;?php // Let the Container know that the Owner object is needed for post-processing ?&gt;      
&lt;script type="text/os-data" xmlns:os="http://ns.opensocial.org/2008/markup"&gt;
  &lt;os:PersonRequest userId="@owner" key="Owner"/&gt;
&lt;/script&gt;
&lt;?php
// Some code that pulls POST param into $Owner
echo "High score for &lt;script type=\"text/os-template\" xmlns:os=\"http://ns.opensocial.org/2008/markup\"&gt;"
  . "&lt;os:Name person=\"${Owner}\"&gt;&lt;/script&gt; is " . getHighScore($Owner['id']);
?&gt;
</artwork>
    </figure>
    <figure>
     <preamble>PHP Output</preamble>
     <artwork xml:space="preserve">
                                     
&lt;script type="text/os-data" xmlns:os="http://ns.opensocial.org/2008/markup"&gt;
  &lt;os:PersonRequest userId="@owner" key="Owner"/&gt;
&lt;/script&gt;
High score for 
&lt;script type="text/os-template" xmlns:os="http://ns.opensocial.org/2008/markup"&gt;&lt;os:Name person="${Owner}"&gt;&lt;/script&gt;
is 100
</artwork>
    </figure>
    <figure>
     <preamble>Final Container output after OSML is processed</preamble>
     <artwork xml:space="preserve">
High score for John Doe is 100
</artwork>
    </figure></t>
   </section>
  </section>
  </section>
 </middle>
 <back>
  <references>
   <reference anchor='RFC2119'>
    <front>
     <title>Key words for use in RFCs to Indicate Requirement Levels</title>
     <author initials='S.'
             surname='Bradner'
             fullname='Scott Bradner'>
      <organization abbrev='HarvardU'>Harvard University</organization>
     </author>
     <date month='March'
           year='1997' />
    </front>
    <seriesInfo name='RFC'
                value='2119' />
   </reference>
   <reference anchor='RFC2606'>
    <front>
     <title>Reserved Top Level DNS Names</title>
     <author initials='D.'
             surname='Eastlake'
             fullname='Donald E. Eastlake 3rd'>
      <organization abbrev='IBM'>IBM</organization>
     </author>
     <author initials='A.'
             surname='Panitz'
             fullname='Aliza R. Panitz'></author>
     <date month='June'
           year='1999' />
    </front>
    <seriesInfo name='RFC'
                value='2606' />
   </reference>
   <reference anchor="Core-Gadget"
              target="./Core-Gadget.xml">
    <front>
     <title>OpenSocial Core Gadget Specification</title>
     <author fullname='OpenSocial and Gadgets Specification Group &lt;opensocial-and-gadgets-spec@googlegroups.com&gt;'>
     </author>
     <date month='March'
           year='2010' />
    </front>
   </reference>
  </references>
  <section title="Deprecated JavaScript API" anchor="DeprecatedJavaScriptAPI">
    <section title="opensocial"
             anchor="opensocial">
     <t>Namespace for top-level people functions.</t>
     <section title="Method Details">
      <section title="invalidateCache"
               anchor="opensocial.invalidateCache">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Core-Gadget.xml#osapi.cache.invalidate">osapi.cache.invalidate()</eref> instead.</t>
       <t>&lt;static&gt; opensocial.invalidateCache()</t>
       <t>Description: Invalidates all resources cached for the current
       viewer.</t>
      </section>
      <section title="newActivity"
               anchor="opensocial.newActivity">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Activity">Activity</eref> objects introduced in OpenSocial v1.0 instead.</t>
       <t>&lt;static&gt; Type: {
       <xref target="opensocial.Activity">opensocial.Activity</xref> }
       opensocial.newActivity(params)</t>
       <t>Description: Creates an activity object, which represents an activity
       on the server. 
       <t>See also: 
       <xref target="opensocial.requestCreateActivity">
       requestCreateActivity()</xref>,</t>
       <t>It is only required to set one of TITLE_ID or TITLE. In addition, if
       you are using any variables in your title or title template, you must
       set TEMPLATE_PARAMS.</t>
       <t>Other possible fields to set are: URL, MEDIA_ITEMS, BODY_ID, BODY,
       EXTERNAL_ID, PRIORITY, STREAM_TITLE, STREAM_URL, STREAM_SOURCE_URL, and
       STREAM_FAVICON_URL.</t>
       <t>Containers are only required to use TITLE_ID or TITLE, and may choose
       to ignore additional parameters.</t>
       <t>See 
       <xref target="opensocial.Activity.Field">Field</xref> for more
       details.</t></t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>params</c>
        <c>Map.&lt;opensocial.Activity.Field|Object&gt;</c>
        <c>Parameters defining the activity</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>
         <xref target="opensocial.Activity">opensocial.Activity</xref>
        </c>
        <c>The new 
        <xref target="opensocial.Activity">activity</xref> object</c>
       </texttable></t>
      </section>
      <section title="newAlbum"
               anchor="opensocial.newAlbum">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Album">Album</eref> objects introduced in OpenSocial v1.0 instead.</t>
       <t>&lt;static&gt; Type: {
       <xref target="opensocial.MediaItem">opensocial.MediaItem</xref> }
       opensocial.newAlbum(opt_params)</t>
       <t>Description: Creates a album. Represents a collection of images,
       movies, and audio. Used when creating albums on the server.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.Album.Field|Object&gt;</c>
        <c>Any other fields that should be set on the Album object; all of the
        defined 
        <xref target="opensocial.Album.Field">Field</xref> s are supported</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>
         <xref target="opensocial.MediaItem">opensocial.MediaItem</xref>
        </c>
        <c>The new 
        <xref target="opensocial.Album">album</xref> object</c>
       </texttable></t>
      </section>
      <section title="newDataRequest"
               anchor="opensocial.newDataRequest">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Core-Gadget.xml#osapi.newBatch">osapi.newBatch()</eref> instead.</t>
       <t>&lt;static&gt; Type: {
       <xref target="opensocial.DataRequest">opensocial.DataRequest</xref> }
       opensocial.newDataRequest()</t>
       <t>Description: Creates a data request object to use for sending and
       fetching data from the server.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>
         <xref target="opensocial.DataRequest">opensocial.DataRequest</xref>
        </c>
        <c>The 
        <xref target="opensocial.DataRequest">request</xref> object</c>
       </texttable></t>
      </section>
      <section title="newIdSpec"
               anchor="opensocial.newIdSpec">
       <t><x:highlight>Deprecated.</x:highlight> IdSpec objects are not used in osapi.* calls.  Instead, the user ID(s), group ID(s), and network distance values are specified as parameters in the request.</t>
       <t>&lt;static&gt; Type: {opensocial.IdSpec}
       opensocial.newIdSpec(parameters)</t>
       <t>Description: Creates an IdSpec object.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>parameters</c>
        <c>Map.&lt;opensocial.IdSpec.Field|Object&gt;</c>
        <c>Parameters defining the id spec.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>opensocial.IdSpec</c>
        <c>The new 
        <xref target="opensocial.IdSpec">IdSpec</xref> object</c>
       </texttable></t>
      </section>
      <section title="newMediaItem"
               anchor="opensocial.newMediaItem">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#MediaItem">MediaItem</eref> objects introduced in OpenSocial v1.0 instead.</t>
       <t>&lt;static&gt; Type: {
       <xref target="opensocial.MediaItem">opensocial.MediaItem</xref> }
       opensocial.newMediaItem(mimeType, url, opt_params)</t>
       <t>Description: Creates a media item. Represents images, movies, and
       audio. Used when creating activities on the server.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>mimeType</c>
        <c>String</c>
        <c>
        <xref target="opensocial.MediaItem.Type">MIME type</xref> of the
        media</c>
        <c>url</c>
        <c>String</c>
        <c>Where the media can be found</c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.MediaItem.Field|Object&gt;</c>
        <c>Any other fields that should be set on the media item object; all of
        the defined 
        <xref target="opensocial.MediaItem.Field">Field</xref> s are
        supported</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>
         <xref target="opensocial.MediaItem">opensocial.MediaItem</xref>
        </c>
        <c>The new 
        <xref target="opensocial.MediaItem">media item</xref> object</c>
       </texttable></t>
      </section>
      <section title="newMessage"
               anchor="opensocial.newMessage">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Message">Message</eref> objects introduced in OpenSocial v1.0 instead.</t>
       <t>&lt;static&gt; Type: {
       <xref target="opensocial.Message">opensocial.Message</xref> }
       opensocial.newMessage(body, opt_params)</t>
       <t>Description: Creates a new message object for use with
       opensocial.requestSendMessage.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>body</c>
        <c>String</c>
        <c>The main text of the message</c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.Message.Field|Object&gt;</c>
        <c>Any other fields that should be set on the message object; all of
        the defined 
        <xref target="opensocial.Message.Field">Field</xref> s are supported</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>
         <xref target="opensocial.Message">opensocial.Message</xref>
        </c>
        <c>The new 
        <xref target="opensocial.Message">message</xref> object</c>
       </texttable></t>
      </section>
      <section title="requestCreateActivity"
               anchor="opensocial.requestCreateActivity">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.activities.create">osapi.activities.create()</eref> instead.</t>
       <t>&lt;static&gt; opensocial.requestCreateActivity(activity, priority,
       opt_callback)</t>
       <t>Description: Takes an activity and tries to create it, without
       waiting for the operation to complete. Optionally calls a function when
       the operation completes. 
       <t>See also: 
       <xref target="opensocial.newActivity">newActivity()</xref> </t>
       <t>Note: If this is the first activity that has been created for the
       user and the request is marked as HIGH priority then this call may open
       a user flow and navigate away from your gadget.</t>
       <t>This callback will either be called or the gadget will be reloaded
       from scratch. This function will be passed one parameter, an
       opensocial.ResponseItem. The error code will be set to reflect whether
       there were any problems with the request. If there was no error, the
       activity was created. If there was an error, you can use the response
       item's getErrorCode method to determine how to proceed. The data on the
       response item will not be set.</t>
       <t>If the container does not support this method the callback will be
       called with a opensocial.ResponseItem. The response item will have its
       error code set to 'notImplemented'.</t></t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>activity</c>
        <c>opensocial.Activity</c>
        <c>The 
        <xref target="opensocial.Activity">activity</xref> to create</c>
        <c>priority</c>
        <c>opensocial.CreateActivityPriority</c>
        <c>The 
        <xref target="opensocial.CreateActivityPriority">priority</xref> for
        this request</c>
        <c>opt_callback</c>
        <c>Function</c>
        <c>The function to call once the request has been processed. The
        callback function will not be called until after the existing callstack
        has completed execution.</c>
       </texttable></t>
      </section>
      <section title="requestSendMessage"
               anchor="opensocial.requestSendMessage">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.messages.send">osapi.messages.send()</eref> instead.</t>
       <t>&lt;static&gt; opensocial.requestSendMessage(An, message,
       opt_callback, opt_params)</t>
       <t>Description: Requests the container to send a specific message to the
       specified users. 
       <t>The callback function is passed one parameter, an
       opensocial.ResponseItem. The error code will be set to reflect whether
       there were any problems with the request. If there was no error, the
       message was sent. If there was an error, you can use the response item's
       getErrorCode method to determine how to proceed. The data on the
       response item will not be set.</t>
       <t>If the container does not support this method the callback will be
       called with an opensocial.ResponseItem that has an error code of
       'notImplemented'.</t></t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>An</c>
        <c>opensocial.IdSpec</c>
        <c>IdSpec used to specify which people/groups to send the message
        to.</c>
        <c>message</c>
        <c>opensocial.Message</c>
        <c>The message to send to the specified users</c>
        <c>opt_callback</c>
        <c>Function</c>
        <c>The function to call once the request has been processed; either
        this callback will be called or the gadget will be reloaded from
        scratch.The callback function will not be called until after the
        existing callstack has completed execution.</c>
        <c>opt_params</c>
        <c>opensocial.NavigationParameters</c>
        <c>The optional parameters indicating where to send a user when a
        request is made, or when a request is accepted; options are of type 
        <eref target="./Social-Gadget.xml#opensocial.NavigationParameters.DestinationType">
        NavigationParameters.DestinationType</eref> </c>
       </texttable></t>
      </section>
      <section title="requestUploadMediaItem"
               anchor="opensocial.requestUploadMediaItem">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.mediaItems.create">osapi.mediaItems.create()</eref> instead.</t>
       <t>&lt;static&gt; opensocial.requestUploadMediaItem(albumId,
       opt_callback)</t>
       <t>Description: Uploads a media item. Allows the container to provide
       some standard UI and other items to post files to a site.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>albumId</c>
        <c>string</c>
        <c>Indicates which album/collection to insert the items into. If not
        present or set to null|undefined, the items go into the default
        location for the container. Partial upload is possible, such that if
        the container allows for multiple items, some items may fail to be
        added.</c>
        <c>opt_callback</c>
        <c>Function</c>
        <c>Method is called when the upload completes. The callback function is
        passed one parameter, an opensocial.ResponseItem. The error code will
        be set to reflect whether there were any problems with the request. If
        there was no error, the message was sent. If there was an error, you
        can use the response item's getErrorCode method to determine how to
        proceed. getErrorMessage will contain a comma separated list of files
        that failed to upload. The data on the response item will be set to an
        array of 
        <xref target="opensocial.MediaItem">media item</xref> objects for
        successful items.</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.Activity"
             anchor="opensocial.Activity">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Activity">Activity</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>Representation of an activity. 
     <t>Activities are rendered with a title and an optional activity body.</t>
     <t>You may set the title and body directly as strings when calling
     opensocial.newActivity. However, it is usually beneficial to create
     activities using Message Templates for the title and body.</t>
     <t>Users will have many activities in their activity streams, and
     containers will not show every activity that is visible to a user. To help
     display large numbers of activities, containers will summarize a list of
     activities from a given source to a single entry.</t>
     <t>You can provide Activity Summaries to customize the text shown when
     multiple activities are summarized. If no customization is provided, a
     container may ignore your activities altogether or provide default text
     such as "Bob changed his status message + 20 other events like this."</t>
     <list style="symbols">
      <t>Activity Summaries will always summarize around a specific key in a
      key/value pair. This is so that the summary can say something concrete
      (this is clearer in the example below).</t>
      <t>Other variables will have synthetic "Count" variables created with the
      total number of items summarized.</t>
      <t>Message ID of the summary is the message ID of the main template + ":"
      + the data key</t>
     </list>
     <t>Example summaries: 
     <figure>
      <artwork xml:space="preserve">
&lt;messagebundle&gt;
    &lt;msg name="LISTEN_TO_THIS_SONG:Artist"&gt;
        ${Subject.Count} of your friends have suggested listening to songs
        by ${Artist}!
    &lt;/msg&gt;
    &lt;msg name="LISTEN_TO_THIS_SONG:Song"&gt;
        ${Subject.Count} of your friends have suggested listening to ${Song}
    !&lt;/msg&gt;
    &lt;msg name="LISTEN_TO_THIS_SONG:Subject"&gt;
        ${Subject.DisplayName} has recommended ${Song.Count} songs to you.
    &lt;/msg&gt;
&lt;/messagebundle&gt;
</artwork>
     </figure></t>
     <t>See also: 
     <xref target="opensocial.Message">opensocial.Message</xref>, 
     <xref target="opensocial.newActivity">opensocial.newActivity()</xref>, 
     <xref target="opensocial.requestCreateActivity">
     opensocial.requestCreateActivity()</xref> </t></t>
     <section title="Method Details">
      <section title="getField"
               anchor="opensocial.Activity.getField">
       <t>Type: {String} getField(key, opt_params)</t>
       <t>Description: Gets the activity data that's associated with the
       specified key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to get data for; see the 
        <xref target="opensocial.Activity.Field">Field</xref> class for possible
        values</c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.DataRequest.DataRequestFields|Object&gt;</c>
        <c>Additional 
        <xref target="opensocial.DataRequest.DataRequestFields">params</xref> to
        pass to the request.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The data</c>
       </texttable></t>
      </section>
      <section title="getId"
               anchor="opensocial.Activity.getId">
       <t>Type: {String} getId()</t>
       <t>Description: Gets an ID that can be permanently associated with this
       activity.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The ID</c>
       </texttable></t>
      </section>
      <section title="setField"
               anchor="opensocial.Activity.setField">
       <t>setField(key, data)</t>
       <t>Description: Sets data for this activity associated with the given
       key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to set data for</c>
        <c>data</c>
        <c>String</c>
        <c>The data to set</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.Activity.Field"
             anchor="opensocial.Activity.Field">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Activity">Activity</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>All of the fields that activities can have. It is only required to set one of TITLE_ID or TITLE. In addition, if
     you are using any variables in your title or title template, you must set TEMPLATE_PARAMS.</t>
     <t>See also: <xref target="opensocial.Activity.getField"> opensocial.Activity.getField()</xref> </t>
     <list style="hanging">
      <t hangText="APP_ID">

       <t>Description: 
       <t>A string specifying the application that this activity is associated
       with. This value can not be set.</t>
       <t>This field may be used interchangeably with the string
       'appId'.</t></t>
      </t>
      <t hangText="BODY">

       <t>Description: 
       <t>A string specifying an optional expanded version of an activity.</t>
       <t>Bodies may only have the following HTML tags: &lt;b&gt; &lt;i&gt;,
       &lt;a&gt;, &lt;span&gt;. The container may ignore this formatting when
       rendering the activity.</t>
       <t>This field may be used interchangeably with the string
       'body'.</t></t>
      </t>
      <t hangText="BODY_ID">

       <t>Description: 
       <t>A string specifying the body template message ID in the gadget
       spec.</t>
       <t>The body is an optional expanded version of an activity.</t>
       <t>Bodies may only have the following HTML tags: &lt;b&gt; &lt;i&gt;,
       &lt;a&gt;, &lt;span&gt;. The container may ignore this formatting when
       rendering the activity.</t>
       <t>This field may be used interchangeably with the string
       'bodyId'.</t></t>
      </t>
      <t hangText="EXTERNAL_ID">

       <t>Description: 
       <t>An optional string ID generated by the posting application.</t>
       <t>This field may be used interchangeably with the string
       'externalId'.</t></t>
      </t>
      <t hangText="ID">

       <t>Description: 
       <t>A string ID that is permanently associated with this activity. This
       value can not be set.</t>
       <t>This field may be used interchangeably with the string 'id'.</t></t>
      </t>
      <t hangText="MEDIA_ITEMS">

       <t>Description: 
       <t>Any photos, videos, or images that should be associated with the
       activity. Higher priority ones are higher in the list. The data has type
       Array&lt; 
       <xref target="opensocial.MediaItem">MediaItem</xref> &gt;.</t>
       <t>This field may be used interchangeably with the string
       'mediaItems'.</t></t>
      </t>
      <t hangText="POSTED_TIME">

       <t>Description: 
       <t>A string specifying the datetime at which this activity took place in
       milliseconds since the epoch. This value can not be set.</t>
       <t>This field may be used interchangeably with the string
       'postedTime'.</t></t>
      </t>
      <t hangText="PRIORITY">

       <t>Description: 
       <t>A number between 0 and 1 representing the relative priority of this
       activity in relation to other activities from the same source</t>
       <t>This field may be used interchangeably with the string
       'priority'.</t></t>
      </t>
      <t hangText="STREAM_FAVICON_URL">
       <t>Description: 
       <t>A string specifying the URL for the stream's favicon.</t>
       <t>This field may be used interchangeably with the string
       'streamFaviconUrl'.</t></t>
      </t>
      <t hangText="STREAM_SOURCE_URL">
       <t>Description: 
       <t>A string specifying the stream's source URL.</t>
       <t>This field may be used interchangeably with the string
       'streamSourceUrl'.</t></t>
      </t>
      <t hangText="STREAM_TITLE">

       <t>Description: 
       <t>A string specifing the title of the stream.</t>
       <t>This field may be used interchangeably with the string
       'streamTitle'.</t></t>
      </t>
      <t hangText="STREAM_URL">

       <t>Description: 
       <t>A string specifying the stream's URL.</t>
       <t>This field may be used interchangeably with the string
       'streamUrl'.</t></t>
      </t>
      <t hangText="TEMPLATE_PARAMS">
       <t>Description: 
       <t>A map of custom key/value pairs associated with this activity. These
       will be used for evaluation in templates.</t>
       <t>The data has type Map&lt;String, Object&gt;. The object may be either
       a String or an opensocial.Person.</t>
       <t>When passing in a person with key PersonKey, can use the following
       replacement variables in the template:</t>
       <list style="symbols">
        <t>PersonKey.DisplayName - Display name for the person</t>
        <t>PersonKey.ProfileUrl. URL of the person's profile</t>
        <t>PersonKey.Id - The ID of the person</t>
        <t>PersonKey - Container may replace with DisplayName, but may also
        optionally link to the user.</t>
       </list>
       <t>This field may be used interchangeably with the string
       'templateParams'.</t></t>
      </t>
      <t hangText="TITLE">

       <t>Description: 
       <t>A string specifying the primary text of an activity.</t>
       <t>Titles may only have the following HTML tags: &lt;b&gt; &lt;i&gt;,
       &lt;a&gt;, &lt;span&gt;. The container may ignore this formatting when
       rendering the activity.</t>
       <t>This field may be used interchangeably with the string
       'title'.</t></t>
      </t>
      <t hangText="TITLE_ID">

       <t>Description: 
       <t>A string specifying the title template message ID in the gadget
       spec.</t>
       <t>The title is the primary text of an activity.</t>
       <t>Titles may only have the following HTML tags: &lt;b&gt; &lt;i&gt;,
       &lt;a&gt;, &lt;span&gt;. The container may ignore this formatting when
       rendering the activity.</t>
       <t>This field may be used interchangeably with the string
       'titleId'.</t></t>
      </t>
      <t hangText="URL">

       <t>Description: 
       <t>A string specifying the URL that represents this activity.</t>
       <t>This field may be used interchangeably with the string 'url'.</t></t>
      </t>
      <t hangText="USER_ID">

       <t>Description: 
       <t>The string ID of the user who this activity is for. This value can
       not be set.</t>
       <t>This field may be used interchangeably with the string
       'userId'.</t></t>
      </t>
     </list>
    </section>
    <section title="opensocial.Address"
             anchor="opensocial.Address">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Address">Address</eref> objects introduced in OpenSocial v1.0 instead.</t>

     <t>Base interface for all address objects.</t>
     <section title="Method Details">
      <section title="getField"
               anchor="opensocial.Address.getField">
       <t>Type: {String} getField(key, opt_params)</t>
       <t>Description: Gets data for this body type that is associated with the
       specified key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to get data for; keys are defined in 
        <xref target="opensocial.Address.Field">Address.Field</xref> </c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.DataRequest.DataRequestFields|Object&gt;</c>
        <c>Additional 
        <xref target="opensocial.DataRequest.DataRequestFields">params</xref> to
        pass to the request</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The data</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.Address.Field"
             anchor="opensocial.Address.Field">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Address">Address</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>All of the fields that an address has. These are the supported keys for
     the 
     <xref target="opensocial.Address.getField">
     Address.getField()</xref> method.</t>
     <list style="hanging">
      <t hangText="COUNTRY">

       <t>Description: The country, specified as a string. This field may be
       used interchangeably with the string 'country'.</t>
      </t>
      <t hangText="EXTENDED_ADDRESS">
       <t>Description: The extended street address, specified as a string. This
       field may be used interchangeably with the string 'extendedAddress'.</t>
      </t>
      <t hangText="LATITUDE">

       <t>Description: The latitude, specified as a number. This field may be
       used interchangeably with the string 'latitude'.</t>
      </t>
      <t hangText="LOCALITY">

       <t>Description: The locality, specified as a string. This field may be
       used interchangeably with the string 'locality'.</t>
      </t>
      <t hangText="LONGITUDE">

       <t>Description: The longitude, specified as a number. This field may be
       used interchangeably with the string 'longitude'.</t>
      </t>
      <t hangText="PO_BOX">

       <t>Description: The P.O. box of the address, if there is one; specified
       as a string. This field may be used interchangeably with the string
       'poBox'.</t>
      </t>
      <t hangText="POSTAL_CODE">

       <t>Description: The postal code, specified as a string. This field may
       be used interchangeably with the string 'postalCode'.</t>
      </t>
      <t hangText="REGION">

       <t>Description: The region, specified as a string. This field may be
       used interchangeably with the string 'region'.</t>
      </t>
      <t hangText="STREET_ADDRESS">

       <t>Description: The street address, specified as a string. This field
       may be used interchangeably with the string 'streetAddress'.</t>
      </t>
      <t hangText="TYPE">

       <t>Description: The address type or label, specified as a string.
       Examples: work, my favorite store, my house, etc. This field may be used
       interchangeably with the string 'type'.</t>
      </t>
      <t hangText="UNSTRUCTURED_ADDRESS">
       <t>Description: If the container does not have structured addresses in
       its data store, this field contains the unstructured address that the
       user entered, specified as a string. Use
       opensocial.getEnvironment().supportsField to see which fields are
       supported. This field may be used interchangeably with the string
       'unstructuredAddress'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.Album"
             anchor="opensocial.Album">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Album">Album</eref> objects introduced in OpenSocial v1.0 instead.</t>

     <t>Class for Album features.</t>
     <section title="Method Details">
      <section title="getField"
               anchor="opensocial.Album.getField">
       <t>Type: {String} getField(key, opt_params)</t>
       <t>Description: Gets the album data that's associated with the specified
       key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to get data for; see the 
        <xref target="opensocial.Album.Field">Field</xref> class for possible
        values</c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.DataRequest.DataRequestFields|Object&gt;</c>
        <c>Additional 
        <xref target="opensocial.DataRequest.DataRequestFields">params</xref> to
        pass to the request.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The data</c>
       </texttable></t>
      </section>
      <section title="setField"
               anchor="opensocial.Album.setField">
       <t>setField(key, data)</t>
       <t>Description: Sets data for this album associated with the given
       key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to set data for</c>
        <c>data</c>
        <c>String</c>
        <c>The data to set</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.Album.Field"
             anchor="opensocial.Album.Field">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Album">Album</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>All of the fields that albums can have. 
     <t>It is only required to set ID.</t>
     <t>Other possible fields to set are: THUMBNAIL_URL, TITLE, DESCRIPTION,
     LOCATION, OWNER_ID, MEDIA_TYPE, MEDIA_MIME_TYPE, MEDIA_ITEM_COUNT.</t>
     <t>See also: 
     <xref target="opensocial.Album.getField">
     opensocial.Album.getField()</xref> </t></t>
     <list style="hanging">
      <t hangText="DESCRIPTION">

       <t>Description: string, description of the album. May be used
       interchangeably with the string 'description'.</t>
      </t>
      <t hangText="ID">

       <t>Description: string, unique identifier for the album. May be used
       interchangeably with the string 'id'.</t>
      </t>
      <t hangText="LOCATION">

       <t>Description: opensocial.Address, location corresponding to the album.
       May be used interchangeably with the string 'location'.</t>
      </t>
      <t hangText="MEDIA_ITEM_COUNT">

       <t>Description: integer, number of items in the album. May be used
       interchangeably with the string 'mediaItemCount'.</t>
      </t>
      <t hangText="MEDIA_MIME_TYPE">

       <t>Description: array of strings identifying the mime-types of media
       items in the Album. May be used interchangeably with the string
       'mediaMimeType'.</t>
      </t>
      <t hangText="MEDIA_TYPE">

       <t>Description: array of MediaItem.TYPE, types of MediaItems in the
       Album. May be used interchangeably with the string 'mediaType'.</t>
      </t>
      <t hangText="OWNER_ID">

       <t>Description: string, ID of the owner of the album. May be used
       interchangeably with the string 'ownerId'.</t>
      </t>
      <t hangText="THUMBNAIL_URL">

       <t>Description: string, URL to a thumbnail cover of the album. May be
       used interchangeably with the string 'thumbnailUrl'.</t>
      </t>
      <t hangText="TITLE">

       <t>Description: string, the title of the album. May be used
       interchangeably with the string 'title'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.BodyType"
             anchor="opensocial.BodyType">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#BodyType">BodyType</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>Base interface for all body type objects.</t>
     <section title="Method Details">
      <section title="getField"
               anchor="opensocial.BodyType.getField">
       <t>Type: {String} getField(key, opt_params)</t>
       <t>Description: Gets data for this body type that is associated with the
       specified key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to get data for; keys are defined in 
        <xref target="opensocial.BodyType.Field">BodyType.Field</xref> </c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.DataRequest.DataRequestFields|Object&gt;</c>
        <c>Additional 
        <xref target="opensocial.DataRequest.DataRequestFields">params</xref> to
        pass to the request.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The data</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.BodyType.Field"
             anchor="opensocial.BodyType.Field">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#BodyType">BodyType</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>All of the fields that a body type has. These are the supported keys
     for the 
     <xref target="opensocial.BodyType.getField">
     BodyType.getField()</xref> method.</t>
     <list style="hanging">
      <t hangText="BUILD">

       <t>Description: The build of the person's body, specified as a string.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'build'.</t>
      </t>
      <t hangText="EYE_COLOR">

       <t>Description: The eye color of the person, specified as a string.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'eyeColor'.</t>
      </t>
      <t hangText="HAIR_COLOR">

       <t>Description: The hair color of the person, specified as a string.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'hairColor'.</t>
      </t>
      <t hangText="HEIGHT">

       <t>Description: The height of the person in meters, specified as a
       number. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'height'.</t>
      </t>
      <t hangText="WEIGHT">

       <t>Description: The weight of the person in kilograms, specified as a
       number. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'weight'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.Collection"
             anchor="opensocial.Collection">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Collection">Collection</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>Collection of multiple objects with useful accessors. May also
     represent subset of a larger collection (for example, page 1 of 10) and
     contain information about the larger collection.</t>
     <section title="Method Details">
      <section title="asArray"
               anchor="opensocial.Collection.asArray">
       <t>Type: {Array.&lt;Object&gt;} asArray()</t>
       <t>Description: Returns an array of all the objects in this
       collection.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Array.&lt;Object&gt;</c>
        <c>The values in this collection</c>
       </texttable></t>
      </section>
      <section title="each"
               anchor="opensocial.Collection.each">
       <t>each(fn)</t>
       <t>Description: Executes the provided function once per member of the
       collection, with each member in turn as the parameter to the
       function.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>fn</c>
        <c>Function</c>
        <c>The function to call with each collection entry</c>
       </texttable></t>
      </section>
      <section title="getById"
               anchor="opensocial.Collection.getById">
       <t>Type: {Object?} getById(id)</t>
       <t>Description: Finds the entry with the given ID value, or returns null
       if none is found.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>id</c>
        <c>String</c>
        <c>The ID to look for</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Object?</c>
        <c>The data</c>
       </texttable></t>
      </section>
      <section title="getOffset"
               anchor="opensocial.Collection.getOffset">
       <t>Type: {Number} getOffset()</t>
       <t>Description: Gets the offset of this collection within a larger
       result set.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Number</c>
        <c>The offset into the total collection</c>
       </texttable></t>
      </section>
      <section title="getTotalSize"
               anchor="opensocial.Collection.getTotalSize">
       <t>Type: {Number} getTotalSize()</t>
       <t>Description: Gets the total size of the larger result set that this
       collection belongs to.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Number</c>
        <c>The total size of the result</c>
       </texttable></t>
      </section>
      <section title="size"
               anchor="opensocial.Collection.size">
       <t>Type: {Number} size()</t>
       <t>Description: Gets the size of this collection, which is equal to or
       less than the total size of the result.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Number</c>
        <c>The size of this collection</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.CreateActivityPriority"
             anchor="opensocial.CreateActivityPriority">
       <t><x:highlight>Deprecated.</x:highlight> Activity priorities should be represented by a property field in the <eref target="./Social-Data.xml#Activity">Activity</eref> JSON object.</t>
     <t>The priorities a create activity request can have. 
     <t>See also: 
     <xref target="opensocial.requestCreateActivity">
     opensocial.requestCreateActivity()</xref> </t></t>
      <list style="hanging">
       <t hangText="HIGH">

        <t>If the activity is of high importance, it will be
        created even if this requires asking the user for permission. This may
        cause the container to open a user flow which may navigate away from
        your gagdet. This field may be used interchangeably with the string
        'HIGH'.</t>
       </t>
       <t hangText="LOW">

        <t>If the activity is of low importance, it will not be
        created if the user has not given permission for the current app to
        create activities. With this priority, the requestCreateActivity call
        will never open a user flow. This field may be used interchangeably with
        the string 'LOW'.</t>
       </t>
      </list>
    </section>
    <section title="opensocial.DataRequest"
             anchor="opensocial.DataRequest">
       <t><x:highlight>Deprecated.</x:highlight> Service requests should be represented using the <eref target="./Social-Gadget.xml#osapi.BatchRequest">Batch Request</eref> JSON object.</t>
     <t>
      <t>Used to request social information from the container. This includes
      data for friends, profiles, app data, and activities. All apps that
      require access to people information should send a DataRequest.</t>
      <t>Here's an example of creating, initializing, sending, and handling the
      results of a data request:</t>
      <figure>
       <artwork xml:space="preserve">
function requestMe() {
    var req = opensocial.newDataRequest();
    req.add(req.newFetchPersonRequest(
        opensocial.IdSpec.PersonId.VIEWER),
        "viewer");
    req.send(handleRequestMe);
};
function handleRequestMe(data) {
    var viewer = data.get("viewer");
    if (viewer.hadError()) {
        //Handle error using viewer.getError()...return;
    }
    //No error. Do something with viewer.getData()...
}
</artwork>
      </figure>
      <t>See also: 
      <xref target="opensocial.newDataRequest">
      opensocial.newDataRequest()</xref> </t>
     </t>
     <section title="Method Details">
      <section title="add"
               anchor="opensocial.DataRequest.add">
       <t>add(request, opt_key)</t>
       <t>Description: Adds an item to fetch (get) or update (set) data from
       the server. A single DataRequest object can have multiple items. As a
       rule, each item is executed in the order it was added, starting with the
       item that was added first. However, items that can't collide might be
       executed in parallel.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>request</c>
        <c>Object</c>
        <c>Specifies which data to fetch or update</c>
        <c>opt_key</c>
        <c>String</c>
        <c>A key to map the generated response data to</c>
       </texttable></t>
      </section>
      <section title="newCreateAlbumRequest"
               anchor="opensocial.DataRequest.newCreateAlbumRequest">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.albums.create">osapi.albums.create()</eref> instead.</t>
       <t>Type: {Object} newCreateAlbumRequest(An, album)</t>
       <t>Description: Creates a new album and returns the ID of the album
       created. Containers implement restrictions - like allowing a viewer to
       create albums for only him/herself.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>An</c>
        <c>opensocial.IdSpec</c>
        <c>IdSpec used to specify which people/groups to create an album
        for.</c>
        <c>album</c>
        <c>opensocail.Album</c>
        <c>The album to create.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Object</c>
        <c>A request object</c>
       </texttable></t>
      </section>
      <section title="newCreateMediaItemRequest"
               anchor="opensocial.DataRequest.newCreateMediaItemRequest">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.mediaItems.create">osapi.mediaItems.create()</eref> instead.</t>
       <t>Type: {Object} newCreateMediaItemRequest(An, albumId, mediaItem)</t>
       <t>Description: Creates a new media item in the album and returns the ID
       of the album created. Containers implement restrictions.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>An</c>
        <c>opensocial.IdSpec</c>
        <c>IdSpec used to specify which people/groups own the album.</c>
        <c>albumId</c>
        <c>string</c>
        <c>The album to add the media item to.</c>
        <c>mediaItem</c>
        <c>opensocial.MediaItem</c>
        <c>The MediaItem to add to the album.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Object</c>
        <c>A request object</c>
       </texttable></t>
      </section>
      <section title="newDeleteAlbumRequest"
               anchor="opensocial.DataRequest.newDeleteAlbumRequest">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.albums.delete">osapi.albums.delete()</eref> instead.</t>
       <t>Type: {Object} newDeleteAlbumRequest(An, albumId)</t>
       <t>Description: Deletes the album specified. Containers implement
       restriction.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>An</c>
        <c>opensocial.IdSpec</c>
        <c>IdSpec used to specify which people/groups own the album.</c>
        <c>albumId</c>
        <c>string</c>
        <c>The album to delete.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Object</c>
        <c>A request object</c>
       </texttable></t>
      </section>
      <section title="newFetchActivitiesRequest"
               anchor="opensocial.DataRequest.newFetchActivitiesRequest">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.activities.get">osapi.activities.get()</eref> instead.</t>
       <t>Type: {Object} newFetchActivitiesRequest(idSpec, opt_params)</t>
       <t>Description: Creates an item to request an activity stream from the
       server. 
       <t>When processed, returns a Collection&lt;Activity&gt;.</t></t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>idSpec</c>
        <c>opensocial.IdSpec</c>
        <c>An IdSpec used to specify which people to fetch. See also 
        <xref target="opensocial.IdSpec">IdSpec</xref>.</c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.DataRequest.ActivityRequestFields|Object&gt;</c>
        <c>Additional parameters to pass to the request; not currently used</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Object</c>
        <c>A request object</c>
       </texttable></t>
      </section>
      <section title="newFetchAlbumsRequest"
               anchor="opensocial.DataRequest.newFetchAlbumsRequest">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.albums.get">osapi.albums.get()</eref> instead.</t>
       <t>Type: {Object} newFetchAlbumsRequest(An, opt_params)</t>
       <t>Description: The newFetchAlbumsRequest() creates an object for
       DataRequest to request albums.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>An</c>
        <c>opensocial.IdSpec</c>
        <c>IdSpec used to specify which people/groups to fetch albums from.</c>
        <c>opt_params</c>
        <c>Map.&lt;string|string&gt;</c>
        <c>opt_params can specify the following: opensocial.Album.Field.ID - an
        array of album Ids to fetch (fetch all albums if empty, subject to
        pagination) opensocial.Album.Field.MEDIA_TYPE - an array of
        MediaItem.TYPE values to specify the kind of Albums to fetch.
        opensocial.DataRequest.AlbumRequestFields.FIRST - The first item to
        fetch. opensocial.DataRequest.AlbumRequestFields.MAX - The maximum
        number of items to fetch.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Object</c>
        <c>A request object</c>
       </texttable></t>
      </section>
      <section title="newFetchMediaItemsRequest"
               anchor="opensocial.DataRequest.newFetchMediaItemsRequest">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.mediaItems.get">osapi.mediaItems.get()</eref> instead.</t>
       <t>Type: {Object} newFetchMediaItemsRequest(An, albumId, opt_params)</t>
       <t>Description: The newFetchMediaItemsRequest() creates an object for
       DataRequest to request mediaItems.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>An</c>
        <c>opensocial.IdSpec</c>
        <c>IdSpec used to specify which people/groups to fetch media items
        from.</c>
        <c>albumId</c>
        <c>string</c>
        <c>The id of the album to fetch MediaItems from.</c>
        <c>opt_params</c>
        <c>Map.&lt;string|string&gt;</c>
        <c>opt_params can specify the following: opensocial.MediaItem.Field.ID
        - an array of media item ids to selectively fetch (fetch all items if
        empty, subject to pagination) opensocial.MediaItem.Field.MEDIA_TYPE -
        an array of MediaItem.TYPE values to specify the types of MediaItems to
        fetch opensocial.DataRequest.MediaItemRequestFields.FIRST - The first
        item to fetch. opensocial.DataRequest.MediaItemRequestFields.MAX - The
        maximum number of items to fetch.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Object</c>
        <c>A request object</c>
       </texttable></t>
      </section>
      <section title="newFetchPeopleRequest"
               anchor="opensocial.DataRequest.newFetchPeopleRequest">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.people.get">osapi.people.get()</eref> instead.</t>
       <t>Type: {Object} newFetchPeopleRequest(idSpec, opt_params)</t>
       <t>Description: Creates an item to request friends from the server. When
       processed, returns a 
       <xref target="opensocial.Collection">Collection</xref> &lt;
       <xref target="opensocial.Person">Person</xref> &gt; object.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>idSpec</c>
        <c>opensocial.IdSpec</c>
        <c>An IdSpec used to specify which people to fetch. See also 
        <xref target="opensocial.IdSpec">IdSpec</xref>.</c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.DataRequest.PeopleRequestFields|Object&gt;</c>
        <c>Additional 
        <xref target="opensocial.DataRequest.PeopleRequestFields">
        params</xref> to pass to the request</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Object</c>
        <c>A request object</c>
       </texttable></t>
      </section>
      <section title="newFetchPersonAppDataRequest"
               anchor="opensocial.DataRequest.newFetchPersonAppDataRequest">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.appdata.get">osapi.appdata.get()</eref> instead.</t>
       <t>Type: {Object} newFetchPersonAppDataRequest(idSpec, keys,
       opt_params)</t>
       <t>Description: Creates an item to request app data for the given
       people. When processed, returns a Map&lt; 
       <xref target="opensocial.IdSpec.PersonId">PersonId</xref>,
       Map&lt;String, Object&gt;&gt; object. All of the data values returned
       will be valid json.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>idSpec</c>
        <c>opensocial.IdSpec</c>
        <c>An IdSpec used to specify which people to fetch. See also 
        <xref target="opensocial.IdSpec">IdSpec</xref>.</c>
        <c>keys</c>
        <c>Array.&lt;String&gt; | String</c>
        <c>The keys you want data for; this can be an array of key names, a
        single key name, or "*" to mean "all keys"</c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.DataRequest.DataRequestFields|Object&gt;</c>
        <c>Additional 
        <xref target="opensocial.DataRequest.DataRequestFields">params</xref> to
        pass to the request</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Object</c>
        <c>A request object</c>
       </texttable></t>
      </section>
      <section title="newFetchPersonRequest"
               anchor="opensocial.DataRequest.newFetchPersonRequest">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.people.get">osapi.people.get()</eref> instead.</t>
       <t>Type: {Object} newFetchPersonRequest(id, opt_params)</t>
       <t>Description: Creates an item to request a profile for the specified
       person ID. When processed, returns a 
       <xref target="opensocial.Person">Person</xref> object.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>id</c>
        <c>String</c>
        <c>The ID of the person to fetch; can be the standard 
        <xref target="opensocial.IdSpec.PersonId">person ID</xref> of VIEWER or
        OWNER</c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.DataRequest.PeopleRequestFields|Object&gt;</c>
        <c>Additional 
        <xref target="opensocial.DataRequest.PeopleRequestFields">
        parameters</xref> to pass to the request; this request supports
        PROFILE_DETAILS</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Object</c>
        <c>A request object</c>
       </texttable></t>
      </section>
      <section title="newRemovePersonAppDataRequest"
               anchor="opensocial.DataRequest.newRemovePersonAppDataRequest">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.appdata.delete">osapi.appdata.delete()</eref> instead.</t>
       <t>Type: {Object} newRemovePersonAppDataRequest(keys)</t>
       <t>Description: Deletes the given keys from the datastore for the
       current VIEWER. When processed, does not return any data.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>keys</c>
        <c>Array.&lt;String&gt; | String</c>
        <c>The keys you want to delete from the datastore; this can be an array
        of key names, a single key name, or "*" to mean "all keys"</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Object</c>
        <c>A request object</c>
       </texttable></t>
      </section>
      <section title="newUpdateAlbumRequest"
               anchor="opensocial.DataRequest.newUpdateAlbumRequest">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.albums.update">osapi.albums.update()</eref> instead.</t>
       <t>Type: {Object} newUpdateAlbumRequest(An, albumId, fields)</t>
       <t>Description: Updates the fields specified in the params.The following
       fields cannot be set: MEDIA_ITEM_COUNT, OWNER_ID, ID. Containers
       implement restrictions.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>An</c>
        <c>opensocial.IdSpec</c>
        <c>IdSpec used to specify which people/groups to own the album.</c>
        <c>albumId</c>
        <c>string</c>
        <c>The album to update.</c>
        <c>fields</c>
        <c>Map&lt;opensocial.Album.Field|object&gt;</c>
        <c>The Album Fields to update.The following fields cannot be set:
        MEDIA_ITEM_COUNT, OWNER_ID, ID. Containers implement restrictions.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Object</c>
        <c>A request object</c>
       </texttable></t>
      </section>
      <section title="newUpdateMediaItemRequest"
               anchor="opensocial.DataRequest.newUpdateMediaItemRequest">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.mediaItems.update">osapi.mediaItems.update()</eref> instead.</t>
       <t>Type: {Object} newUpdateMediaItemRequest(An, albumId, mediaItemId,
       fields)</t>
       <t>Description: Updates the fields specified in the params.The following
       fields cannot be set: ID, CREATED, ALBUM_ID, FILE_SIZE, NUM_COMMENTS.
       Containers implement restrictions.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>An</c>
        <c>opensocial.IdSpec</c>
        <c>IdSpec used to specify which people/groups own the album/media
        item.</c>
        <c>albumId</c>
        <c>string</c>
        <c>The album containing the media item to update.</c>
        <c>mediaItemId</c>
        <c>string</c>
        <c>The media item to update.</c>
        <c>fields</c>
        <c>Map&lt;opensocial.MediaItem.Field|object&gt;</c>
        <c>The Album Fields to update.The following fields cannot be set: ID,
        CREATED, ALBUM_ID, FILE_SIZE, NUM_COMMENTS. Containers implement
        restrictions.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Object</c>
        <c>A request object</c>
       </texttable></t>
      </section>
      <section title="newUpdatePersonAppDataRequest"
               anchor="opensocial.DataRequest.newUpdatePersonAppDataRequest">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.appdata.update">osapi.appdata.update()</eref> instead.</t>
       <t>Type: {Object} newUpdatePersonAppDataRequest(key, value)</t>
       <t>Description: Creates an item to request an update of an app field for
       the current VIEWER. When processed, does not return any data. App Data
       is stored as a series of key value pairs of strings, scoped per person,
       per application.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The name of the key. This may only contain alphanumeric (A-Za-z0-9)
        characters, underscore(_), dot(.) or dash(-).</c>
        <c>value</c>
        <c>Object</c>
        <c>The value, must be valid JSON</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Object</c>
        <c>A request object</c>
       </texttable></t>
      </section>
      <section title="send"
               anchor="opensocial.DataRequest.send">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Core-Gadget.xml#osapi.Request.execute">osapi.Request.execute()</eref> or <eref target="./Core-Gadget.xml#osapi.BatchRequest.execute">osapi.BatchRequest.execute()</eref>instead.</t>
       <t>send(opt_callback)</t>
       <t>Description: Sends a data request to the server in order to get a
       data response. Although the server may optimize these requests, they
       will always be executed as though they were serial.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>opt_callback</c>
        <c>Function</c>
        <c>The function to call with the 
        <xref target="opensocial.DataResponse">data response</xref> generated by
        the server. The callback function will not be called until after the
        existing callstack has completed execution.</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.DataRequest.ActivityRequestFields"
             anchor="opensocial.DataRequest.ActivityRequestFields">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.activities.get">osapi.activities.get()</eref> with the startIndex, startPage, and count parameters to handle paging.</t>
     <t>The values needed to handle activity paging.</t>
     <list style="hanging">
      <t hangText="FIRST">
       <t>When paginating, the index of the first item to fetch;
       specified as a number.</t>
      </t>
      <t hangText="MAX">
       <t>The maximum number of items to fetch, specified as a
       number; defaults to 20.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.DataRequest.AlbumRequestFields"
             anchor="opensocial.DataRequest.AlbumRequestFields">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.albums.get">osapi.albums.get()</eref> with the startIndex, startPage, and count parameters to handle paging.</t>
     <t>The values needed to handle activity paging.</t>
     <list style="hanging">
      <t hangText="FIRST">
       <t>When paginating, the index of the first item to fetch;
       specified as a number.</t>
      </t>
      <t hangText="MAX">
       <t>The maximum number of items to fetch, specified as a
       number; defaults to 20.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.DataRequest.DataRequestFields"
             anchor="opensocial.DataRequest.DataRequestFields">
     <list style="hanging">
      <t hangText="ESCAPE_TYPE" anchor="opensocial.DataRequest.PeopleRequestFields.ESCAPE_TYPE">
       <t><x:highlight>Deprecated.</x:highlight> Values are escaped by default.</t>
       <t>How to escape person data returned from the server;
       defaults to HTML_ESCAPE. Possible values are defined by 
       <xref target="opensocial.EscapeType">EscapeType</xref>. This field may
       be used interchangeably with the string 'escapeType'. Use of this
       function is deprecated in favor of us using the 
       <xref target="opensocial.DataRequest.PeopleRequestFields.ESCAPE_TYPE">
       ESCAPE_TYPE</xref> request field.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.DataRequest.FilterType"
             anchor="opensocial.DataRequest.FilterType">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.people.get">osapi.people.get()</eref> with the filterBy, filterOp, and filterValue parameters to filter the people objects returned.</t>
     <t>The filters available for limiting person requests.</t>
     <list style="hanging">
      <t hangText="ALL">

       <t>Retrieves all friends. This field may be used
       interchangeably with the string 'all'.</t>
      </t>
      <t hangText="HAS_APP">
       <t>Retrieves all friends that use this application. Note:
       Containers may define "use" in any manner they deem appropriate for
       their functionality, and it is not expected that this field will have
       the exact same semantics across containers. This field may be used
       interchangeably with the string 'hasApp'.</t>
      </t>
      <t hangText="IS_FRIENDS_WITH">
       <t>Will filter the people requested by checking if they are
       friends with the given 
       <xref target="opensocial.IdSpec">idSpec</xref>. Expects a filterOptions
       parameter to be passed with the following fields defined: - idSpec The 
       <xref target="opensocial.IdSpec">idSpec</xref> that each person must be
       friends with. This field may be used interchangeably with the string
       'isFriendsWith'.</t>
      </t>
      <t hangText="TOP_FRIENDS">
       <t>Retrieves only the user's top friends as defined by the
       container. Container support for this filter type is OPTIONAL. This
       field may be used interchangeably with the string 'topFriends'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.DataRequest.MediaItemRequestFields"
             anchor="opensocial.DataRequest.MediaItemRequestFields">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.mediaItems.get">osapi.mediaItems.get()</eref> with the startIndex, startPage, and count parameters to handle paging.</t>
     <t>The values needed to handle activity paging.</t>
     <list style="hanging">
      <t hangText="FIRST">
       <t>When paginating, the index of the first item to fetch;
       specified as a number.</t>
      </t>
      <t hangText="MAX">
       <t>The maximum number of items to fetch, specified as a
       number; defaults to 20.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.DataRequest.PeopleRequestFields"
             anchor="opensocial.DataRequest.PeopleRequestFields">
     <list style="hanging">
      <t hangText="APP_DATA">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.people.get">osapi.people.get()</eref> with the fields parameter, and prefix the app data keys with the string "appdata.".  For example, '"fields": ["gender", "appdata.favoriteColor"]' would return the value for gender as well as the value of the appdata entry where "favoriteColor" is the key.</t>
       <t>An array of strings, specifying the app data keys to
       fetch for each of the Person objects. This field may be used
       interchangeably with the string 'appData'.</t>
      </t>
      <t hangText="ESCAPE_TYPE">
       <t><x:highlight>Deprecated.</x:highlight> Values are escaped by default.</t>
       <t>How to escape Person fields and app data returned from
       the server; defaults to HTML_ESCAPE. Possible values are defined by 
       <xref target="opensocial.EscapeType">EscapeType</xref>. This field may
       be used interchangeably with the string 'escapeType'.</t>
      </t>
      <t hangText="FILTER">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.people.get">osapi.people.get()</eref> with the filterBy, filterOp, and filterValue parameters to filter the people objects returned.</t>
       <t>How to filter the people objects; defaults to ALL.
       Possible values are defined by 
       <xref target="opensocial.DataRequest.FilterType">FilterType</xref>. This
       field may be used interchangeably with the string 'filter'.</t>
      </t>
      <t hangText="FILTER_OPTIONS">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.people.get">osapi.people.get()</eref> with the filterBy, filterOp, and filterValue parameters to filter the people objects returned.</t>               
       <t>Additional options to be passed into the filter,
       specified as a Map&lt;String, Object&gt;. This field may be used
       interchangeably with the string 'filterOptions'.</t>
      </t>
      <t hangText="FIRST">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.people.get">osapi.people.get()</eref> with the startIndex, startPage, and count parameters to handle paging.</t>
       <t>When paginating, the index of the first item to fetch;
       specified as a number. This field may be used interchangeably with the
       string 'first'.</t>
      </t>
      <t hangText="MAX">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.people.get">osapi.people.get()</eref> with the startIndex, startPage, and count parameters to handle paging.</t>
       <t>The maximum number of items to fetch, specified as a
       number; defaults to 20. If set to a larger number, a container may honor
       the request, or may limit the number to a container-specified limit of
       at least 20. This field may be used interchangeably with the string
       'max'.</t>
      </t>
      <t hangText="PROFILE_DETAILS">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.people.get">osapi.people.get()</eref> with the fields parameter to specify what profile data to fetch.</t>
       <t>An array of 
       <xref target="opensocial.Person.Field">
       opensocial.Person.Field</xref> specifying what profile data to fetch for
       each of the person objects. The server will always include ID, NAME, and
       THUMBNAIL_URL. This field may be used interchangeably with the string
       'profileDetail'.</t>
      </t>
      <t hangText="SORT_ORDER">
               anchor="opensocial.DataRequest.PeopleRequestFields.SORT_ORDER">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.people.get">osapi.people.get()</eref> with the sortOrder parameter to specify the sort order.</t>
       <t>A sort order for the people objects; defaults to
       TOP_FRIENDS. Possible values are defined by 
       <xref target="opensocial.DataRequest.SortOrder">SortOrder</xref>. This
       field may be used interchangeably with the string 'sortOrder'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.DataRequest.SortOrder"
             anchor="opensocial.DataRequest.SortOrder">
       <t><x:highlight>Deprecated.</x:highlight> Use <eref target="./Social-Gadget.xml#osapi.people.get">osapi.people.get()</eref> with the sortOrder parameter to specify the sort order.</t>
     <t>The sort orders available for ordering person objects.</t>
     <list style="hanging">
      <t hangText="NAME">

       <t>When used will sort people alphabetically by the name
       field. This field may be used interchangeably with the string
       'name'.</t>
      </t>
      <t hangText="TOP_FRIENDS">
       <t>When used will sort people by the container's definition
       of top friends. This field may be used interchangeably with the string
       'topFriends'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.DataResponse"
             anchor="opensocial.DataResponse">
     <t><x:highlight>Deprecated.</x:highlight> Callback methods receive <eref target="./Core-Data.xml#Response">Response</eref> objects.</t>
     <t>This object contains the requested server data mapped to the requested
     keys. 
     <t>See also: 
     <xref target="opensocial.DataRequest">DataRequest</xref> </t></t>
     <section title="Method Details">
      <section title="get"
               anchor="opensocial.DataResponse.get">
       <t>Type: {
       <xref target="opensocial.ResponseItem">opensocial.ResponseItem</xref> }
       get(key)</t>
       <t>Description: Gets the ResponseItem for the requested field.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c></c>
        <c></c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>
         <xref target="opensocial.ResponseItem">opensocial.ResponseItem</xref>
        </c>
        <c>The requested 
        <xref target="opensocial.ResponseItem">response</xref> calculated by the
        server</c>
       </texttable></t>
      </section>
      <section title="getErrorMessage"
               anchor="opensocial.DataResponse.getErrorMessage">
       <t>Type: {String} getErrorMessage()</t>
       <t>Description: If the entire request had a batch level error, returns
       the error message.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>A human-readable description of the error that occurred.</c>
       </texttable></t>
      </section>
      <section title="hadError"
               anchor="opensocial.DataResponse.hadError">
       <t>Type: {Boolean} hadError()</t>
       <t>Description: Returns true if there was an error in fetching this data
       from the server.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Boolean</c>
        <c>True if there was an error; otherwise, false</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.Email"
             anchor="opensocial.Email">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Email">Email</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>Base interface for all email objects.</t>
     <section title="Method Details">
      <section title="getField"
               anchor="opensocial.Email.getField">
       <t>Type: {String} getField(key, opt_params)</t>
       <t>Description: Gets data for this body type that is associated with the
       specified key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to get data for; keys are defined in 
        <xref target="opensocial.Email.Field">Email.Field</xref> </c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.DataRequest.DataRequestFields|Object&gt;</c>
        <c>Additional 
        <xref target="opensocial.DataRequest.DataRequestFields">params</xref> to
        pass to the request.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The data</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.Email.Field"
             anchor="opensocial.Email.Field">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Email">Email</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>All of the fields that an email has. These are the supported keys for
     the 
     <xref target="opensocial.Email.getField">
     Email.getField()</xref> method.</t>
     <list style="hanging">
      <t hangText="ADDRESS">

       <t>The email address, specified as a string. This field may
       be used interchangeably with the string 'address'.</t>
      </t>
      <t hangText="TYPE">

       <t>The email type or label, specified as a string.
       Examples: work, my favorite store, my house, etc. This field may be used
       interchangeably with the string 'type'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.Enum"
             anchor="opensocial.Enum">
       <t><x:highlight>Deprecated.</x:highlight> Use the fields of the <eref target="./Social-Data.xml#Person">Person</eref> object instead.</t>
     <t>Base interface for all enum objects. This class allows containers to
     use constants for fields that are usually have a common set of values.
     There are two main ways to use this class. 
     <t>If your gadget just wants to display how much of a smoker someone is,
     it can simply use:</t>
     <figure>
      <artwork xml:space="preserve">
html = "This person smokes: " + person.getField('smoker').getValue();
</artwork>
     </figure>
     <t>This value field will be correctly set up by the container. This is a
     place where the container can even localize the value for the gadget so
     that it always shows the right thing.</t>
     <t>If your gadget wants to have some logic around the smoker field it can
     use:</t>
     <figure>
      <artwork xml:space="preserve">
if (person.getField('smoker').getKey() != "NO") { //gadget logic here }
</artwork>
     </figure>
     <t>Note: The key may be null if the person's smoker field cannot be
     coerced into one of the standard enum types. The value, on the other hand,
     is never null.</t></t>
     <section title="Method Details">
      <section title="getDisplayValue"
               anchor="opensocial.Enum.getDisplayValue">
       <t>Type: {String} getDisplayValue()</t>
       <t>Description: The value of this enum. This will be a user displayable
       string. If the container supports localization, the string will be
       localized.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The enum's value.</c>
       </texttable></t>
      </section>
      <section title="getKey"
               anchor="opensocial.Enum.getKey">
       <t>Type: {String} getKey()</t>
       <t>Description: Use this for logic within your gadget. If they key is
       null then the value does not fit in the defined enums.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The enum's key. This should be one of the defined enums below.</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.Enum.Drinker"
             anchor="opensocial.Enum.Drinker">
       <t><x:highlight>Deprecated.</x:highlight> Use the drinker field of the <eref target="./Social-Data.xml#Person">Person</eref> object instead.</t>
     <t>The enum keys used by the drinker field. 
     <t>See also: 
     <xref target="opensocial.Person.Field">
     opensocial.Person.Field.Drinker</xref> </t></t>
     <list style="hanging">
      <t hangText="HEAVILY">

       <t>This field may be used interchangeably with the string
       'HEAVILY'.</t>
      </t>
      <t hangText="NO">

       <t>This field may be used interchangeably with the string
       'NO'.</t>
      </t>
      <t hangText="OCCASIONALLY">

       <t>This field may be used interchangeably with the string
       'OCCASIONALLY'.</t>
      </t>
      <t hangText="QUIT">

       <t>This field may be used interchangeably with the string
       'QUIT'.</t>
      </t>
      <t hangText="QUITTING">

       <t>This field may be used interchangeably with the string
       'QUITTING'.</t>
      </t>
      <t hangText="REGULARLY">

       <t>This field may be used interchangeably with the string
       'REGULARLY'.</t>
      </t>
      <t hangText="SOCIALLY">

       <t>This field may be used interchangeably with the string
       'SOCIALLY'.</t>
      </t>
      <t hangText="YES">

       <t>This field may be used interchangeably with the string
       'YES'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.Enum.Gender"
             anchor="opensocial.Enum.Gender">
       <t><x:highlight>Deprecated.</x:highlight> Use the gender field of the <eref target="./Social-Data.xml#Person">Person</eref> object instead.</t>
     <t>The enum keys used by the gender field. 
     <t>See also: 
     <xref target="opensocial.Person.Field">
     opensocial.Person.Field.Gender</xref> </t></t>
     <list style="hanging">
      <t hangText="FEMALE">

       <t>This field may be used interchangeably with the string
       'FEMALE'.</t>
      </t>
      <t hangText="MALE">

       <t>This field may be used interchangeably with the string
       'MALE'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.Enum.LookingFor"
             anchor="opensocial.Enum.LookingFor">
       <t><x:highlight>Deprecated.</x:highlight> Use the lookingFor field of the <eref target="./Social-Data.xml#Person">Person</eref> object instead.</t>
     <t>The enum keys used by the lookingFor field. 
     <t>See also: 
     <xref target="opensocial.Person.Field">
     opensocial.Person.Field.LookingFor</xref> </t></t>
     <list style="hanging">
      <t hangText="ACTIVITY_PARTNERS">
       <t>This field may be used interchangeably with the string
       'ACTIVITY_PARTNERS'.</t>
      </t>
      <t hangText="DATING">

       <t>This field may be used interchangeably with the string
       'DATING'.</t>
      </t>
      <t hangText="FRIENDS">

       <t>This field may be used interchangeably with the string
       'FRIENDS'.</t>
      </t>
      <t hangText="NETWORKING">

       <t>This field may be used interchangeably with the string
       'NETWORKING'.</t>
      </t>
      <t hangText="RANDOM">

       <t>This field may be used interchangeably with the string
       'RANDOM'.</t>
      </t>
      <t hangText="RELATIONSHIP">

       <t>This field may be used interchangeably with the string
       'RELATIONSHIP'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.Enum.Presence"
             anchor="opensocial.Enum.Presence">
       <t><x:highlight>Deprecated.</x:highlight> Use the presence field of the <eref target="./Social-Data.xml#Person">Person</eref> object instead.</t>
     <t>The enum keys used by the networkPresence field. 
     <t>See also: 
     <xref target="opensocial.Person.Field">
     opensocial.Person.Field.NetworkPresence</xref> </t></t>
     <list style="hanging">
      <t hangText="AWAY">

       <t>The entity or resource is temporarily away. This field
       may be used interchangeably with the string 'AWAY'.</t>
      </t>
      <t hangText="CHAT">

       <t>The entity or resource is actively interested in
       chatting. This field may be used interchangeably with the string
       'CHAT'.</t>
      </t>
      <t hangText="DND">

       <t>The entity or resource is busy (dnd = "Do Not Disturb").
       This field may be used interchangeably with the string 'DND'.</t>
      </t>
      <t hangText="OFFLINE">

       <t>The entity or resource is off line. This field may be
       used interchangeably with the string 'OFFLINE'.</t>
      </t>
      <t hangText="ONLINE">

       <t>The entity or resource is on line. This field may be
       used interchangeably with the string 'ONLINE'.</t>
      </t>
      <t hangText="XA">

       <t>The entity or resource is away for an extended period
       (xa = "eXtended Away"). This field may be used interchangeably with the
       string 'XA'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.Enum.Smoker"
             anchor="opensocial.Enum.Smoker">
       <t><x:highlight>Deprecated.</x:highlight> Use the smoker field of the <eref target="./Social-Data.xml#Person">Person</eref> object instead.</t>
     <t>The enum keys used by the smoker field. 
     <t>See also: 
     <xref target="opensocial.Person.Field">
     opensocial.Person.Field.Smoker</xref> </t></t>
     <list style="hanging">
      <t hangText="HEAVILY">

       <t>This field may be used interchangeably with the string
       'HEAVILY'.</t>
      </t>
      <t hangText="NO">

       <t>This field may be used interchangeably with the string
       'NO'.</t>
      </t>
      <t hangText="OCCASIONALLY">

       <t>This field may be used interchangeably with the string
       'OCCASIONALLY'.</t>
      </t>
      <t hangText="QUIT">

       <t>This field may be used interchangeably with the string
       'QUIT'.</t>
      </t>
      <t hangText="QUITTING">

       <t>This field may be used interchangeably with the string
       'QUITTING'.</t>
      </t>
      <t hangText="REGULARLY">

       <t>This field may be used interchangeably with the string
       'REGULARLY'.</t>
      </t>
      <t hangText="SOCIALLY">

       <t>This field may be used interchangeably with the string
       'SOCIALLY'.</t>
      </t>
      <t hangText="YES">

       <t>This field may be used interchangeably with the string
       'YES'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.EscapeType"
             anchor="opensocial.EscapeType">
       <t><x:highlight>Deprecated.</x:highlight> All values are escaped automatically.</t>
     <t>The types of escaping that can be applied to person data or fields.</t>
     <list style="hanging">
      <t hangText="HTML_ESCAPE">

       <t>When used will HTML-escape the data. This field may be
       used interchangeably with the string 'htmlEscape'.</t>
      </t>
      <t hangText="NONE">

       <t>When used will not escape the data. This field may be
       used interchangeably with the string 'none'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.IdSpec"
             anchor="opensocial.IdSpec">
       <t><x:highlight>Deprecated.</x:highlight> IdSpec objects are not used in osapi.* calls.  Instead, the user ID(s), group ID(s), and network distance values are specified as parameters in the request.</t>
     <t>Base interface for all id spec objects.</t>
     <section title="Method Details">
      <section title="getField"
               anchor="opensocial.IdSpec.getField">
       <t>Type: {String} getField(key, opt_params)</t>
       <t>Description: Gets the id spec's data that's associated with the
       specified key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to get data for; see the 
        <xref target="opensocial.IdSpec.Field">Field</xref> class for possible
        values</c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.DataRequest.DataRequestFields|Object&gt;</c>
        <c>Additional 
        <xref target="opensocial.DataRequest.DataRequestFields">params</xref> to
        pass to the request.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The data</c>
       </texttable></t>
      </section>
      <section title="setField"
               anchor="opensocial.IdSpec.setField">
       <t>setField(key, data)</t>
       <t>Description: Sets data for this id spec associated with the given
       key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to set data for</c>
        <c>data</c>
        <c>String</c>
        <c>The data to set</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.IdSpec.Field"
             anchor="opensocial.IdSpec.Field">
       <t><x:highlight>Deprecated.</x:highlight> IdSpec objects are not used in osapi.* calls.  Instead, the user ID(s), group ID(s), and network distance values are specified as parameters in the request.</t>
     <t>All of the fields that id specs can have. 
     <t>See also: 
     <xref target="opensocial.IdSpec.getField">
     opensocial.IdSpec.getField()</xref> </t></t>
     <list style="hanging">
      <t hangText="GROUP_ID">

       <t>A string representing the group id or one of the
       opensocial.IdSpec.GroupId values. Defaults to SELF. This field may be
       used interchangeably with the string 'groupId'.</t>
      </t>
      <t hangText="NETWORK_DISTANCE">
       <t>An optional numeric parameter, used to specify how many
       "hops" are allowed between two people still considered part of the same
       group. This is 0 based, for example: A value of 0 means that the people
       are the same person. 1 would mean that the people were friends. And 2
       would mean that there was a friend of a friend relationship. Defaults to
       1 (they are both friends or directly in the same group). Not all
       containers will support networkDistances greater than 1. This field may
       be used interchangeably with the string 'networkDistance'.</t>
      </t>
      <t hangText="USER_ID">

       <t>A string or an array of strings representing the user
       id. Can be one of the opensocial.IdSpec.PersonId values. This field may
       be used interchangeably with the string 'userId'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.IdSpec.GroupId"
             anchor="opensocial.IdSpec.GroupId">
       <t><x:highlight>Deprecated.</x:highlight> IdSpec objects are not used in osapi.* calls.  Instead, the user ID(s), group ID(s), and network distance values are specified as parameters in the request.</t>
     <t>Constant group IDs available when fetching collections of people.</t>
     <list style="hanging">
      <t hangText="ALL">

       <t>This field may be used interchangeably with the string
       'ALL'.</t>
      </t>
      <t hangText="FRIENDS">

       <t>This field may be used interchangeably with the string
       'FRIENDS'.</t>
      </t>
      <t hangText="SELF">

       <t>This field may be used interchangeably with the string
       'SELF'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.IdSpec.PersonId"
             anchor="opensocial.IdSpec.PersonId">
       <t><x:highlight>Deprecated.</x:highlight> IdSpec objects are not used in osapi.* calls.  Instead, the user ID(s), group ID(s), and network distance values are specified as parameters in the request.</t>
     <t>Constant person IDs available when fetching person information.</t>
     <list style="hanging">
      <t hangText="OWNER">

       <t>This field may be used interchangeably with the string
       'OWNER'.</t>
      </t>
      <t hangText="VIEWER">

       <t>This field may be used interchangeably with the string
       'VIEWER'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.MediaItem"
             anchor="opensocial.MediaItem">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#MediaItem">MediaItem</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>Represents images, movies, and audio. Create a MediaItem object using
     the 
     <xref target="opensocial.newMediaItem">
     opensocial.newMediaItem()</xref> method.</t>
     <section title="Method Details">
      <section title="getField"
               anchor="opensocial.MediaItem.getField">
       <t>Type: {String} getField(key, opt_params)</t>
       <t>Description: Gets the media item data that's associated with the
       specified key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to get data for; see the 
        <xref target="opensocial.MediaItem.Field">Field</xref> class for
        possible values</c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.DataRequest.DataRequestFields|Object&gt;</c>
        <c>Additional 
        <xref target="opensocial.DataRequest.DataRequestFields">params</xref> to
        pass to the request.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The data</c>
       </texttable></t>
      </section>
      <section title="setField"
               anchor="opensocial.MediaItem.setField">
       <t>setField(key, data)</t>
       <t>Description: Sets data for this media item associated with the given
       key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to set data for</c>
        <c>data</c>
        <c>String</c>
        <c>The data to set</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.MediaItem.Field"
             anchor="opensocial.MediaItem.Field">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#MediaItem">MediaItem</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>All of the fields that media items have. 
     <t>See also: 
     <xref target="opensocial.MediaItem.getField">
     opensocial.MediaItem.getField()</xref> </t></t>
     <list style="hanging">
      <t hangText="ALBUM_ID">

       <t>string, album to which the media item belongs This field
       may be used interchangeably with the string 'albumId'.</t>
      </t>
      <t hangText="CREATED">

       <t>string, creation datetime associated with the media item -
       assigned by container in UTC This field may be used interchangeably with
       the string 'created'.</t>
      </t>
      <t hangText="DESCRIPTION">

       <t>string, description of the media item This field may be
       used interchangeably with the string 'description'.</t>
      </t>
      <t hangText="DURATION">

       <t>integer, for audio/video clips - playtime length in
       seconds. set to -1/not defined if unknown This field may be used
       interchangeably with the string 'duration'.</t>
      </t>
      <t hangText="FILE_SIZE">

       <t>long, number of bytes (set to -1/undefined if unknown).
       This field may be used interchangeably with the string 'fileSize'.</t>
      </t>
      <t hangText="ID">

       <t>string, id Associated with the media item This field may
       be used interchangeably with the string 'id'.</t>
      </t>
      <t hangText="LANGUAGE">

       <t>string, language associated with the media item in ISO
       639-3 format This field may be used interchangeably with the string
       'language'.</t>
      </t>
      <t hangText="LAST_UPDATED">

       <t>string, update datetime associated with the media item -
       assigned by container in UTC This field may be used interchangeably with
       the string 'lastUpdated'.</t>
      </t>
      <t hangText="LOCATION">

       <t>opensocial.Address, location corresponding to the media
       item This field may be used interchangeably with the string
       'location'.</t>
      </t>
      <t hangText="MIME_TYPE">

       <t>The MIME type of media, specified as a string. This
       field may be used interchangeably with the string 'mimeType'.</t>
      </t>
      <t hangText="NUM_COMMENTS">

       <t>integer, number of comments on the media item. This field may
       be used interchangeably with the string 'numComments'.</t>
      </t>
      <t hangText="NUM_VIEWS">

       <t>integer, number of views for the media item. This field
       may be used interchangeably with the string 'numViews'.</t>
      </t>
      <t hangText="NUM_VOTES">

       <t>integer, number of votes received for voting. This field
       may be used interchangeably with the string 'numVotes'.</t>
      </t>
      <t hangText="RATING">

       <t>integer, average rating of the media item on a scale of
       0-10. This field may be used interchangeably with the string
       'rating'.</t>
      </t>
      <t hangText="START_TIME">

       <t>string, for streaming/live content, datetime when the
       content is available. This field may be used interchangeably with the
       string 'startTime'.</t>
      </t>
      <t hangText="TAGGED_PEOPLE">
       <t>array of strings, array of string (IDs) of people tagged
       in the media item This field may be used interchangeably with the string
       'taggedPeople'.</t>
      </t>
      <t hangText="TAGS">

       <t>array of strings, tags associated with this media item.
       This field may be used interchangeably with the string 'tags'.</t>
      </t>
      <t hangText="THUMBNAIL_URL">
       <t>string, URL to a thumbnail image of the media item This
       field may be used interchangeably with the string 'thumbnailUrl'.</t>
      </t>
      <t hangText="TITLE">

       <t>string describing the media item This field may be used
       interchangeably with the string 'title'.</t>
      </t>
      <t hangText="TYPE">

       <t>The type of media, specified as a 
       <xref target="opensocial.MediaItem.Type">MediaItem.Type</xref> object.
       This field may be used interchangeably with the string 'type'.</t>
      </t>
      <t hangText="URL">

       <t>A string specifying the URL where the media can be
       found. This field may be used interchangeably with the string 'url'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.MediaItem.Type"
             anchor="opensocial.MediaItem.Type">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#MediaItem">MediaItem</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>The possible types of media items. 
     <t>See also: 
     <xref target="opensocial.MediaItem.Field">
     opensocial.MediaItem.Field</xref> </t></t>
     <list style="hanging">
      <t hangText="AUDIO">

       <t>This field may be used interchangeably with the string
       'audio'.</t>
      </t>
      <t hangText="IMAGE">

       <t>This field may be used interchangeably with the string
       'image'.</t>
      </t>
      <t hangText="VIDEO">

       <t>This field may be used interchangeably with the string
       'video'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.Message"
             anchor="opensocial.Message">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Message">Message</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>Base interface for all message objects. * 
     <t>See also: 
     <xref target="opensocial.newMessage">opensocial.newMessage()</xref>, 
     <xref target="opensocial.requestSendMessage">
     opensocial.requestSendMessage()</xref> </t></t>
     <section title="Method Details">
      <section title="getField"
               anchor="opensocial.Message.getField">
       <t>Type: {String} getField(key, opt_params)</t>
       <t>Description: Gets the message data that's associated with the
       specified key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to get data for; see the 
        <xref target="opensocial.Message.Field">Field</xref> class for possible
        values</c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.DataRequest.DataRequestFields|Object&gt;</c>
        <c>Additional 
        <xref target="opensocial.DataRequest.DataRequestFields">params</xref> to
        pass to the request.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The data</c>
       </texttable></t>
      </section>
      <section title="setField"
               anchor="opensocial.Message.setField">
       <t>setField(key, data)</t>
       <t>Description: Sets data for this message associated with the given
       key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to set data for</c>
        <c>data</c>
        <c>String</c>
        <c>The data to set</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.Message.Field"
             anchor="opensocial.Message.Field">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Message">Message</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>All of the fields that messages can have. 
     <t>See also: 
     <xref target="opensocial.Message.getField">
     opensocial.Message.getField()</xref> </t></t>
     <list style="hanging">
      <t hangText="APP_URL">

       <t>Identifies the application that generated this message.
       This field may be used interchangeably with the string 'appUrl'.</t>
      </t>
      <t hangText="BODY">

       <t>The main text of the message. HTML attributes are
       allowed and are sanitized by the container. This field may be used
       interchangeably with the string 'body'.</t>
      </t>
      <t hangText="BODY_ID">

       <t>The main text of the message as a message template.
       Specifies the message ID to use in the gadget xml. This field may be
       used interchangeably with the string 'bodyId'.</t>
      </t>
      <t hangText="COLLECTION_IDS">

       <t>Identifies the messages collection IDs this message is
       contained in. This field may be used interchangeably with the string
       'collectionIds'.</t>
      </t>
      <t hangText="ID">

       <t>unique ID for this message. This field may be used
       interchangeably with the string 'id'.</t>
      </t>
      <t hangText="IN_REPLY_TO">

       <t>Message ID, use for threaded comments/messages.
       Reference the sematics of the Atom Threading model defined in rfc4685.
       URLs should be mapped to Atom &lt;link rel="type" .../&gt; This field
       may be used interchangeably with the string 'inReplyTo'.</t>
      </t>
      <t hangText="RECIPIENTS">

       <t>Array of person IDs. This field may be used
       interchangeably with the string 'recipients'.</t>
      </t>
      <t hangText="REPLIES">

       <t>array of message ids. Reference the sematics of the Atom
       Threading model defined in rfc4685. URLs should be mapped to Atom
       &lt;link rel="type" .../&gt; This field may be used interchangeably with
       the string 'replies'.</t>
      </t>
      <t hangText="SENDER_ID">

       <t>id of person who sent the message. This field may be
       used interchangeably with the string 'senderId'.</t>
      </t>
      <t hangText="STATUS">

       <t>Status of the message. (NEW, READ, DELETED). This field
       may be used interchangeably with the string 'status'.</t>
      </t>
      <t hangText="TIME_SENT">

       <t>UTC datetime the message was sent. This field may be used
       interchangeably with the string 'timeSent'.</t>
      </t>
      <t hangText="TITLE">

       <t>The title of the message. HTML attributes are allowed
       and are sanitized by the container. This field may be used
       interchangeably with the string 'title'.</t>
      </t>
      <t hangText="TITLE_ID">

       <t>The title id of the message as a message template.
       Specifies the message ID to use in the gadget xml. This field may be
       used interchangeably with the string 'titleId'.</t>
      </t>
      <t hangText="TYPE">

       <t>The type of the message, specified as an
       opensocial.Message.Type. This field may be used interchangeably with the
       string 'type'.</t>
      </t>
      <t hangText="UPDATED">

       <t>last update for this message . This field may be used
       interchangeably with the string 'updated'.</t>
      </t>
      <t hangText="URLS">

       <t>List of related URLs for this message. Supported URL
       types include 'alternate', alternate for for this mailbox (text/html
       being the most common). This field may be used interchangeably with the
       string 'urls'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.MessageCollection"
             anchor="opensocial.MessageCollection">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Message">Message</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>Class for MessageCollection features.</t>
     <section title="Method Details">
      <section title="getField"
               anchor="opensocial.MessageCollection.getField">
       <t>Type: {String} getField(key, opt_params)</t>
       <t>Description: Gets the MessageCollection data that's associated with
       the specified key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to get data for; see the 
        <xref target="opensocial.MessageCollection.Field">Field</xref> class for
        possible values</c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.DataRequest.DataRequestFields|Object&gt;</c>
        <c>Additional 
        <xref target="opensocial.DataRequest.DataRequestFields">params</xref> to
        pass to the request.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The data</c>
       </texttable></t>
      </section>
      <section title="setField"
               anchor="opensocial.MessageCollection.setField">
       <t>setField(key, data)</t>
       <t>Description: Sets data for this album associated with the given
       key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to set data for</c>
        <c>data</c>
        <c>String</c>
        <c>The data to set</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.MessageCollection.Field"
             anchor="opensocial.MessageCollection.Field">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Message">Message</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>All of the fields that a MessageCollection can have. 
     <t>It is only required to set ID.</t>
     <t>See also: 
     <xref target="opensocial.MessageCollection.getField">
     opensocial.MessageCollection.getField()</xref> </t></t>
     <list style="hanging">
      <t hangText="ID">

       <t>string, unique ID for this message collection. May be
       used interchangeably with the string 'id'.</t>
      </t>
      <t hangText="TITLE">
       <t>string, the title of the MessageCollection. May be used
       interchangeably with the string 'title'.</t>
      </t>
      <t hangText="TOTAL">
       <t>int, total number of messages in this group. May be used
       interchangeably with the string 'total'.</t>
      </t>
      <t hangText="UNREAD">
       <t>int, number of unread messages in this group. May be
       used interchangeably with the string 'unread'.</t>
      </t>
      <t hangText="UPDATED">
       <t>string, last datetime update for this message
       collection. May be used interchangeably with the string 'updated'.</t>
      </t>
      <t hangText="URLS">

       <t>opensocial.Url, List of related URLs for this message
       collection. Supported URL types include: 1. icon: icon for this mailbox
       2. alternate: alternate form for this mailbox (text/html being the most
       common) May be used interchangeably with the string 'urls'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.Name"
             anchor="opensocial.Name">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Name">Name</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>Base interface for all name objects.</t>
     <section title="Method Details">
      <section title="getField"
               anchor="opensocial.Name.getField">
       <t>Type: {String} getField(key, opt_params)</t>
       <t>Description: Gets data for this name that is associated with the
       specified key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to get data for; keys are defined in 
        <xref target="opensocial.Name.Field">Name.Field</xref> </c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.DataRequest.DataRequestFields|Object&gt;</c>
        <c>Additional 
        <xref target="opensocial.DataRequest.DataRequestFields">params</xref> to
        pass to the request.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The data</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.Name.Field"
             anchor="opensocial.Name.Field">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Name">Name</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>All of the fields that a name has. These are the supported keys for the     
     <xref target="opensocial.Name.getField">Name.getField()</xref> method.</t>
     <list style="hanging">
      <t hangText="ADDITIONAL_NAME">

       <t>The additional name, specified as a string. This field
       may be used interchangeably with the string 'additionalName'.</t>
      </t>
      <t hangText="FAMILY_NAME">

       <t>The family name, specified as a string. This field may
       be used interchangeably with the string 'familyName'.</t>
      </t>
      <t hangText="GIVEN_NAME">

       <t>The given name, specified as a string. This field may be
       used interchangeably with the string 'givenName'.</t>
      </t>
      <t hangText="HONORIFIC_PREFIX">

       <t>The honorific prefix, specified as a string. This field
       may be used interchangeably with the string 'honorificPrefix'.</t>
      </t>
      <t hangText="HONORIFIC_SUFFIX">

       <t>The honorific suffix, specified as a string. This field
       may be used interchangeably with the string 'honorificSuffix'.</t>
      </t>
      <t hangText="UNSTRUCTURED">

       <t>The unstructured name, specified as a string. This field
       may be used interchangeably with the string 'unstructured'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.Organization"
             anchor="opensocial.Organization">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Organization">Organization</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>Base interface for all organization objects.</t>
     <section title="Method Details">
      <section title="getField"
               anchor="opensocial.Organization.getField">
       <t>Type: {String} getField(key, opt_params)</t>
       <t>Description: Gets data for this body type that is associated with the
       specified key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to get data for; keys are defined in 
        <xref target="opensocial.Organization.Field">
        Organization.Field</xref> </c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.DataRequest.DataRequestFields|Object&gt;</c>
        <c>Additional 
        <xref target="opensocial.DataRequest.DataRequestFields">params</xref> to
        pass to the request</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The data</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.Organization.Field"
             anchor="opensocial.Organization.Field">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Organization">Organization</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>All of the fields that a organization has. These are the supported keys
     for the 
     <xref target="opensocial.Organization.getField">
     Organization.getField()</xref> method.</t>
     <list style="hanging">
      <t hangText="ADDRESS">

       <t>The address of the organization, specified as an
       opensocial.Address. Container support for this field is OPTIONAL. This
       field may be used interchangeably with the string 'address'.</t>
      </t>
      <t hangText="DESCRIPTION">
       <t>A description or notes about the person's work in the
       organization, specified as a string. This could be the courses taken by
       a student, or a more detailed description about a Organization role.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'description'.</t>
      </t>
      <t hangText="END_DATE">

       <t>The date the person stopped at the organization,
       specified as a Date. A null date indicates that the person is still
       involved with the organization. Container support for this field is
       OPTIONAL. This field may be used interchangeably with the string
       'endDate'.</t>
      </t>
      <t hangText="FIELD">

       <t>The field the organization is in, specified as a string.
       This could be the degree pursued if the organization is a school.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'field'.</t>
      </t>
      <t hangText="NAME">

       <t>The name of the organization, specified as a string. For
       example, could be a school name or a job company. Container support for
       this field is OPTIONAL. This field may be used interchangeably with the
       string 'name'.</t>
      </t>
      <t hangText="SALARY">

       <t>The salary the person receieves from the organization,
       specified as a string. Container support for this field is OPTIONAL.
       This field may be used interchangeably with the string 'salary'.</t>
      </t>
      <t hangText="START_DATE">
       <t>The date the person started at the organization,
       specified as a Date. Container support for this field is OPTIONAL. This
       field may be used interchangeably with the string 'startDate'.</t>
      </t>
      <t hangText="SUB_FIELD">

       <t>The subfield the Organization is in, specified as a
       string. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'subField'.</t>
      </t>
      <t hangText="TITLE">

       <t>The title or role the person has in the organization,
       specified as a string. This could be graduate student, or software
       engineer. Container support for this field is OPTIONAL. This field may
       be used interchangeably with the string 'title'.</t>
      </t>
      <t hangText="WEBPAGE">

       <t>A webpage related to the organization, specified as a
       string. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'webpage'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.Person"
             anchor="opensocial.Person">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Person">Person</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>Base interface for all person objects.</t>
     <section title="Method Details">
      <section title="getAppData"
               anchor="opensocial.Person.getAppData">
       <t>Type: {String} getAppData(key)</t>
       <t>Description: Gets the app data for this person that is associated
       with the specified key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to get app data for.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The corresponding app data.</c>
       </texttable></t>
      </section>
      <section title="getDisplayName"
               anchor="opensocial.Person.getDisplayName">
       <t>Type: {String} getDisplayName()</t>
       <t>Description: Gets a text display name for this person; guaranteed to
       return a useful string.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The display name</c>
       </texttable></t>
      </section>
      <section title="getField"
               anchor="opensocial.Person.getField">
       <t>Type: {String} getField(key, opt_params)</t>
       <t>Description: Gets data for this person that is associated with the
       specified key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to get data for; keys are defined in 
        <xref target="opensocial.Person.Field">Person.Field</xref> </c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.DataRequest.DataRequestFields|Object&gt;</c>
        <c>Additional 
        <xref target="opensocial.DataRequest.DataRequestFields">params</xref> to
        pass to the request.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The data</c>
       </texttable></t>
      </section>
      <section title="getId"
               anchor="opensocial.Person.getId">
       <t>Type: {String} getId()</t>
       <t>Description: Gets an ID that can be permanently associated with this
       person.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The ID</c>
       </texttable></t>
      </section>
      <section title="isOwner"
               anchor="opensocial.Person.isOwner">
       <t>Type: {Boolean} isOwner()</t>
       <t>Description: Returns true if this person object represents the owner
       of the current page.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Boolean</c>
        <c>True if this is the owner of the page; otherwise, false</c>
       </texttable></t>
      </section>
      <section title="isViewer"
               anchor="opensocial.Person.isViewer">
       <t>Type: {Boolean} isViewer()</t>
       <t>Description: Returns true if this person object represents the
       currently logged in user.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Boolean</c>
        <c>True if this is the currently logged in user; otherwise, false</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.Person.Field"
             anchor="opensocial.Person.Field">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Person">Person</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>All of the fields that a person has. These are the supported keys for
     the 
     <xref target="opensocial.Person.getField">
     Person.getField()</xref> method.</t>
     <list style="hanging">
      <t hangText="ABOUT_ME">

       <t>A general statement about the person, specified as a
       string. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'aboutMe'.</t>
      </t>
      <t hangText="ACTIVITIES">

       <t>Person's favorite activities, specified as an Array of
       strings. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'activities'.</t>
      </t>
      <t hangText="ADDRESSES">

       <t>Addresses associated with the person, specified as an
       Array of 
       <xref target="opensocial.Address">Address</xref> es. Container support
       for this field is OPTIONAL. This field may be used interchangeably with
       the string 'addresses'.</t>
      </t>
      <t hangText="AGE">

       <t>Person's age, specified as a number. Container support
       for this field is OPTIONAL. This field may be used interchangeably with
       the string 'age'.</t>
      </t>
      <t hangText="BODY_TYPE">

       <t>Person's body characteristics, specified as an
       opensocial.BodyType. Container support for this field is OPTIONAL. This
       field may be used interchangeably with the string 'bodyType'.</t>
      </t>
      <t hangText="BOOKS">

       <t>Person's favorite books, specified as an Array of
       strings. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'books'.</t>
      </t>
      <t hangText="CARS">

       <t>Person's favorite cars, specified as an Array of
       strings. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'cars'.</t>
      </t>
      <t hangText="CHILDREN">

       <t>Description of the person's children, specified as a
       string. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'children'.</t>
      </t>
      <t hangText="CURRENT_LOCATION">
       <t>Person's current location, specified as an 
       <xref target="opensocial.Address">Address</xref>. Container support for
       this field is OPTIONAL. This field may be used interchangeably with the
       string 'currentLocation'.</t>
      </t>
      <t hangText="DATE_OF_BIRTH">

       <t>Person's date of birth, specified as a Date object.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'dateOfBirth'.</t>
      </t>
      <t hangText="DRINKER">

       <t>Person's drinking status, specified as an
       opensocial.Enum with the enum's key referencing opensocial.Enum.Drinker.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'drinker'.</t>
      </t>
      <t hangText="EMAILS">

       <t>Emails associated with the person, specified as an Array
       of 
       <xref target="opensocial.Email">Email</xref> s. Container support for
       this field is OPTIONAL. This field may be used interchangeably with the
       string 'emails'.</t>
      </t>
      <t hangText="ETHNICITY">

       <t>Person's ethnicity, specified as a string. Container
       support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'ethnicity'.</t>
      </t>
      <t hangText="FASHION">

       <t>Person's thoughts on fashion, specified as a string.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'fashion'.</t>
      </t>
      <t hangText="FOOD">

       <t>Person's favorite food, specified as an Array of
       strings. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'food'.</t>
      </t>
      <t hangText="GENDER">

       <t>Person's gender, specified as an opensocial.Enum with
       the enum's key referencing opensocial.Enum.Gender. Container support for
       this field is OPTIONAL. This field may be used interchangeably with the
       string 'gender'.</t>
      </t>
      <t hangText="HAPPIEST_WHEN">

       <t>Describes when the person is happiest, specified as a
       string. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'happiestWhen'.</t>
      </t>
      <t hangText="HAS_APP">

       <t>A boolean indicating whether the person has used the
       current app. Container support for this field is OPTIONAL. This field
       may be used interchangeably with the string 'hasApp'.</t>
      </t>
      <t hangText="HEROES">

       <t>Person's favorite heroes, specified as an Array of
       strings. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'heroes'.</t>
      </t>
      <t hangText="HUMOR">

       <t>Person's thoughts on humor, specified as a string.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'humor'.</t>
      </t>
      <t hangText="ID">

       <t>A string ID that can be permanently associated with this
       person. This field may be used interchangeably with the string 'id'. For
       the anonymous VIEWER, this value MUST be -1.</t>
      </t>
      <t hangText="INTERESTS">

       <t>Person's interests, hobbies or passions, specified as an
       Array of strings. Container support for this field is OPTIONAL. This
       field may be used interchangeably with the string 'interests'.</t>
      </t>
      <t hangText="JOB_INTERESTS">

       <t>Person's favorite jobs, or job interests and skills,
       specified as an array of strings. Container support for this field is OPTIONAL.
       This field may be used interchangeably with the string
       'jobInterests'.</t>
      </t>
      <t hangText="JOBS">

       <t>Jobs the person has held, specified as an Array of 
       <xref target="opensocial.Organization">Organization</xref> s. Container
       support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'jobs'.</t>
      </t>
      <t hangText="LANGUAGES_SPOKEN">
       <t>List of the languages that the person speaks as ISO
       639-1 codes, specified as an Array of strings. Container support for
       this field is OPTIONAL. This field may be used interchangeably with the
       string 'languagesSpoken'.</t>
      </t>
      <t hangText="LIVING_ARRANGEMENT">
       <t>Description of the person's living arrangement,
       specified as a string. Container support for this field is OPTIONAL.
       This field may be used interchangeably with the string
       'livingArrangement'.</t>
      </t>
      <t hangText="LOOKING_FOR">

       <t>Person's statement about who or what they are looking
       for, or what they are interested in meeting people for. Specified as an
       Array of opensocial.Enum with the enum's key referencing
       opensocial.Enum.LookingFor. Container support for this field is
       OPTIONAL. This field may be used interchangeably with the string
       'lookingFor'.</t>
      </t>
      <t hangText="MOVIES">

       <t>Person's favorite movies, specified as an Array of
       strings. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'movies'.</t>
      </t>
      <t hangText="MUSIC">

       <t>Person's favorite music, specified as an Array of
       strings. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'music'.</t>
      </t>
      <t hangText="NAME">

       <t>A opensocial.Name object containing the person's name.
       This field may be used interchangeably with the string 'name'. For the
       anonymous VIEWER, this value may be a user friendly name such as Guest,
       Anonymous, depending on the browser locale.</t>
      </t>
      <t hangText="NETWORK_PRESENCE">
       <t>Person's current network status. Specified as an Enum
       with the enum's key referencing opensocial.Enum.Presence. Container
       support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'networkPresence'.</t>
      </t>
      <t hangText="NICKNAME">

       <t>A String representing the person's nickname. This
       represents the casual way to address this person in real life. This
       field may be used interchangeably with the string 'nickname'. For the
       anonymous VIEWER, this value may be a user friendly nickname such as
       Guest, Anonymous, depending on the browser locale.</t>
      </t>
      <t hangText="PETS">

       <t>Description of the person's pets, specified as a string.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'pets'.</t>
      </t>
      <t hangText="PHONE_NUMBERS">

       <t>Phone numbers associated with the person, specified as
       an Array of 
       <xref target="opensocial.Phone">Phone</xref> s. Container support for
       this field is OPTIONAL. This field may be used interchangeably with the
       string 'phoneNumbers'.</t>
      </t>
      <t hangText="POLITICAL_VIEWS">

       <t>Person's political views, specified as a string.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'politicalViews'.</t>
      </t>
      <t hangText="PROFILE_SONG">

       <t>Person's profile song, specified as an opensocial.Url.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'profileSong'.</t>
      </t>
      <t hangText="PROFILE_URL">

       <t>Person's profile URL, specified as a string. This URL
       must be fully qualified. Relative URLs will not work in gadgets.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'profileUrl'.</t>
      </t>
      <t hangText="PROFILE_VIDEO">

       <t>Person's profile video, specified as an opensocial.Url.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'profileVideo'.</t>
      </t>
      <t hangText="QUOTES">

       <t>Person's favorite quotes, specified as an Array of
       strings. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'quotes'.</t>
      </t>
      <t hangText="RELATIONSHIP_STATUS">
       <t>Person's relationship status, specified as a string.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'relationshipStatus'.</t>
      </t>
      <t hangText="RELIGION">

       <t>Person's relgion or religious views, specified as a
       string. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'religion'.</t>
      </t>
      <t hangText="ROMANCE">

       <t>Person's comments about romance, specified as a string.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'romance'.</t>
      </t>
      <t hangText="SCARED_OF">

       <t>What the person is scared of, specified as a string.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'scaredOf'.</t>
      </t>
      <t hangText="SCHOOLS">

       <t>Schools the person has attended, specified as an Array
       of 
       <xref target="opensocial.Organization">Organization</xref> s. Container
       support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'schools'.</t>
      </t>
      <t hangText="SEXUAL_ORIENTATION">
       <t>Person's sexual orientation, specified as a string.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'sexualOrientation'.</t>
      </t>
      <t hangText="SMOKER">

       <t>Person's smoking status, specified as an opensocial.Enum
       with the enum's key referencing opensocial.Enum.Smoker. Container
       support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'smoker'.</t>
      </t>
      <t hangText="SPORTS">

       <t>Person's favorite sports, specified as an Array of
       strings. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'sports'.</t>
      </t>
      <t hangText="STATUS">

       <t>Person's status, headline or shoutout, specified as a
       string. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'status'.</t>
      </t>
      <t hangText="TAGS">

       <t>Arbitrary tags about the person, specified as an Array
       of strings. Container support for this field is OPTIONAL. This field may
       be used interchangeably with the string 'tags'.</t>
      </t>
      <t hangText="THUMBNAIL_URL">

       <t>Person's photo thumbnail URL, specified as a string.
       This URL must be fully qualified. Relative URLs will not work in
       gadgets. This field may be used interchangeably with the string
       'thumbnailUrl'. For the anonymous VIEWER, this value may be a standard
       representation of an anonymous user on the site.</t>
      </t>
      <t hangText="TIME_ZONE">

       <t>Person's time zone, specified as the difference in
       minutes between Greenwich Mean Time (GMT) and the user's local time. See
       Date.getTimezoneOffset() in javascript for more details on this format.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'timeZone'.</t>
      </t>
      <t hangText="TURN_OFFS">

       <t>Person's turn offs, specified as an Array of strings.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'turnOffs'.</t>
      </t>
      <t hangText="TURN_ONS">

       <t>Person's turn ons, specified as an Array of strings.
       Container support for this field is OPTIONAL. This field may be used
       interchangeably with the string 'turnOns'.</t>
      </t>
      <t hangText="TV_SHOWS">

       <t>Person's favorite TV shows, specified as an Array of
       strings. Container support for this field is OPTIONAL. This field may be
       used interchangeably with the string 'tvShows'.</t>
      </t>
      <t hangText="URLS">

       <t>URLs related to the person, their webpages, or feeds.
       Specified as an Array of opensocial.Url. Container support for this
       field is OPTIONAL. This field may be used interchangeably with the
       string 'urls'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.Phone"
             anchor="opensocial.Phone">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Phone">Phone</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>Base interface for all phone objects.</t>
     <section title="Method Details">
      <section title="getField"
               anchor="opensocial.Phone.getField">
       <t>Type: {String} getField(key, opt_params)</t>
       <t>Description: Gets data for this phone that is associated with the
       specified key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to get data for; keys are defined in 
        <xref target="opensocial.Phone.Field">Phone.Field</xref> </c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.DataRequest.DataRequestFields|Object&gt;</c>
        <c>Additional 
        <xref target="opensocial.DataRequest.DataRequestFields">params</xref> to
        pass to the request.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The data</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.Phone.Field"
             anchor="opensocial.Phone.Field">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Phone">Phone</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>All of the fields that a phone has. These are the supported keys for
     the 
     <xref target="opensocial.Phone.getField">
     Phone.getField()</xref> method.</t>
     <list style="hanging">
      <t hangText="NUMBER">

       <t>The phone number, specified as a string. This field may
       be used interchangeably with the string 'number'.</t>
      </t>
      <t hangText="TYPE">

       <t>The phone number type or label, specified as a string.
       Examples: work, my favorite store, my house, etc. This field may be used
       interchangeably with the string 'type'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.ResponseItem"
             anchor="opensocial.ResponseItem">
     <t><x:highlight>Deprecated.</x:highlight> Callback methods receive <eref target="./Social-Data.xml#Response">Response</eref> objects.</t>
     <t>Represents a response that was generated by processing a data request
     item on the server.</t>
     <section title="Method Details">
      <section title="getData"
               anchor="opensocial.ResponseItem.getData">
       <t>Type: {Object} getData()</t>
       <t>Description: Gets the response data.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Object</c>
        <c>The requested value calculated by the server; the type of this value
        is defined by the type of request that was made</c>
       </texttable></t>
      </section>
      <section title="getErrorCode"
               anchor="opensocial.ResponseItem.getErrorCode">
       <t>Type: {String} getErrorCode()</t>
       <t>Description: If the request had an error, returns the error code. The
       error code can be container-specific or one of the values defined by 
       <xref target="opensocial.ResponseItem.Error">Error</xref>.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The error code, or null if no error occurred</c>
       </texttable></t>
      </section>
      <section title="getErrorMessage"
               anchor="opensocial.ResponseItem.getErrorMessage">
       <t>Type: {String} getErrorMessage()</t>
       <t>Description: If the request had an error, returns the error
       message.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>A human-readable description of the error that occurred; can be
        null, even if an error occurred</c>
       </texttable></t>
      </section>
      <section title="getOriginalDataRequest"
               anchor="opensocial.ResponseItem.getOriginalDataRequest">
       <t>Type: {Object} getOriginalDataRequest()</t>
       <t>Description: Returns the original data request item.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Object</c>
        <c>The request item used to fetch this data response</c>
       </texttable></t>
      </section>
      <section title="hadError"
               anchor="opensocial.ResponseItem.hadError">
       <t>Type: {Boolean} hadError()</t>
       <t>Description: Returns true if there was an error in fetching this data
       from the server.</t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>Boolean</c>
        <c>True if there was an error; otherwise, false</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.ResponseItem.Error"
             anchor="opensocial.ResponseItem.Error">
     <t><x:highlight>Deprecated.</x:highlight> Callback methods receive <eref target="./Social-Data.xml#Response">Response</eref> objects.</t>
     <t>Error codes that a response item can return.</t>
     <list style="hanging">
      <t hangText="BAD_REQUEST">
       <t>The request was invalid. Example: 'max' was -1. This
       field may be used interchangeably with the string 'badRequest'.</t>
      </t>
      <t hangText="FORBIDDEN">

       <t>The gadget can never have access to the requested data.
       This field may be used interchangeably with the string 'forbidden'.</t>
      </t>
      <t hangText="INTERNAL_ERROR">
       <t>The request encountered an unexpected condition that
       prevented it from fulfilling the request. This field may be used
       interchangeably with the string 'internalError'.</t>
      </t>
      <t hangText="LIMIT_EXCEEDED">
       <t>The gadget exceeded a quota on the request. Example
       quotas include a max number of calls per day, calls per user per day,
       calls within a certain time period and so forth. This field may be used
       interchangeably with the string 'limitExceeded'.</t>
      </t>
      <t hangText="NOT_IMPLEMENTED">
       <t>This container does not support the request that was
       made. This field may be used interchangeably with the string
       'notImplemented'.</t>
      </t>
      <t hangText="UNAUTHORIZED">
       <t>The gadget does not have access to the requested data.
       To get access, use 
       <eref target="./Social-Gadget.xml#opensocial.requestPermission">
       opensocial.requestPermission()</eref>. This field may be used
       interchangeably with the string 'unauthorized'.</t>
      </t>
     </list>
    </section>
    <section title="opensocial.Url"
             anchor="opensocial.Url">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Url">Url</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>Base interface for all URL objects.</t>
     <section title="Method Details">
      <section title="getField"
               anchor="opensocial.Url.getField">
       <t>Type: {String} getField(key, opt_params)</t>
       <t>Description: Gets data for this URL that is associated with the
       specified key.</t>
       <t>Parameters: 
       <texttable align="left">
        <ttcol>Name</ttcol>
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>key</c>
        <c>String</c>
        <c>The key to get data for; keys are defined in 
        <xref target="opensocial.Url.Field">Url.Field</xref> </c>
        <c>opt_params</c>
        <c>Map.&lt;opensocial.DataRequest.DataRequestFields|Object&gt;</c>
        <c>Additional 
        <xref target="opensocial.DataRequest.DataRequestFields">params</xref> to
        pass to the request.</c>
       </texttable></t>
       <t>Returns:
       <texttable align="left">
        <ttcol>Type</ttcol>
        <ttcol>Description</ttcol>
        <c>String</c>
        <c>The data</c>
       </texttable></t>
      </section>
     </section>
    </section>
    <section title="opensocial.Url.Field"
             anchor="opensocial.Url.Field">
       <t><x:highlight>Deprecated.</x:highlight> Use the definition of <eref target="./Social-Data.xml#Url">Url</eref> objects introduced in OpenSocial v1.0 instead.</t>
     <t>All of the fields that a URL has. These are the supported keys for the 
     <xref target="opensocial.Url.getField">Url.getField()</xref> method.</t>
     <list style="hanging">
      <t hangText="ADDRESS">

       <t>The address the URL points to, specified as a string.
       This field may be used interchangeably with the string 'address'.</t>
      </t>
      <t hangText="LINK_TEXT">

       <t>The text of the link, specified as a string. This field
       may be used interchangeably with the string 'linkText'.</t>
      </t>
      <t hangText="TYPE">

       <t>The URL number type or label, specified as a string.
       Examples: work, blog feed, website, etc. This field may be used
       interchangeably with the string 'type'.</t>
      </t>
     </list>
    </section>
  </section>
 </back>
</rfc>

