Library: MyOpenSpace.js
Overview
Interface for container and associated classes; everything needed to query/update MySpace API data via OpenSocial interface.
Constructors
MyOpenSpace.MySpaceContainer(
)
The MySpace container class, extends opensocial.Container. Use opensocial.Container.get() to retrieve this singleton.
methods
- newPerson(opt_params, opt_isViewer, opt_isOwner)
- newResponseItem(originalDataRequest, data, opt_errorCode, opt_errorMessage)
Namespaces
The fields for the extended MyOpenSpace.Person
properties
The fields for MyOpenSpace.Album
properties
The fields for MyOpenSpace.Video
properties
The fields for MyOpenSpace.Photo
properties
Enum for groups of items, extends opensocial.DataRequest.Group
properties
Enumerates the types of requests that can be made
properties
MyOpenSpace.DataRequest.FilterType
Enumerates the extended filter types
properties
MyOpenSpace.Environment.ObjectType
properties
Functions
Returns the field specified by key
parameters
| String |
key |
The key to search by |
returns
| MyOpenSpace.Album, undefined |
The album if found, nothing otherwise. |
Returns the field specified by key
parameters
| String |
key |
The key to search by |
returns
| MyOpenSpace.Video, undefined |
The video if found, nothing otherwise. |
Returns the field specified by key
parameters
| String |
key |
The key to search by |
returns
| MyOpenSpace.Photo, undefined |
The photo if found, nothing otherwise. |
makeRequest implementation using proxy
Fetches content from the provided URL and feeds that content into the callback function
parameters
| String |
url |
The URL where content is located |
| Function |
callback |
The function to call with the data returned from url |
| opensocial.ContentRequestParameters |
Additional |
parameters to pass to the request |
Returns the container's environment object.
returns
Returns a new MyOpenSpace.Person instance
parameters
| Map<opensocial.DataRequest.PeopleRequestFields> |
opt_params |
Optional parameters specified when creating the person. |
| Boolean |
opt_isViewer |
True if this is the viewer of the page otherwise, false. |
| Boolean |
opt_isOwner |
True if this is the owner of the page otherwise, false. |
returns
| MyOpenSpace.Person |
The person object |
Returns a new MyOpenSpace.Album instance
parameters
| undefined |
opt_params |
Unused at this time. |
returns
| MyOpenSpace.Album |
The album object |
Returns a new MyOpenSpace.Video instance
parameters
| undefined |
opt_params |
Unused at this time. |
returns
| MyOpenSpace.Video |
The album object |
Returns a new MyOpenSpace.Photo instance
parameters
| undefined |
opt_params |
Unused at this time. |
returns
| MyOpenSpace.Photo |
The photo object |
Returns a new opensocial.DataRequest instance, which is overridden locally
returns
Returns a new opensocial.ResponseItem instance
parameters
| opensocial.DataRequest |
originalDataRequest |
The ID of the photo to fetch |
| Object, null |
data |
The object retrieved, can be any entity, or null if nothing was found. |
| String |
opt_errorCode |
A code defining the error that occurred, if any. |
| String |
opt_errorMessage |
A message detailing the error that occurred, if any. |
returns
Creates an object to be used when sending to the server.
parameters
| String |
id |
The ID (VIEWER or OWNER) of the person. |
| undefined |
opt_params |
Not used at this time. |
returns
Creates an object to be used when sending to the server.
parameters
| String |
id |
The ID (VIEWER or OWNER) of the person who owns the photo |
| Number |
photo_id |
The ID of the photo to fetch |
| undefined |
opt_params |
Not used at this time. |
returns
Creates an object to be used when sending to the server
parameters
| String |
id |
The ID (VIEWER or OWNER) of the person who owns the photos |
| Map<opensocial.DataRequest.PeopleRequestFields.FIRST, opensocial.DataRequest.PeopleRequestFields.MAX> |
opt_params |
Optional parameters specified when creating the photos. |
returns
Creates an object to be used when sending to the server
parameters
| String |
id |
The ID (VIEWER or OWNER) of the person who owns the album |
| Number |
album_id |
The ID of the photo to fetch |
| undefined |
opt_params |
Not used at this time. |
returns
Creates an object to be used when sending to the server
parameters
| String |
id |
The ID (VIEWER or OWNER) of the person who owns the albums |
| Map<opensocial.DataRequest.PeopleRequestFields.FIRST, opensocial.DataRequest.PeopleRequestFields.MAX> |
opt_params |
Optional parameters specified when creating the albums. |
returns
Creates an object to be used when sending to the server
parameters
| String |
id |
The ID (VIEWER or OWNER) of the person who owns the album |
| Number |
video_id |
The ID of the photo to fetch |
| undefined |
opt_params |
Not used at this time. |
returns
Creates an object to be used when sending to the server
parameters
| String |
id |
The ID (VIEWER or OWNER) of the person who owns the albums |
| Map<opensocial.DataRequest.PeopleRequestFields.FIRST, opensocial.DataRequest.PeopleRequestFields.MAX> |
opt_params |
Optional parameters specified when creating the videos. |
returns
Creates an item to request friends from the server.
When processed, returns an opensocial.Collection<MyOpenSpace.Person> object.
parameters
| Array.<String>, String |
idSpec |
An ID reference used to specify which people to fetch; the supported keys VIEWER_FRIENDS or OWNER_FRIENDS. |
| Map.<opensocial.DataRequest.PeopleRequestFields |
opt_params |
Additional opensocial.DataRequest.PeopleRequestFields params to pass to the request. |
returns
Objects
MyOpenSpace.DefaultPageSize
Defines the default page size for paginated requests.
Used as max/default for MAX of PeopleRequestFields
A string representing a Person's city of residence.
A string representing a Person's state/province/region of residence.
A string representing a Person's zip/postal code.
A string representing a Person's country of residence.
A string representing a Person's city of birth.
A number representing a Person's age.
A string representing a Person's gender.
A string representing non-specific details about a Person.
A string representing a Person's locale.
A string representing a Person's marital status.
A string representing a Person's non-specific interests.
A string representing a Person's interests in music.
A string representing a Person's interests in movies.
A string representing a Person's interests in television.
A string representing a Person's interests in books.
A string representing a Person's heroes.
A string representing a Person's headline or shoutout.
A string representing a Person's current job and job history.
A string representing a Person's zodiac sign.
A string representing a Person's current mood.
A string representing a Person's status.
A string representing a list of people the Person would like to meet.
A number representing an Album's unique identifier.
The RESTFUL URI with which to access the album on the API.
The geographic location where the album's pictures were taken.
A URL for the album's default image.
A string representing the album's privacy setting, such as "Public" or "Private"
An integer representing the total number of photos in the album (not the number of photos actually contained within the current object).
A RESTFUL URI with which to access the photos contained in the album.
A number representing a Video's unique identifier.
The RESTFUL URI with which to access the video on the API.
The date the video was created.
The date the video was last updated.
An integer representing the media type for this video.
A URL for the thumbnail image associated with this video.
A description of the video.
The current status of the video, such as "ProcessingFailed"
An integer representing the number of views the video has currently received.
An integer representing the number of comments the video has currently received.
An integer representing the rating the video has currently received.
An integer representing the number of votes the video has currently received.
A string representing the video's country, in terms of identifying culture, not necessarily geographic location.
A string representing the video's language.
A number representing a Photo's unique identifier.
The RESTFUL URI with which to access the photo on the API.
The idSpec for a viewer album.
The idSpec for an owner album.
The idSpec for viewer albums.
The idSpec for owner albums.
The idSpec for a viewer video.
The idSpec for an owner video.
The idSpec for viewer videos.
The idSpec for owner videos.
The idSpec for a viewer photo.
The idSpec for an owner photo.
The idSpec for viewer photos.
The idSpec for owner photos.
Defines an enum for a fetch person request.
Defines an enum for a fetch people request.
Defines an enum for a fetch friends request.
Defines an enum for a fetch global data request.
Defines an enum for a fetch instance data request.
Defines an enum for an update instance data request.
Defines an enum for a fetch person data request.
Defines an enum for an update person data request.
Defines an enum for a fetch activities request.
Defines an enum for a fetch albums request.
Defines an enum for a fetch album request.
Defines an enum for a fetch videos request.
Defines an enum for a fetch video request.
Defines an enum for a fetch photos request.
Defines an enum for a fetch photo request.
Used internally to map Person requests in order to cache things better, contains basic public information.
Used internally to map Person requests in order to cache things better, contains some private data.
Used internally to map Person requests in order to cache things better, contains full profile data.
The friends that are currently online.