OpenSocial v0.8.1 Released
by Eiji Kitamura
The OpenSocial v0.8.1 specification has been released.
-
OpenSocial Specification – Implementation Version 0.8.1(Translation)
-
OpenSocial RPC Protocol(Untranslated)
-
Note: Some parts of the translations may not yet reflect changes made since the beta version. If you spot any errors, please let me know.
Here are the release notes:
OpenSocial Release Notes #
OpenSocial Specification Changes
- Server-side API changes Added a JSON RPC protocol for server-to-server communication that enables simpler batch processing. For naming consistency, the RESTful API will now be referred to as the RESTful Protocol.
- Added
-,_, and.to characters permitted in OpenSocial IDs OpenSocial IDs can now include-,_, and., in addition to the previously allowed alphanumeric characters. - Aligned with the Portable Contacts specification
Incompatible Changes
- RESTful protocol incompatibilities Many query and response fields were renamed or removed from the RESTful Protocol. The full list of changes to the RESTful Protocol is detailed below.
RESTful Protocol Changes
- Compatibility with PortableContacts Implementing the RESTful Protocol brings containers into technical compatibility with the PortableContacts specification. The changes below were made to achieve this compatibility.
- New response format
format=xmlRequests now support theformat=xmlparameter. People requests must be made with eitherformat=xmlorformat=json. - Containers must implement random-access paging Containers are now required to implement paging using the
startIndexanditemsPerPageparameters. - Removed
rel=nextlink from collection fields This parameter has been removed from JSON collection responses. - Removed author 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 may impose an upper limit on the number of returned contacts for performance reasons.
- Default value for
itemsPerPageThe default value when theitemsPerPageparameter is omitted from a request is container-dependent. - Changes to sorting parameters The
orderByparameter was renamed to sortBy. Additionally, asortOrderparameter was added, acceptingascendingordescending. The default isascending. - Added
updatedSinceparameter Queries can now specify returning only entries that were updated within a specified time frame. - Indicate whether sorting and filtering occurred in the response Since sorting and filtering are costly operations for containers, top-level response fields
filtered,sorted, andupdatedSinceare now included in responses to indicate whether the requested filtering was actually applied. - Ability to request deleted
Personobjects By using the newly added@deletedselector and theupdatedSinceparameter, it is now possible to retrieve contacts deleted after a specified date/time. Personresponse must contain at leastidandnamefields Containers must include thenameandidfields inPersondata.profileUrlmust also be a URL The value returned in theprofileUrlfield of aPersonmust also be returned in theurlsfield of an entry with atypeofprofile.- Added
photosfield toPersonAdded aphotosfield toPerson, containing a list of entries withurl,type, andprimarysubfields. When athumbnailUrlfield is returned on aPersonobject, thaturlmust also be present in thephotosfield of an entry with atypeofthumbnail. - Added
imsfield toPersonAdded animsfield toPersonwithvalue,type, andprimarysubfields. Commonly usedtypevalues are defined asaim,gtalk,icq,xmpp,msn,skype,qq, andyahoo, but newtypevalues can also be defined. - Added
accountsfield toPersonAdded anaccountsfield toPersonrepresenting other services where the person has an account. This field contains a list of entries withdomain,userid,username, andprimarysubfields. - Added
primarysubfield to multiplePersonfields Added aprimarysubfield to theemails,urls,ims,phoneNumbers,addresses,organizations, andphotosfields ofPersonto indicate which field in the list is the primary one (if any). - Consolidated multiple
jobsandschoolsfields intoorganizationsEntries forjobsandschoolswere consolidated into an array ofOrganizationstructures namedorganizations. TheOrganizationstructure is extended with atypesubfield with canonical values ofjobandschool. - Standardized multiple
Personfields to avaluefield Primary text values in multiple fields onPersonshould be stored in a subfield namedvalue. This requires renaming instances ofemails.address,phoneNumbers.number,urls.address, and all{Enum}.keyfields to{Enum}.value. Because theaddresses,accounts, andorganizationsfields are complex, the concept of avaluefield does not apply to them. For sorting and filtering, the "primary" subfields corresponding to these fields areaddresses.formatted,accounts.domain, andorganizations.name. Persongenderfield is now a stringPersonnow treatsgenderas a string field, withmaleandfemaleas canonical values.- Removed
extendedAddressandpoBoxsubfields fromAddressesSince full (potentially multi-line) addresses can now be stored in thestreetAddresssubfield, theextendedAddressandpoBoxsubfields have been removed fromAddress. - Renamed
unstructuredAddresstoformattedTheunstructuredAddresssubfield ofAddresshas been renamed toformatted. - Renamed
dateOfBirthtobirthdayThedateOfBirthfield onPersonhas been renamed tobirthday. - Renamed timeZone to utcOffset The
timeZonefield onPersonhas been renamed toutcOffset. - Definition of
nicknameThenicknamefield onPersonis defined as "a casual way to refer to the person in the real world." - Default set of
Personfields When thefieldsquery parameter is omitted from aPersonrequest,id,name, andthumbnailUrlhave been defined as the minimum required default set to match the JS API defaults. - Querying supportedFields Defined
/people/@supportedFieldsand/activities/@supportedFieldsendpoints in the RESTful Protocol that return a list ofPersonandActivityfields supported by the container. - Removed
indexByTheindexByquery parameter has been removed. Activity.titlefield is now an HTML string TheActivitytitle field will now be treated as a string containing HTML markup rather than a complex data object.- Renamed
unstructuredtoformattedTheunstructuredname field has been changed toformatted. - Added
displayNamefield AddeddisplayNameas a top-level field onPerson.
RPC Protocol Changes
- Introduction of the RPC Protocol A new RPC Protocol has been introduced as an option to simplify batch processing and complex server-to-server operations.
opensocial.* JavaScript Changes
- New
opensocial.IdSpec.GroupIdenum You can now useopensocial.IdSpec.GroupId.FRIENDSoropensocial.IdSpec.GroupId.SELFto constructIdSpecobjects. - Defined return values for
supportsFieldDefined the return value ofopensocial.Environment.supportsField()to returntrueif the container supports the field, andfalseotherwise.
gadgets.* JavaScript Changes
- There are no changes to the
gadgets.*JavaScript API.
Gadgets XML Changes
- OAuth support in the
<Preload>element Theauthzattribute of the<Preload>element now supports the valueoauth. 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 the correspondinggadgets.io.makeRequestparameters.