OpenSocial v0.8.1 released
by Eiji Kitamura
The OpenSocial v0.8.1 specification has been published.
- OpenSocial Specification – Implementation Version 0.8.1(translated)
- OpenSocial RESTful Protocol(translated)
- OpenSocial RPC Protocol(untranslated)
*Some of the translations have not been updated with the beta version. Please let us know if you find any errors.
The release notes are as follows:
OpenSocial Release Notes #
OpenSocial specification changes
- Server-Side API Changes The server-to-server communication feature now uses the JSON RPC protocol, which enables simpler batch processing. To maintain naming consistency, the RESTful API will now be called the RESTful protocol.
- Added
-,_, and.to the allowed characters in OpenSocial IDs OpenSocial IDs can now contain-,_, and.in addition to the traditional alphanumeric characters. - Aligned with the Portable Contacts specification
Breaking changes
- RESTful Protocol Incompatibility Many query and response fields have been renamed or removed from the RESTful protocol. All changes to the RESTful protocol are listed below.
RESTful protocol changes
-
PortableContacts Compatibility By implementing the RESTful protocol, containers are technically compatible with the PortableContacts specification. The following changes have been implemented to achieve this compatibility:
-
New response type
format=xmlRequests now support theformat=xmlparameter. People requests must be made withformat=xmlorformat=json. -
Containers must implement random-access paging Containers are now required to implement paging using the
startIndexanditemsPerPageparameters. -
The
rel=nextlink has been removed from collection fields. This parameter has been removed from JSON collection responses. -
The author has been removed from collection fields. This parameter has been removed from JSON collection responses.
-
Containers must be able to return all contacts at once. Containers must be able to return all contacts in a single request, but can limit the number of contacts returned for performance reasons.
-
Default value for
itemsPerPageIf theitemsPerPageparameter isn't specified in the request, the default value depends on the container. -
Changes to sorting parameters The
orderByparameter has been renamed to sortBy. ThesortOrderparameter has also been added, allowingascending(ascending) anddescending(descending) sorting. The default isascending. -
Added
updatedSinceparameter You can specify that a query should only return entries updated within a specified time period. -
Indicate whether sorting and filtering were performed in the response Because sorting and filtering can be expensive for containers, the response now includes top-level response fields
filtered,sorted, andupdatedSinceto indicate whether the requested filtering was performed. -
Can now request deleted
Personobjects The newly added@deletedselector andupdatedSinceparameter allow you to retrieve contacts deleted after a specified date and time. -
PersonThe response must include at least theidandnamefields. The container must include thenameandidfields in thePersondata. -
profileUrlmust also be a URL. The value returned in theprofileUrlfield ofPersonmust also be returned in theurlsfield of the entry whosetypeisprofile. -
Personnow has thephotosfield.Personnow has thephotosfield, which contains a list of entries withurl,type, andprimarysubfields. If anPersonobject returns anthumbnailUrlfield, thisurlmust also be present in thephotosfield of any entry whosetypeisthumbnail. -
Personnow includes theimsfield.Personnow includes theimsfield, with the subfieldsvalue,type, andprimary. The commonly usedtypevaluesaim,gtalk,icq,xmpp,msn,skype,qq, andyahooare predefined, but you can also define a new valuetype. -
Personnow includes theaccountsfield.Personnow includes theaccountsfield, which indicates other services for which the person has accounts. This field contains a list of entries with thedomain,userid,username, andprimarysubfields. -
primarysubfield added to severalPersonfields ThePersonfieldsemails,urls,ims,phoneNumbers,addresses,organizations,photosnow have theprimarysubfield, which indicates which field in the list is primary (if present). -
Consolidated
jobsandschoolsmulti-fields intoorganizationsjobsandschoolsentries have been consolidated into an array ofOrganizationstructures namedorganizations. TheOrganizationstructure has been extended with antypesubfield, withjobandschoolas legal values. -
Standardized
Personmulti-fields into anvaluefieldPersonmulti-fields should store their primary text value in a subfield namedvalue. This requires renamingemails.address,phoneNumbers.number,urls.address, and all instances of the{Enum}.keyfield to{Enum}.value. Due to the complexity of theaddresses,accounts, andorganizationsfields, the concept of avaluefield does not exist. For sorting and filtering purposes, the "primary" subfields of these fields areaddresses.formatted,accounts.domain, andorganizations.name. *Persongenderfields are stringsPersontreatsgenderas a string field, withmaleandfemaleas legal values. -
Addresses-extendedAddressorpoBoxsubfields deprecated Because it's now possible to store a complete (possibly multi-line) address in thestreetAddresssubfield, theAddresssubfieldsextendedAddressandpoBoxhave been deprecated. -
unstructuredAddresschanged toformattedTheunstructuredAddresssubfield ofAddresshas been renamed toformatted. -
dateOfBirthchanged tobirthdayThedateOfBirthfield ofPersonhas been renamed tobirthday. -
timeZone changed to utcOffset The
timeZonefield ofPersonhas been renamed toutcOffset. -
Definition of
nicknameThePersonfield innicknamehas been defined as "an informal way to refer to this person in the real world." -
Default Set of
PersonFieldsPersonIf the query parameterfieldsis missing from a request, a minimal default set ofid,name, andthumbnailUrlhas been defined to match the defaults in the JS API. -
Querying supportedFields The RESTful protocol now defines an endpoint called
/people/@supportedFields および/activities/@supportedFieldsthat returns a list of thePersonandActivityfields supported by the container. -
indexByDeprecated TheindexByquery parameter has been deprecated. -
**
Activity.titleFields are now treated as HTML strings. **ActivityThe Title field is now treated as a string containing HTML markup, rather than a complex data object. -
unstructuredChanged toformattedThe Name fieldunstructuredhas been changed toformatted. -
displayNameField AddeddisplayNamehas been added as a top-level field of thePersonfield.
RPC protocol changes
- The RPC protocol is here A new option, the RPC protocol, has been introduced to simplify batch processing and complex server-to-server operations.
opensocial.* JavaScript Changes
- New
opensocial.IdSpec.GroupIdenumIdSpecobjects can now be constructed usingopensocial.IdSpec.GroupId.FRIENDSoropensocial.IdSpec.GroupId.SELF. - Responses for
supportsFieldDefined The return value foropensocial.Environment.supportsField()has been defined to returntrueif the container supports fields, orfalseotherwise.
gadgets.* JavaScript Changes
gadgets.*There are no changes to the JavaScript API.
Gadgets XML Changes
- OAuth support for the
<Preload>element The<Preload>element'sauthzattribute now supports theoauthvalue. Whenauthzisoauth, theoauth_service_name,oauth_token_name,oauth_request_token, andoauth_request_token_secretattributes are retrieved. These attributes have the same meanings and default values as their counterparts in thegadgets.io.makeRequestparameter.
Subscribe via RSS