API Reference of 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

TypeRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
publicProfilestring~ 1024 charsPublic profile
followerProfilestring~ 1024 charsProfile for followers
friendProfilestring~ 1024 charsProfile for friends

EzBlackList

TypeRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
targetUserIdsList<string>Blacklist user ID list

EzFollowUser

TypeRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
publicProfilestring~ 1024 charsPublic profile
followerProfilestring~ 1024 charsProfile for followers

EzFriendUser

TypeRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
publicProfilestring~ 1024 charsPublic profile
friendProfilestring~ 1024 charsProfile for friends

EzFriendRequest

TypeRequireDefaultLimitationDescription
userIdstring~ 128 charsSender
targetUserIdstring~ 128 charsTarget

EzPublicProfile

TypeRequireDefaultLimitationDescription
userIdstring~ 128 charsUser Id
publicProfilestring~ 1024 charsPublic profile

Methods

getProfile

Get own profile

Request

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 32 charsNamespace name
accessTokenstring~ 128 charsUser Id

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.Model();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        AccessToken
    )->Profile(
    );
    const auto item = Domain.Model();

getPublicProfile

Get someone else’s public profile

Request

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 32 charsNamespace name
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.Model();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->User(
        "user-0001" // userId
    )->PublicProfile(
    );
    const auto item = Domain.Model();

updateProfile

Update own profile

Request

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 32 charsNamespace name
accessTokenstring~ 128 charsUser Id
publicProfilestring~ 1024 charsPublic profile
followerProfilestring~ 1024 charsProfile for followers
friendProfilestring~ 1024 charsProfile for friends

Result

TypeDescription
itemEzProfileUpdated Profile

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.UpdateProfile(
        publicProfile: "public",
        followerProfile: "follower",
        friendProfile: "friend"
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    var future2 = future.Result.Model();
    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(
        AccessToken
    )->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 (!TestFalse(WHAT, Future2->GetTask().IsError())) return false;
    const auto Result = Future2->GetTask().Result();

describeFollowUsers

Get list of followed players

Request

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 32 charsNamespace name
accessTokenstring~ 128 charsUser Id
withProfileboolfalseGet a profile together
limitint301 ~ 1000Number of data acquired
pageTokenstring~ 1024 charsToken specifying the position from which to start acquiring data

Result

TypeDescription
itemsList<EzFollowUser>List of Following user
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.FollowsAsync(
    ).ToListAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    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(
        AccessToken
    );
    const auto It = Domain->Follows( // withProfile
    );
    for (auto Item : *It)
    {

    }

follow

Follow other player

Request

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 32 charsNamespace name
accessTokenstring~ 128 charsUser Id
targetUserIdstring~ 128 charsUser ID of the person want to follow

Result

TypeDescription
itemEzFollowUserFollowed user

Implementation Example

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

    // obtain changed values / result values
    const auto Future2 = Future->GetTask().Result()->Model();
    Future2->StartSynchronousTask();
    if (!TestFalse(WHAT, Future2->GetTask().IsError())) return false;
    const auto Result = Future2->GetTask().Result();

unfollow

Unfollow other player

Request

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 32 charsNamespace name
accessTokenstring~ 128 charsUser Id
targetUserIdstring~ 128 charsUser Id

Result

TypeDescription
itemEzFollowUserUnfollowed user

Implementation Example

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

deleteFriend

Remove Friend

Request

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 32 charsNamespace name
accessTokenstring~ 128 charsUser Id
targetUserIdstring~ 128 charsUser Id

Result

TypeDescription
itemEzFriendUserDeleted Friend

Implementation Example

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

describeFriends

Get list of friends

Request

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 32 charsNamespace name
accessTokenstring~ 128 charsUser Id
withProfileboolfalseGet a profile together
limitint301 ~ 1000Number of data acquired
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(
    ).ToListAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var it = domain.Friends(
    );
    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(
        AccessToken
    );
    const auto It = Domain->Friends( // withProfile
    );
    for (auto Item : *It)
    {

    }

getFriend

Get a Friend

Request

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 32 charsNamespace name
accessTokenstring~ 128 charsUser Id
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: null
    ).FriendUser(
        targetUserId: "user-0002"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Friend(
        withProfile: null
    ).FriendUser(
        targetUserId: "user-0002"
    );
    var future = domain.Model();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        AccessToken
    )->Friend(
        nullptr // withProfile
    )->FriendUser(
        "user-0002" // targetUserId
    );
    const auto item = Domain.Model();

deleteRequest

Delete friend request

Request

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 32 charsNamespace name
accessTokenstring~ 128 charsUser Id
targetUserIdstring~ 128 charsUser Id

Result

TypeDescription
itemEzFriendRequestDeleted Friend Requests

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.DeleteRequest(
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    const auto Domain = Gs2->Friend->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        AccessToken
    )->SendFriendRequest(
        "user-0002" // targetUserId
    );
    const auto Future = Domain->DeleteRequest(
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }

describeSendRequests

Get list of friend requests you have sent

Request

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 32 charsNamespace name
accessTokenstring~ 128 charsUser Id

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(
        AccessToken
    );
    const auto It = Domain->SendRequests(
    );
    for (auto Item : *It)
    {

    }

sendRequest

Get a friend requests you have sent

Request

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 32 charsNamespace name
accessTokenstring~ 128 charsUser Id
targetUserIdstring~ 128 charsUser ID of the person want to be friend

Result

TypeDescription
itemEzFriendRequestFriend request sent

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.SendRequest(
        targetUserId: "user-0002"
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    var future2 = future.Result.Model();
    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(
        AccessToken
    );
    const auto Future = Domain->SendRequest(
        "user-0002"
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }

    // obtain changed values / result values
    const auto Future2 = Future->GetTask().Result()->Model();
    Future2->StartSynchronousTask();
    if (!TestFalse(WHAT, Future2->GetTask().IsError())) return false;
    const auto Result = Future2->GetTask().Result();

accept

Approve Friend Request

Request

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 32 charsNamespace name
accessTokenstring~ 128 charsUser Id
fromUserIdstring~ 128 charsUser Id

Result

TypeDescription
itemEzFriendRequestAccepted Friend Request

Implementation Example

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

describeReceiveRequests

Get list of received friend requests

Request

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 32 charsNamespace name
accessTokenstring~ 128 charsUser Id

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(
        AccessToken
    );
    const auto It = Domain->ReceiveRequests(
    );
    for (auto Item : *It)
    {

    }

reject

Deny friend request

Request

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 32 charsNamespace name
accessTokenstring~ 128 charsUser Id
fromUserIdstring~ 128 charsUser Id

Result

TypeDescription
itemEzFriendRequestRejected friend request

Implementation Example

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

getBlackList

Get Blacklist

Request

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 32 charsNamespace name
accessTokenstring~ 128 charsUser Id

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.BlackListsAsync(
    ).ToListAsync();
    var domain = gs2.Friend.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    );
    var it = domain.BlackLists(
    );

    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(
        AccessToken
    );
    const auto It = Domain->BlackLists(
    );
    for (auto Item : *It)
    {

    }

registerBlackList

Add user to blacklist

Request

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 32 charsNamespace name
accessTokenstring~ 128 charsUser Id
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.RegisterBlackList(
        targetUserId: "user-0002"
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    var future2 = future.Result.Model();
    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(
        AccessToken
    )->BlackList(
    );
    const auto Future = Domain->RegisterBlackList(
        "user-0002"
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }

    // obtain changed values / result values
    const auto Future2 = Future->GetTask().Result()->Model();
    Future2->StartSynchronousTask();
    if (!TestFalse(WHAT, Future2->GetTask().IsError())) return false;
    const auto Result = Future2->GetTask().Result();

unregisterBlackList

Remove user from blacklist

Request

TypeRequireDefaultLimitationDescription
namespaceNamestring~ 32 charsNamespace name
accessTokenstring~ 128 charsUser Id
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.UnregisterBlackList(
        targetUserId: "user-0002"
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    var future2 = future.Result.Model();
    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(
        AccessToken
    )->BlackList(
    );
    const auto Future = Domain->UnregisterBlackList(
        "user-0002"
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }

    // obtain changed values / result values
    const auto Future2 = Future->GetTask().Result()->Model();
    Future2->StartSynchronousTask();
    if (!TestFalse(WHAT, Future2->GetTask().IsError())) return false;
    const auto Result = Future2->GetTask().Result();

Event Handler

OnFollowNotification

Notification to be used when you are followed

NameTypeDescription
namespaceNamestringNamespace name
fromUserIdstringUser Id

Implementation Example

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

OnAcceptRequestNotification

Notification used when a friend request is approved

NameTypeDescription
namespaceNamestringNamespace name
targetUserIdstringUser Id

Implementation Example

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

OnReceiveRequestNotification

Notification used when a friend request is received

NameTypeDescription
namespaceNamestringNamespace name
fromUserIdstringUser Id

Implementation Example

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