Beamable SDK
Public Member Functions | Properties | List of all members
Beamable.Common.Api.Social.SocialApi Class Reference

This type defines the Client main entry point for the Friends feature. More...

Inheritance diagram for Beamable.Common.Api.Social.SocialApi:
Inheritance graph
[legend]
Collaboration diagram for Beamable.Common.Api.Social.SocialApi:
Collaboration graph
[legend]

Public Member Functions

 SocialApi (IUserContext ctx, IBeamableRequester requester)
 
Promise< SocialListGet ()
 Get the current player's SocialList. If the social list has never been downloaded, this will use the RefreshSocialList method. However, once the social list has been downloaded, this method will return immediately with the cached data. More...
 
Promise< EmptyResponseImportFriends (SocialThirdParty source, string token)
 Import friends from a third party provider. More...
 
Promise< FriendStatusBlockPlayer (long playerId)
 Block a player from the current player's social list. When a player is blocked, they'll appear in the SocialList.blocked list. Use the UnblockPlayer method to revert. More...
 
Promise< FriendStatusUnblockPlayer (long playerId)
 Unblock a player from the current player's SocialList.blocked list. More...
 
Promise< EmptyResponseCancelFriendRequest (long playerId)
 
Promise< EmptyResponseRemoveFriend (long playerId)
 Remove a player from the current player's SocialList.friends list. More...
 
Promise< SocialListRefreshSocialList ()
 Get the current player's SocialList More...
 

Properties

IBeamableRequester Requester [get]
 
- Properties inherited from Beamable.Common.Api.IHasBeamableRequester
IBeamableRequester Requester [get]
 Access the IBeamableRequester
 

Detailed Description

This type defines the Client main entry point for the Friends feature.

Related Links

img beamable-logo

Member Function Documentation

◆ BlockPlayer()

Promise< FriendStatus > Beamable.Common.Api.Social.SocialApi.BlockPlayer ( long  gamerTag)
inline

Block a player from the current player's social list. When a player is blocked, they'll appear in the SocialList.blocked list. Use the UnblockPlayer method to revert.

Parameters
gamerTagThe gamertag of the player to block
Returns
A Promise containing a FriendStatus for the given gamertag

Implements Beamable.Common.Api.Social.ISocialApi.

◆ Get()

Promise< SocialList > Beamable.Common.Api.Social.SocialApi.Get ( )
inline

Get the current player's SocialList. If the social list has never been downloaded, this will use the RefreshSocialList method. However, once the social list has been downloaded, this method will return immediately with the cached data.

Returns
A Promise containing the player's SocialList

Implements Beamable.Common.Api.Social.ISocialApi.

◆ ImportFriends()

Promise< EmptyResponse > Beamable.Common.Api.Social.SocialApi.ImportFriends ( SocialThirdParty  source,
string  token 
)
inline

Import friends from a third party provider.

Parameters
sourceThe third party to find friends from.
tokenAn access token issued from the third party that can be sent to Beamable so that the Beamable Cloud can perform the friend import.
Returns
A Promise representing the network call.

Implements Beamable.Common.Api.Social.ISocialApi.

◆ RefreshSocialList()

Promise< SocialList > Beamable.Common.Api.Social.SocialApi.RefreshSocialList ( )
inline

Get the current player's SocialList

Returns
A Promise containing the player's SocialList

Implements Beamable.Common.Api.Social.ISocialApi.

◆ RemoveFriend()

Promise< EmptyResponse > Beamable.Common.Api.Social.SocialApi.RemoveFriend ( long  gamerTag)
inline

Remove a player from the current player's SocialList.friends list.

Parameters
gamerTagThe gamertag of the player to remove.
Returns
A Promise representing the network call.

Implements Beamable.Common.Api.Social.ISocialApi.

◆ UnblockPlayer()

Promise< FriendStatus > Beamable.Common.Api.Social.SocialApi.UnblockPlayer ( long  gamerTag)
inline

Unblock a player from the current player's SocialList.blocked list.

Parameters
gamerTagThe gamertag of the player to unblock
Returns
A Promise containing a FriendStatus for the given gamertag

Implements Beamable.Common.Api.Social.ISocialApi.


The documentation for this class was generated from the following file: