This namespace provides an abstraction API for all the Social Services.
Each Social service has it's own official API but can also be used within this API interface.
Note that this javascript extension can be used to manage Leaderboards and Achievements.
In order to understand how to use the social javascript extension refer to the social service you would like to to use:
Namespaces
Members
-
<static> Achievement
-
This object represents the possible Time Scopes for a leaderboard query.
Properties:
Name Type Description Cocoon.Social.Achievementobject The object itself
Properties
Name Type Description achievementIDstring The id of the achievement info.
customIDstring The optional custom id of the achievement defined by the user.
titlestring The title of the achievement.
descriptionstring The description of the achievement.
imageURLstring The url to the image representing the achievement.
pointsnumber The points value of the achievement.
-
<static> ImageSize
-
This object represents the possible images that can be obtained for a user in the social gaming extension.
Properties:
Name Type Description Cocoon.Social.ImageSizeobject The object itself
Properties
Name Type Description THUMBstring Represent a thumbnail like image size.
SMALLstring Represents the small image size.
MEDIUMstring Represents the medium image size.
LARGEstring Represents the large image size.
-
<static> Message
-
This object represents a message to be published.
Properties:
Name Type Description Cocoon.Social.Messageobject The object itself
Properties
Name Type Description messagestring The message to be published.
mediaURLstring An URL to a media (image, video, ...).
linkURLstring An URL to add to the message so the user can click on that link to get more information.
linkTextstring The text that will appear in the message link.
linkCaptionstring The text caption that will appear in the message link.
-
<static> Score
-
This object that represents the information of the user score in the application.
Properties:
Name Type Description Cocoon.Social.Scoreobject The object itself
Properties
Name Type Description userIDstring The user id.
scorenumber The score of the user.
userNamestring The name of the user.
imageURLstring imageURL The url of the user image.
leaderboardIDnumber The id of the leaderboard the score belongs to.
-
<static> ScoreParams
-
The object that represents params to retrieve or submit scores.
Properties:
Name Type Description Cocoon.Social.ScoreParamsobject The object itself
Properties
Name Type Description userIDstring The user id. If no userID is specified the current logged in user is assumed.
leaderboardIDnumber The leaderboard ID. If no leaderboard is specified the default leaderboard is assumed.
friendsboolean If enabled the query will get only scores from friends in the social network.
timeScopeCocoon.Social.TimeScope The time scope for the scores.
-
<static> TimeScope
-
This object represents the possible Time Scopes for a leaderboard query.
Properties:
Name Type Description Cocoon.Social.TimeScopeobject The object itself
Properties
Name Type Description ALL_TIMEstring All registered time.
WEEKstring A week.
TODAYstring Today.
-
<static> User
-
The object that represents the information of a user inside the social gaming extension.
Properties:
Name Type Description Cocoon.Social.Userobject The object itself
Properties
Name Type Description userIDstring The id of the user.
userNamestring The user name of the user.
userImagestring If the image URL is not provided by default, fetch it using requestUserImage method.