GS2-Friend SDK for Game Engine API Reference

Specifications of models and API references for GS2-Friend SDK for Game Engine

Model

EzProfile

Profile

The profile stores information about the game player.

There are three types of profiles that can be set for each public range.

  • friend The information that can be viewed by those with whom a friend relationship has been established.
  • follow Content that can be viewed by followers.
  • public Content that can be viewed by anyone
TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser ID
publicProfilestring~ 1024 charsPublic profile
Profile information visible to all players regardless of relationship. Typically used for display names, avatars, or other publicly shareable information.
followerProfilestring~ 1024 charsProfile for followers
Profile information visible only to players who follow this user. Can contain more detailed information than the public profile, such as gameplay statistics or status messages.
friendProfilestring~ 1024 charsProfile for friends
Profile information visible only to players who have an established mutual friend relationship. The most private profile level, suitable for sharing personal information like contact details or private messages.

EzBlackList

Blacklist

Manages a list of users that the player has blocked. Blocked users are prevented from sending friend requests or follow requests to this player, providing a mechanism for players to control unwanted interactions.

TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser ID
targetUserIdsList<string>0 ~ 1000 itemsBlacklist user ID list
The list of user IDs that this player has blocked. Blocked users cannot send friend requests or follow requests to this player.

EzFollowUser

Follow User

Represents a user that the current user is following. Provides access to the followed user’s public profile and follower-level profile information, which is visible to followers but not to the general public.

TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser ID
publicProfilestring~ 1024 charsPublic profile
The followed user’s publicly visible profile information, accessible to all players.
followerProfilestring~ 1024 charsProfile for followers
The followed user’s profile information visible only to their followers. Contains more detailed information than the public profile.

EzFriendUser

Friend User

Represents a user who has an established mutual friend relationship with the current user. Provides access to the friend’s public profile and friend-level profile information, which is only visible to confirmed friends.

TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser ID
publicProfilestring~ 1024 charsPublic profile
The friend’s publicly visible profile information, accessible to all players.
friendProfilestring~ 1024 charsProfile for friends
The friend’s profile information visible only to confirmed friends. Contains more private information than the public profile.

EzFriendRequest

Friend Request

Represents a friend request between two players. Contains the sender’s user ID, the recipient’s user ID, and the sender’s public profile for display purposes.

TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser ID of the sender of the friend request
targetUserIdstring
~ 128 charsUser ID to whom a friend request was sent
publicProfilestring~ 1024 charsPublic profile
The public profile of the friend request sender. Included for display purposes so that the recipient can identify who is requesting friendship.

EzPublicProfile

Public Profile

A read-only view of a user’s publicly visible profile information. Can be retrieved for any user without requiring a friend or follow relationship. Used for displaying player information in search results, leaderboards, or other public contexts.

TypeConditionRequiredDefaultValue LimitsDescription
userIdstring
~ 128 charsUser ID
publicProfilestring~ 1024 charsPublic profile
The user’s publicly visible profile content, accessible without requiring a friend or follow relationship.

Methods

getProfile

Get the player’s own profile

Retrieves the player’s own profile, including all three visibility levels:

  • Public profile: visible to everyone (e.g., player name, avatar)
  • Follower profile: visible only to players who follow you (e.g., play style, favorite team)
  • Friend profile: visible only to mutual friends (e.g., real name, contact info) Use this to display the “My Profile” or “Edit Profile” screen where the player can see and manage all their profile information.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession

Result

TypeDescription
itemEzProfileProfile

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Profile(
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Profile(
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Profile(
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
Value change event handling
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Profile(
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Profile(
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Profile(
    );
    
    // Start event handling
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Friend::Model::FProfile> value) {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    Domain->Unsubscribe(CallbackId);

getPublicProfile

Get another player’s public profile

Retrieves only the public portion of the specified player’s profile — the information that is visible to everyone regardless of follow or friend status. For example, this returns their display name, avatar, and level, but NOT their follower-only or friend-only profile data. Use this to show a player card or mini-profile when tapping on another player’s name in rankings, chat, or matchmaking results.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID

Result

TypeDescription
itemEzPublicProfilePublic Profile

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).User(
        userId: "user-0001"
    ).PublicProfile(
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).User(
        userId: "user-0001"
    ).PublicProfile(
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->User(
        "user-0001" // userId
    )->PublicProfile(
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
Value change event handling
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).User(
        userId: "user-0001"
    ).PublicProfile(
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).User(
        userId: "user-0001"
    ).PublicProfile(
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->User(
        "user-0001" // userId
    )->PublicProfile(
    );
    
    // Start event handling
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Friend::Model::FPublicProfile> value) {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    Domain->Unsubscribe(CallbackId);

updateProfile

Update the player’s own profile

Updates the player’s profile with three distinct visibility levels:

  • publicProfile: information shown to all players (e.g., display name, level, avatar icon)
  • followerProfile: extra information shown only to followers (e.g., “Looking for guild members!”)
  • friendProfile: private information shown only to friends (e.g., Discord ID, schedule) Each field is a free-form string, so you can store any text or JSON data. Use this when the player edits their profile from a settings or profile edit screen.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession
publicProfilestring~ 1024 charsPublic profile
Profile information visible to all players regardless of relationship. Typically used for display names, avatars, or other publicly shareable information.
followerProfilestring~ 1024 charsProfile for followers
Profile information visible only to players who follow this user. Can contain more detailed information than the public profile, such as gameplay statistics or status messages.
friendProfilestring~ 1024 charsProfile for friends
Profile information visible only to players who have an established mutual friend relationship. The most private profile level, suitable for sharing personal information like contact details or private messages.

Result

TypeDescription
itemEzProfileProfile updated

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Profile(
    );
    var result = await domain.UpdateProfileAsync(
        publicProfile: "public",
        followerProfile: "follower",
        friendProfile: "friend"
    );
    var item = await result.ModelAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Profile(
    );
    var future = domain.UpdateProfileFuture(
        publicProfile: "public",
        followerProfile: "follower",
        friendProfile: "friend"
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    var future2 = future.Result.ModelFuture();
    yield return future2;
    if (future2.Error != null)
    {
        onError.Invoke(future2.Error, null);
        yield break;
    }
    var result = future2.Result;
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Profile(
    );
    const auto Future = Domain->UpdateProfile(
        "public", // publicProfile
        "follower", // followerProfile
        "friend" // friendProfile
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }

    // obtain changed values / result values
    const auto Future2 = Future->GetTask().Result()->Model();
    Future2->StartSynchronousTask();
    if (Future2->GetTask().IsError())
    {
        return Future2->GetTask().Error();
    }
    const auto Result = Future2->GetTask().Result();

describeFollowUsers

Get a list of players the player is following

Retrieves all players that the current player has followed. Following is a one-way relationship — you can follow someone without their approval, like a social media follow. If withProfile is set to true, each followed player’s follower-level profile is also returned (the extra info they share with followers). Use this to build a “Following” list screen where the player can see everyone they follow.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession
withProfileboolfalseGet a profile together
limitint301 ~ 1000Number of data items to retrieve
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data

Result

TypeDescription
itemsList<EzFollowUser>List of users that the user follows
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Follow(
        withProfile: true
    );
    var items = await domain.FollowsAsync(
    ).ToListAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Follow(
        withProfile: true
    );
    var it = domain.Follows(
    );
    List<EzFollowUser> items = new List<EzFollowUser>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Follow(
        true // withProfile
    );
    const auto It = Domain->Follows(
    );
    TArray<Gs2::UE5::Friend::Model::FEzFollowUserPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }

follow

Follow another player

Adds the specified player to the current player’s follow list. Following is a one-way action that does not require the other player’s approval — it works like a social media follow. After following, the player can see the target player’s follower-level profile information (the extra details they share with followers). Use this for a “Follow” button on another player’s profile, in search results, or in ranking lists.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession
targetUserIdstring
~ 128 charsUser ID of the person want to follow
withProfilebool
falseGet a profile together

Result

TypeDescription
itemEzFollowUserFollowed user

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Follow(
        withProfile: true
    );
    var result = await domain.FollowAsync(
        targetUserId: "user-0002"
    );
    var item = await result.ModelAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Follow(
        withProfile: true
    );
    var future = domain.FollowFuture(
        targetUserId: "user-0002"
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    var future2 = future.Result.ModelFuture();
    yield return future2;
    if (future2.Error != null)
    {
        onError.Invoke(future2.Error, null);
        yield break;
    }
    var result = future2.Result;
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Follow(
        true // withProfile
    );
    const auto Future = Domain->Follow(
        "user-0002" // targetUserId
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }

    // obtain changed values / result values
    const auto Future2 = Future->GetTask().Result()->Model();
    Future2->StartSynchronousTask();
    if (Future2->GetTask().IsError())
    {
        return Future2->GetTask().Error();
    }
    const auto Result = Future2->GetTask().Result();

getFollowUser

Check if a specific player is being followed

Retrieves a specific player from the current player’s follow list. If the target player is in the follow list, their information is returned. If withProfile is true, their follower-level profile is also included. Use this to check whether the player is already following someone — for example, to toggle a “Follow / Unfollow” button on another player’s profile screen.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession
withProfileboolfalseGet a profile together
targetUserIdstring
~ 128 charsUser ID

Result

TypeDescription
itemEzFollowUserFollowing user

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Follow(
        withProfile: true
    ).FollowUser(
        targetUserId: "user-0002"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Follow(
        withProfile: true
    ).FollowUser(
        targetUserId: "user-0002"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Follow(
        true // withProfile
    )->FollowUser(
        "user-0002" // targetUserId
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
Value change event handling
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Follow(
        withProfile: true
    ).FollowUser(
        targetUserId: "user-0002"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Follow(
        withProfile: true
    ).FollowUser(
        targetUserId: "user-0002"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Follow(
        true // withProfile
    )->FollowUser(
        "user-0002" // targetUserId
    );
    
    // Start event handling
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Friend::Model::FFollowUser> value) {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    Domain->Unsubscribe(CallbackId);

unfollow

Unfollow a player

Removes the specified player from the current player’s follow list. After unfollowing, the player will no longer be able to see the target player’s follower-level profile information. Use this for an “Unfollow” button on a followed player’s profile or in the “Following” list screen.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession
targetUserIdstring
~ 128 charsUser ID
withProfilebool
falseGet a profile together

Result

TypeDescription
itemEzFollowUserUnfollowed user

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Follow(
        withProfile: true
    ).FollowUser(
        targetUserId: "user-0002"
    );
    var result = await domain.UnfollowAsync(
    );
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Follow(
        withProfile: true
    ).FollowUser(
        targetUserId: "user-0002"
    );
    var future = domain.UnfollowFuture(
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Follow(
        true // withProfile
    )->FollowUser(
        "user-0002" // targetUserId
    );
    const auto Future = Domain->Unfollow(
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
    const auto Result = Future->GetTask().Result();

deleteFriend

Remove a player from the friend list

Removes the specified player from the current player’s friend list, ending the mutual friendship. After removal, neither player will be able to see each other’s friend-level profile information. Use this for a “Remove Friend” button on a friend’s profile or detail screen. Consider showing a confirmation dialog since the other player will also lose the friendship.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession
targetUserIdstring
~ 128 charsUser ID
withProfilebool
falseGet a profile together

Result

TypeDescription
itemEzFriendUserFriend deleted

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Friend(
        withProfile: true
    );
    var result = await domain.DeleteFriendAsync(
        targetUserId: "user-0002"
    );
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Friend(
        withProfile: true
    );
    var future = domain.DeleteFriendFuture(
        targetUserId: "user-0002"
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Friend(
        true // withProfile
    );
    const auto Future = Domain->DeleteFriend(
        "user-0002" // targetUserId
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
    const auto Result = Future->GetTask().Result();

describeFriends

Get the player’s friend list

Retrieves all players who are mutual friends with the current player. Unlike following (one-way), friendship is a two-way relationship that is established when a friend request is accepted by both sides. If withProfile is set to true, each friend’s friend-level profile is also returned (the most private level of profile information). Use this to build a “Friends” list screen showing all of the player’s friends — for example, displaying their names, avatars, and online status.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession
withProfileboolfalseGet a profile together
limitint301 ~ 1000Number of data items to retrieve
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data

Result

TypeDescription
itemsList<EzFriendUser>List of Friend
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var items = await domain.FriendsAsync(
        withProfile: true
    ).ToListAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var it = domain.Friends(
        withProfile: true
    );
    List<EzFriendUser> items = new List<EzFriendUser>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    const auto It = Domain->Friends(
        true // withProfile
    );
    TArray<Gs2::UE5::Friend::Model::FEzFriendUserPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
Value change event handling
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    
    // Start event handling
    var callbackId = domain.SubscribeFriends(
        () => {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    domain.UnsubscribeFriends(callbackId);
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    
    // Start event handling
    var callbackId = domain.SubscribeFriends(
        () => {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    domain.UnsubscribeFriends(callbackId);
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    
    // Start event handling
    const auto CallbackId = Domain->SubscribeFriends(
        []() {
            // Called when an element of the list changes.
        }
    );

    // Stop event handling
    Domain->UnsubscribeFriends(CallbackId);

getFriend

Get a specific friend’s information

Retrieves information about a specific player from the current player’s friend list. If withProfile is true, the friend’s friend-level profile (the most private tier of profile data) is also returned. Use this to display a friend’s detail screen — for example, showing their full profile, stats, and options like “Remove Friend” or “Send Message”.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession
targetUserIdstring
~ 128 charsUser ID
withProfileboolfalseGet a profile together

Result

TypeDescription
itemEzFriendUserFriend

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Friend(
        withProfile: true
    ).FriendUser(
        targetUserId: "user-0002"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Friend(
        withProfile: true
    ).FriendUser(
        targetUserId: "user-0002"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Friend(
        true // withProfile
    )->FriendUser(
        "user-0002" // targetUserId
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
Value change event handling
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Friend(
        withProfile: true
    ).FriendUser(
        targetUserId: "user-0002"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Friend(
        withProfile: true
    ).FriendUser(
        targetUserId: "user-0002"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Friend(
        true // withProfile
    )->FriendUser(
        "user-0002" // targetUserId
    );
    
    // Start event handling
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Friend::Model::FFriendUser> value) {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    Domain->Unsubscribe(CallbackId);

deleteRequest

Cancel a sent friend request

Cancels a friend request that the player previously sent, before the other player responds. The request is removed from both the sender’s outbox and the recipient’s inbox. Use this for a “Cancel Request” button on the sent requests screen or on a player’s profile where a request is already pending.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession
targetUserIdstring
~ 128 charsUser ID

Result

TypeDescription
itemEzFriendRequestFriend Request deleted

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).SendFriendRequest(
        targetUserId: "user-0002"
    );
    var result = await domain.DeleteRequestAsync(
    );
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).SendFriendRequest(
        targetUserId: "user-0002"
    );
    var future = domain.DeleteRequestFuture(
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->SendFriendRequest(
        "user-0002" // targetUserId
    );
    const auto Future = Domain->DeleteRequest(
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
    const auto Result = Future->GetTask().Result();

describeSendRequests

Get a list of outgoing friend requests

Retrieves all friend requests that the current player has sent and are still waiting for a response. Each request shows who it was sent to and when. The player can cancel pending requests if they change their mind. Use this to build a “Sent Requests” screen — for example, showing “Waiting for PlayerB to respond… [Cancel]”.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession

Result

TypeDescription
itemsList<EzFriendRequest>List of Friend Request
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var items = await domain.SendRequestsAsync(
    ).ToListAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var it = domain.SendRequests(
    );
    List<EzFriendRequest> items = new List<EzFriendRequest>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    const auto It = Domain->SendRequests(
    );
    TArray<Gs2::UE5::Friend::Model::FEzFriendRequestPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }

getSendRequest

Get a specific outgoing friend request

Retrieves the details of a friend request that the current player has sent to a specific player. Use this to display the status of a specific sent request — for example, checking whether a request to a particular player is still pending, or showing request details on a player profile screen.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession
targetUserIdstring
~ 128 charsUser ID

Result

TypeDescription
itemEzFriendRequestFriend Request

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).SendFriendRequest(
        targetUserId: "user-0002"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).SendFriendRequest(
        targetUserId: "user-0002"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->SendFriendRequest(
        "user-0002" // targetUserId
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
Value change event handling
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).SendFriendRequest(
        targetUserId: "user-0002"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).SendFriendRequest(
        targetUserId: "user-0002"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->SendFriendRequest(
        "user-0002" // targetUserId
    );
    
    // Start event handling
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Friend::Model::FSendFriendRequest> value) {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    Domain->Unsubscribe(CallbackId);

sendRequest

Send a friend request to another player

Sends a friend request to the specified player. The request will appear in their inbox, and they can accept or reject it. If accepted, both players become mutual friends and can see each other’s friend-level profile. Note: if the player already has 1000 friends, the request cannot be sent. Also, if there are existing pending requests, the oldest unanswered request is automatically withdrawn to make room for the new one. Use this for a “Send Friend Request” button on another player’s profile or in search results.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession
targetUserIdstring
~ 128 charsUser ID of the person want to be friend

Result

TypeDescription
itemEzFriendRequestSent Friend Request

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var result = await domain.SendRequestAsync(
        targetUserId: "user-0002"
    );
    var item = await result.ModelAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var future = domain.SendRequestFuture(
        targetUserId: "user-0002"
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    var future2 = future.Result.ModelFuture();
    yield return future2;
    if (future2.Error != null)
    {
        onError.Invoke(future2.Error, null);
        yield break;
    }
    var result = future2.Result;
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    const auto Future = Domain->SendRequest(
        "user-0002" // targetUserId
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }

    // obtain changed values / result values
    const auto Future2 = Future->GetTask().Result()->Model();
    Future2->StartSynchronousTask();
    if (Future2->GetTask().IsError())
    {
        return Future2->GetTask().Error();
    }
    const auto Result = Future2->GetTask().Result();

accept

Accept a friend request

Accepts an incoming friend request from the specified player. Once accepted, a mutual friendship is established — both players are added to each other’s friend lists and can see each other’s friend-level profile information. Use this for the “Accept” button on a friend request notification or in the friend request inbox.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession
fromUserIdstring
~ 128 charsUser ID

Result

TypeDescription
itemEzFriendRequestAccepted Friend Request

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).ReceiveFriendRequest(
        fromUserId: "user-0002"
    );
    var result = await domain.AcceptAsync(
    );
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).ReceiveFriendRequest(
        fromUserId: "user-0002"
    );
    var future = domain.AcceptFuture(
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->ReceiveFriendRequest(
        nullptr, // targetUserId
        "user-0002" // fromUserId
    );
    const auto Future = Domain->Accept(
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
    const auto Result = Future->GetTask().Result();

describeReceiveRequests

Get a list of incoming friend requests

Retrieves all friend requests that other players have sent to the current player and are waiting for a response. Each request shows who sent it and when. The player can then accept or reject each one. Use this to build a “Friend Requests” inbox screen — for example, showing “PlayerA wants to be your friend! [Accept] [Reject]”.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession

Result

TypeDescription
itemsList<EzFriendRequest>List of Friend request
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var items = await domain.ReceiveRequestsAsync(
    ).ToListAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var it = domain.ReceiveRequests(
    );
    List<EzFriendRequest> items = new List<EzFriendRequest>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    const auto It = Domain->ReceiveRequests(
    );
    TArray<Gs2::UE5::Friend::Model::FEzFriendRequestPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }

getReceiveRequest

Get a specific incoming friend request

Retrieves the details of a friend request from a specific sender. Use this to display a friend request detail screen — for example, showing the sender’s profile and when the request was sent, along with “Accept” and “Reject” buttons.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession
fromUserIdstring
~ 128 charsUser ID

Result

TypeDescription
itemEzFriendRequestFriend request

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).ReceiveFriendRequest(
        targetUserId: null,
        fromUserId: "user-0002"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).ReceiveFriendRequest(
        targetUserId: null,
        fromUserId: "user-0002"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->ReceiveFriendRequest(
        nullptr, // targetUserId
        "user-0002" // fromUserId
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
Value change event handling
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).ReceiveFriendRequest(
        targetUserId: null,
        fromUserId: "user-0002"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).ReceiveFriendRequest(
        targetUserId: null,
        fromUserId: "user-0002"
    );
    
    // Start event handling
    var callbackId = domain.Subscribe(
        value => {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    domain.Unsubscribe(callbackId);
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->ReceiveFriendRequest(
        nullptr, // targetUserId
        "user-0002" // fromUserId
    );
    
    // Start event handling
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Friend::Model::FReceiveFriendRequest> value) {
            // Called when the value changes
            // The "value" is passed the value after the change.
        }
    );

    // Stop event handling
    Domain->Unsubscribe(CallbackId);

reject

Reject a friend request

Rejects an incoming friend request from the specified player. The request is deleted and no friendship is established. The sender is not notified that the request was rejected. Use this for the “Reject” or “Decline” button on a friend request notification or in the friend request inbox.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession
fromUserIdstring
~ 128 charsUser ID

Result

TypeDescription
itemEzFriendRequestRejected friend request

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).ReceiveFriendRequest(
        fromUserId: "user-0002"
    );
    var result = await domain.RejectAsync(
    );
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).ReceiveFriendRequest(
        fromUserId: "user-0002"
    );
    var future = domain.RejectFuture(
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->ReceiveFriendRequest(
        nullptr, // targetUserId
        "user-0002" // fromUserId
    );
    const auto Future = Domain->Reject(
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
    const auto Result = Future->GetTask().Result();

getBlackList

Get the player’s block list

Retrieves a list of user IDs that the current player has blocked. Blocked players cannot send friend requests to or follow the current player. Use this to build a “Blocked Players” management screen where the player can review and unblock people they’ve previously blocked.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession

Result

TypeDescription
itemsList<string>Blacklisted user ID list
nextPageTokenstringPage token to retrieve the rest of the listing

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var items = await domain.BlackListUsersAsync(
    ).ToListAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var it = domain.BlackListUsers(
    );

    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    );
    const auto It = Domain->BlackListUsers(
    );

    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }

registerBlackList

Block a player

Adds the specified player to the current player’s block list. Once blocked, the target player will not be able to send friend requests to or follow the current player. Use this for a “Block” button on another player’s profile screen or in a report/moderation menu. This helps players protect themselves from unwanted interactions.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession
targetUserIdstring
~ 128 charsUser ID

Result

TypeDescription
itemEzBlackListblacklist

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).BlackList(
    );
    var result = await domain.RegisterBlackListAsync(
        targetUserId: "user-0002"
    );
    var item = await result.ModelAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).BlackList(
    );
    var future = domain.RegisterBlackListFuture(
        targetUserId: "user-0002"
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    var future2 = future.Result.ModelFuture();
    yield return future2;
    if (future2.Error != null)
    {
        onError.Invoke(future2.Error, null);
        yield break;
    }
    var result = future2.Result;
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->BlackList(
    );
    const auto Future = Domain->RegisterBlackList(
        "user-0002" // targetUserId
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }

    // obtain changed values / result values
    const auto Future2 = Future->GetTask().Result()->Model();
    Future2->StartSynchronousTask();
    if (Future2->GetTask().IsError())
    {
        return Future2->GetTask().Error();
    }
    const auto Result = Future2->GetTask().Result();

unregisterBlackList

Unblock a player

Removes the specified player from the current player’s block list. After unblocking, the target player will be able to send friend requests and follow the current player again. Use this for an “Unblock” button on the blocked players management screen or on a blocked player’s profile.

Request

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
gameSessionGameSession
GameSession
targetUserIdstring
~ 128 charsUser ID

Result

TypeDescription
itemEzBlackListBlacklist

Implementation Example

    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).BlackList(
    );
    var result = await domain.UnregisterBlackListAsync(
        targetUserId: "user-0002"
    );
    var item = await result.ModelAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).BlackList(
    );
    var future = domain.UnregisterBlackListFuture(
        targetUserId: "user-0002"
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    var future2 = future.Result.ModelFuture();
    yield return future2;
    if (future2.Error != null)
    {
        onError.Invoke(future2.Error, null);
        yield break;
    }
    var result = future2.Result;
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->BlackList(
    );
    const auto Future = Domain->UnregisterBlackList(
        "user-0002" // targetUserId
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }

    // obtain changed values / result values
    const auto Future2 = Future->GetTask().Result()->Model();
    Future2->StartSynchronousTask();
    if (Future2->GetTask().IsError())
    {
        return Future2->GetTask().Error();
    }
    const auto Result = Future2->GetTask().Result();

Event Handler

OnFollowNotification

Push notification to be used when you are followed

NameTypeDescription
namespaceNamestringNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstringUser ID
fromUserIdstringUser ID

Implementation Example

    gs2.Friend.OnFollowNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var userId = notification.UserId;
        var fromUserId = notification.FromUserId;
    };
    gs2.Friend.OnFollowNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var userId = notification.UserId;
        var fromUserId = notification.FromUserId;
    };
    Gs2->Friend->OnFollowNotification().AddLambda([](const auto Notification)
    {
        const auto NamespaceName = Notification->NamespaceNameValue;
        const auto UserId = Notification->UserIdValue;
        const auto FromUserId = Notification->FromUserIdValue;
    });

OnAcceptRequestNotification

Push notification used when a friend request is approved

NameTypeDescription
namespaceNamestringNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstringUser ID
targetUserIdstringUser ID

Implementation Example

    gs2.Friend.OnAcceptRequestNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var userId = notification.UserId;
        var targetUserId = notification.TargetUserId;
    };
    gs2.Friend.OnAcceptRequestNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var userId = notification.UserId;
        var targetUserId = notification.TargetUserId;
    };
    Gs2->Friend->OnAcceptRequestNotification().AddLambda([](const auto Notification)
    {
        const auto NamespaceName = Notification->NamespaceNameValue;
        const auto UserId = Notification->UserIdValue;
        const auto TargetUserId = Notification->TargetUserIdValue;
    });

OnRejectRequestNotification

Push notification used when a friend request is rejected

NameTypeDescription
namespaceNamestringNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstringUser ID
targetUserIdstringUser ID

Implementation Example

    gs2.Friend.OnRejectRequestNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var userId = notification.UserId;
        var targetUserId = notification.TargetUserId;
    };
    gs2.Friend.OnRejectRequestNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var userId = notification.UserId;
        var targetUserId = notification.TargetUserId;
    };
    Gs2->Friend->OnRejectRequestNotification().AddLambda([](const auto Notification)
    {
        const auto NamespaceName = Notification->NamespaceNameValue;
        const auto UserId = Notification->UserIdValue;
        const auto TargetUserId = Notification->TargetUserIdValue;
    });

OnDeleteFriendNotification

Push notification used when a friend is deleted

NameTypeDescription
namespaceNamestringNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstringUser ID
fromUserIdstringUser ID

Implementation Example

    gs2.Friend.OnDeleteFriendNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var userId = notification.UserId;
        var fromUserId = notification.FromUserId;
    };
    gs2.Friend.OnDeleteFriendNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var userId = notification.UserId;
        var fromUserId = notification.FromUserId;
    };
    Gs2->Friend->OnDeleteFriendNotification().AddLambda([](const auto Notification)
    {
        const auto NamespaceName = Notification->NamespaceNameValue;
        const auto UserId = Notification->UserIdValue;
        const auto FromUserId = Notification->FromUserIdValue;
    });

OnReceiveRequestNotification

Push notification used when a friend request is received

NameTypeDescription
namespaceNamestringNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstringUser ID
fromUserIdstringUser ID

Implementation Example

    gs2.Friend.OnReceiveRequestNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var userId = notification.UserId;
        var fromUserId = notification.FromUserId;
    };
    gs2.Friend.OnReceiveRequestNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var userId = notification.UserId;
        var fromUserId = notification.FromUserId;
    };
    Gs2->Friend->OnReceiveRequestNotification().AddLambda([](const auto Notification)
    {
        const auto NamespaceName = Notification->NamespaceNameValue;
        const auto UserId = Notification->UserIdValue;
        const auto FromUserId = Notification->FromUserIdValue;
    });

OnCancelRequestNotification

Push notification used when a friend request is canceled

NameTypeDescription
namespaceNamestringNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstringUser ID
fromUserIdstringUser ID

Implementation Example

    gs2.Friend.OnCancelRequestNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var userId = notification.UserId;
        var fromUserId = notification.FromUserId;
    };
    gs2.Friend.OnCancelRequestNotification += notification =>
    {
        var namespaceName = notification.NamespaceName;
        var userId = notification.UserId;
        var fromUserId = notification.FromUserId;
    };
    Gs2->Friend->OnCancelRequestNotification().AddLambda([](const auto Notification)
    {
        const auto NamespaceName = Notification->NamespaceNameValue;
        const auto UserId = Notification->UserIdValue;
        const auto FromUserId = Notification->FromUserIdValue;
    });