PlayerIO

The fastest way to build online games without breaking a sweat.

HTML5 (Javascript) Client Reference

javascript (html5) publishingNetworkRelations class informationClass publishingNetworkRelations

Language: Javascript (HTML5)

The PlayerIO Publishing Network Relations service. This class is used to fetch the current users friends, and to show the various friend management dialogs for games published on the PlayerIO Publishing Network.

Properties

 
friends :publishingNetworkProfile[]

List of all friends

Methods

 
isBlocked (userId):bool

Check if a specific user is a blocked

isFriend (userId):bool

Check if a specific user is a friend

showBlockedUsersManager (closedCallback):

Shows the a dialog where the user can manage their blocked users list

showFriendsManager (closedCallback):

Shows the a dialog where the user can manage their friends list

showRequestBlockUserDialog (userId, closedCallback):

Shows a dialog where the user can choose to block a specific user

showRequestFriendshipDialog (userId, closedCallback):

Shows a dialog where the user can choose to send a friend request to the specified user

publishingNetworkRelations.friends

friends :publishingNetworkProfile[]

List of all friends

publishingNetworkRelations.isBlocked

isBlocked (userId):bool

Check if a specific user is a blocked

Arguments

userId:string
The userId of the user to check

publishingNetworkRelations.isFriend

isFriend (userId):bool

Check if a specific user is a friend

Arguments

userId:string
The userId of the user to check

publishingNetworkRelations.showBlockedUsersManager

showBlockedUsersManager (closedCallback):

Shows the a dialog where the user can manage their blocked users list

Arguments

closedCallback:function()
Callback function that will be called when the dialog is closed

publishingNetworkRelations.showFriendsManager

showFriendsManager (closedCallback):

Shows the a dialog where the user can manage their friends list

Arguments

closedCallback:function()
Callback function that will be called when the dialog is closed

publishingNetworkRelations.showRequestBlockUserDialog

showRequestBlockUserDialog (userId, closedCallback):

Shows a dialog where the user can choose to block a specific user

Arguments

userId:string
The userId of the user to block
closedCallback:function()
Callback function that will be called when the dialog is closed

publishingNetworkRelations.showRequestFriendshipDialog

showRequestFriendshipDialog (userId, closedCallback):

Shows a dialog where the user can choose to send a friend request to the specified user

Arguments

userId:string
The userId of the user that will receive the friendship request, if sent
closedCallback:function()
Callback function that will be called when the dialog is closed