hi5 Javascript API
The Javascript API allows you to access the hi5 data via an OpenSocial Interface.
hi5.Album
Description
In hi5 all photos are contained in an album. This class allows you to get various properties of a user's photo album.
Methods
album.getCover() Returns the album image for a particular album.
album.getId() Returns the internal Id for an album.
album.getName() Returns the name of the album.
album.getPhotos() Returns the list of photos that a user has in their album
hi5.Photo
Description
This class returns the details about a particular photo in a user's album.
Methods
photo.getUrl() Returns the URL for a given photo.
NOTE: Status and Presence APIs that were previously present have been deprecated in favor of adding them as additional fields in person requests.
The following code will include status and presence for the viewer returned from the person request. This applies to people requests for groups as well. By including <Optional feature="hi5"/> you can use the hi5.PersonField?.PRESENCE field and test for support across containers to stay portable. We expect the PRESENCE field to be part of opensocial in the next spec revision.
var opts = {};
opts[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
[opensocial.Person.Field.AGE,
opensocial.Person.Field.NAME,
opensocial.Person.Field.GENDER,
opensocial.Person.Field.PROFILE_URL,
opensocial.Person.Field.THUMBNAIL_URL,
opensocial.Person.Field.STATUS,
hi5.PersonField.PRESENCE ];
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest('VIEWER', opts), 'viewer');
req.send(onLoadViewer);