API Reference of GS2-Guild SDK for Game Engine
Model
EzGuildModel
Guild Model Master
A guild model is an entity that sets the maximum number of people who can join the guild and the permission settings for each position within the guild.
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
name | string | ✓ | ~ 128 chars | Guild Model Name | |
metadata | string | ~ 2048 chars | metadata | ||
defaultMaximumMemberCount | int | ✓ | 1 ~ 2147483646 | Maximum number of guild members that will be applied when creating a guild | |
maximumMemberCount | int | ✓ | 1 ~ 2147483646 | Maximum number of guild members that can be applied | |
roles | List<EzRoleModel> | ✓ | 1 ~ 10 items | List of permission settings for each position in the guild | |
rejoinCoolTimeMinutes | int | ✓ | 0 | ~ 2147483646 | Cool time until you can join again after leaving the guild (minutes) |
EzGuild
Guild
Created when GetGuildGuild is called for the first time, and the guild time count starts from that time. The guild time count is reset when you receive a reward.
If GS2-Schedule events are associated, you cannot access Guild before the event is held, and you cannot create a guild. If an event is associated, the guild holds the number of repetitions of the event. If the current event ID and the event ID at the time of guild creation do not match, if the number of repetitions of the current event and the number of repetitions held by the guild do not match, or if the guild is created before the start time of the event, the waiting time is reset.
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
name | string | ✓ | UUID | ~ 36 chars | Guild Name |
displayName | string | ✓ | ~ 64 chars | Display Name | |
attribute1 | int | ~ 2147483645 | Attribute 1 | ||
attribute2 | int | ~ 2147483645 | Attribute 2 | ||
attribute3 | int | ~ 2147483645 | Attribute 3 | ||
attribute4 | int | ~ 2147483645 | Attribute 4 | ||
attribute5 | int | ~ 2147483645 | Attribute 5 | ||
joinPolicy | enum { “anybody”, “approval” } | ✓ | ~ 128 chars | Join Policy | |
customRoles | List<EzRoleModel> | ~ 10 items | Permission settings list for each position defined by the guild | ||
members | List<EzMember> | ~ 10 items | Guild member list |
Enumeration type definition to specify as joinPolicy
Enumerator String Definition | Description |
---|---|
anybody | Anybody can join |
approval | Approval required |
EzReceiveMemberRequest
Guild request received
This entity indicates that a guild request has been accepted. This is a guild request received by the user from another user. When the user approves the guild request, the guild request is deleted and the user is added to the guild list.
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
userId | string | ✓ | ~ 128 chars | Sent | |
targetGuildName | string | ✓ | ~ 128 chars | Target |
EzSendMemberRequest
Guild request sent
This entity indicates the status of a pending guild request. This is a guild request sent by the user to another user. When the user who sent the guild request approves it, the guild request is deleted and the user is added to the guild list.
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
userId | string | ✓ | ~ 128 chars | Sent | |
targetGuildName | string | ✓ | ~ 128 chars | Guild name |
EzJoinedGuild
Guilds that the user is participating in
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
guildName | string | ✓ | ~ 128 chars | Guild Name | |
userId | string | ✓ | ~ 128 chars | User Id | |
createdAt | long | ✓ | Now | Datetime of creation (Unix time unit:milliseconds) |
EzIgnoreUser
Refuse to participate user
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
userId | string | ✓ | ~ 128 chars | User Id |
EzLastGuildMasterActivity
Last time the guild master performed an activity
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
userId | string | ✓ | ~ 128 chars | User Id | |
updatedAt | long | ✓ | Now | Datetime of last update (Unix time unit:milliseconds) |
EzMember
Guild
An entity that manages a list of guild members
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
userId | string | ✓ | ~ 128 chars | User Id | |
roleName | string | ✓ | ~ 128 chars | Role Model Name | |
joinedAt | long | ✓ | Now | Join date (Unix time unit:milliseconds) |
EzRoleModel
Role Model
The role model defines the role within the guild and sets the permissions for each role.
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
name | string | ✓ | ~ 128 chars | Role Model Name | |
metadata | string | ~ 2048 chars | metadata | ||
policyDocument | string | ✓ | ~ 10240 chars | Policy document for permissions to apply to roles |
EzVerifyActionResult
Verify action execution result
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
action | enum { } | ✓ | ~ 128 chars | Types of actions to be performed in the verify task | |
verifyRequest | string | ✓ | ~ 1048576 chars | JSON of request | |
statusCode | int | ~ 999 | Status code | ||
verifyResult | string | ~ 1048576 chars | Result payload |
Enumeration type definition to specify as action
Enumerator String Definition | Description |
---|
EzConsumeActionResult
Consume action execution result
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
action | enum { } | ✓ | ~ 128 chars | Types of actions to be performed in the consume action | |
consumeRequest | string | ✓ | ~ 1048576 chars | JSON of request | |
statusCode | int | ~ 999 | Status code | ||
consumeResult | string | ~ 1048576 chars | Result payload |
Enumeration type definition to specify as action
Enumerator String Definition | Description |
---|
EzAcquireActionResult
Acquire action execution result
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
action | enum { } | ✓ | ~ 128 chars | Types of actions to be performed in the acquire action | |
acquireRequest | string | ✓ | ~ 1048576 chars | JSON of request | |
statusCode | int | ~ 999 | Status code | ||
acquireResult | string | ~ 1048576 chars | Result payload |
Enumeration type definition to specify as action
Enumerator String Definition | Description |
---|
EzTransactionResult
Transaction execution results
Transaction execution results executed using server-side transaction auto-execution functionality
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
transactionId | string | ✓ | 36 ~ 36 chars | Transaction ID | |
verifyResults | List<EzVerifyActionResult> | ~ 10 items | List of verify action execution results | ||
consumeResults | List<EzConsumeActionResult> | ~ 10 items | List of consume action execution results | ||
acquireResults | List<EzAcquireActionResult> | ~ 100 items | List of acquire action execution results |
Methods
getGuildModel
Obtain guild model information
Get rank cap information and rank-up threshold information by specifying guild type name
.
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name |
Result
Type | Description | |
---|---|---|
item | EzGuildModel | Guild Model |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).GuildModel(
guildModelName: "guild-0001"
);
var item = await domain.ModelAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).GuildModel(
guildModelName: "guild-0001"
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->GuildModel(
"guild-0001" // guildModelName
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Value change event handling
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).GuildModel(
guildModelName: "guild-0001"
);
// 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.Guild.Namespace(
namespaceName: "namespace-0001"
).GuildModel(
guildModelName: "guild-0001"
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->GuildModel(
"guild-0001" // guildModelName
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Guild::Model::FGuildModel> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
listGuildModels
Get list of guild model information
Obtain information on rank caps and rank advancement thresholds. Use this model data if you want to display in-game information such as the amount of guild required to gain before the next rank-up.
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name |
Result
Type | Description | |
---|---|---|
items | List<EzGuildModel> | List of Guild Model |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
);
var items = await domain.GuildModelsAsync(
).ToListAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
);
var it = domain.GuildModels(
);
List<EzGuildModel> items = new List<EzGuildModel>();
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->Guild->Namespace(
"namespace-0001" // namespaceName
);
const auto It = Domain->GuildModels(
);
TArray<Gs2::UE5::Guild::Model::FEzGuildModelPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}
Value change event handling
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
);
// Start event handling
var callbackId = domain.SubscribeGuildModels(
() => {
// Called when an element of the list changes.
}
);
// Stop event handling
domain.UnsubscribeGuildModels(callbackId);
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
);
var it = domain.GuildModels(
);
List<EzGuildModel> items = new List<EzGuildModel>();
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->Guild->Namespace(
"namespace-0001" // namespaceName
);
// Start event handling
const auto CallbackId = Domain->SubscribeGuildModels(
[]() {
// Called when an element of the list changes.
}
);
// Stop event handling
Domain->UnsubscribeGuildModels(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
assume
Get an access token to act as a guild user
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
accessToken | string | ✓ | ~ 128 chars | User Id | |
guildName | string | ✓ | UUID | ~ 36 chars | Guild Name |
Result
Type | Description | |
---|---|---|
token | string | access token |
userId | string | User Id |
expire | long | effective date (Unix time unit:milliseconds) |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var result = await domain.AssumeAsync(
guildModelName: "guild-model-0001",
guildName: "guild-0001"
);
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var future = domain.AssumeFuture(
guildModelName: "guild-model-0001",
guildName: "guild-0001"
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto Future = Domain->Assume(
"guild-model-0001", // guildModelName
"guild-0001" // guildName
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
const auto Result = Future->GetTask().Result();
batchUpdateGuildMemberRole
Update guild member role in bulk
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
accessToken | string | ✓ | ~ 128 chars | Guild name | |
members | List<EzMember> | ✓ | 1 ~ 100 items | List of members to update |
Result
Type | Description | |
---|---|---|
item | EzGuild | Updated guild |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
);
var result = await domain.BatchUpdateGuildMemberRoleAsync(
guildModelName: "guild-model-0001",
accessToken: ,
members: new List<Gs2.Unity.Gs2Guild.Model.EzMember> {
new Gs2.Unity.Gs2Guild.Model.EzMember() {
UserId = "user-0002",
RoleName = "role-0001",
},
new Gs2.Unity.Gs2Guild.Model.EzMember() {
UserId = "user-0003",
RoleName = "role-0002",
},
}
);
var item = await result.ModelAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
);
var future = domain.BatchUpdateGuildMemberRoleFuture(
guildModelName: "guild-model-0001",
accessToken: ,
members: new List<Gs2.Unity.Gs2Guild.Model.EzMember> {
new Gs2.Unity.Gs2Guild.Model.EzMember() {
UserId = "user-0002",
RoleName = "role-0001",
},
new Gs2.Unity.Gs2Guild.Model.EzMember() {
UserId = "user-0003",
RoleName = "role-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->Guild->Namespace(
"namespace-0001" // namespaceName
);
const auto Future = Domain->BatchUpdateGuildMemberRole(
"guild-model-0001", // guildModelName
, // accessToken
[]
{
auto v = MakeShared<TArray<TSharedPtr<Gs2::UE5::Guild::Model::FEzMember>>>();
v->Add(
MakeShared<Gs2::UE5::Guild::Model::FEzMember>()
->WithUserId(TOptional<FString>("user-0002"))
->WithRoleName(TOptional<FString>("role-0001"))
);
v->Add(
MakeShared<Gs2::UE5::Guild::Model::FEzMember>()
->WithUserId(TOptional<FString>("user-0003"))
->WithRoleName(TOptional<FString>("role-0002"))
);
return v;
}() // members
);
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();
createGuild
Create guild
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
accessToken | string | ✓ | ~ 128 chars | User Id | |
displayName | string | ✓ | ~ 64 chars | Display Name | |
attribute1 | int | ~ 2147483645 | Attribute 1 | ||
attribute2 | int | ~ 2147483645 | Attribute 2 | ||
attribute3 | int | ~ 2147483645 | Attribute 3 | ||
attribute4 | int | ~ 2147483645 | Attribute 4 | ||
attribute5 | int | ~ 2147483645 | Attribute 5 | ||
joinPolicy | enum { “anybody”, “approval” } | ✓ | ~ 128 chars | Join Policy | |
customRoles | List<EzRoleModel> | ~ 10 items | Permission settings list for each position defined by the guild | ||
guildMemberDefaultRole | string | ~ 128 chars | Custom role that guild members have in their initial state |
Enumeration type definition to specify as joinPolicy
Enumerator String Definition | Description |
---|---|
anybody | Anybody can join |
approval | Approval required |
Result
Type | Description | |
---|---|---|
item | EzGuild | Created guild |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var result = await domain.CreateGuildAsync(
guildModelName: "guild-model-0001",
displayName: "My Guild",
joinPolicy: "anybody",
attribute1: 1,
attribute2: null,
attribute3: null,
attribute4: null,
attribute5: null,
customRoles: null,
guildMemberDefaultRole: null
);
var item = await result.ModelAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var future = domain.CreateGuildFuture(
guildModelName: "guild-model-0001",
displayName: "My Guild",
joinPolicy: "anybody",
attribute1: 1,
attribute2: null,
attribute3: null,
attribute4: null,
attribute5: null,
customRoles: null,
guildMemberDefaultRole: null
);
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->Guild->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto Future = Domain->CreateGuild(
"guild-model-0001", // guildModelName
"My Guild", // displayName
"anybody", // joinPolicy
1 // attribute1
// attribute2
// attribute3
// attribute4
// attribute5
// customRoles
// guildMemberDefaultRole
);
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();
deleteGuild
Delete guild
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
accessToken | string | ✓ | ~ 128 chars | Guild name |
Result
Type | Description | |
---|---|---|
item | EzGuild | Deleted guild |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
);
var result = await domain.DeleteGuildAsync(
accessToken:
);
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
);
var future = domain.DeleteGuildFuture(
accessToken:
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-model-0001", // guildModelName
"guild-0001", // guildName
"user-0001" // userId
);
const auto Future = Domain->DeleteGuild(
// accessToken
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
const auto Result = Future->GetTask().Result();
deleteMemberFromGuild
Delete member from guild
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
accessToken | string | ✓ | ~ 128 chars | Guild name | |
targetUserId | string | ✓ | ~ 128 chars | User ID to be expelled |
Result
Type | Description | |
---|---|---|
item | EzGuild | Updated guild |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
);
var result = await domain.DeleteMemberFromGuildAsync(
accessToken: ,
targetUserId: "user-0002"
);
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
);
var future = domain.DeleteMemberFromGuildFuture(
accessToken: ,
targetUserId: "user-0002"
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-model-0001", // guildModelName
"guild-0001", // guildName
"user-0001" // userId
);
const auto Future = Domain->DeleteMemberFromGuild(
, // accessToken
"user-0002" // targetUserId
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
const auto Result = Future->GetTask().Result();
getGuild
Get guild
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
accessToken | string | ✓ | ~ 128 chars | User Id | |
guildName | string | ✓ | UUID | ~ 36 chars | Guild Name |
Result
Type | Description | |
---|---|---|
item | EzGuild | Guild |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
);
var item = await domain.ModelAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-model-0001", // guildModelName
"guild-0001", // guildName
"user-0001" // userId
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Value change event handling
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
);
// 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.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-model-0001", // guildModelName
"guild-0001", // guildName
"user-0001" // userId
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Guild::Model::FGuild> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
listGuilds
Search for guilds
The search results will only include guilds that have been updated in the past 24 hours. If you want to include a guild in the search results, even if there are no changes, use the Update function to update the guild.
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
accessToken | string | ✓ | ~ 128 chars | User Id | |
displayName | string | ~ 64 chars | Display name to search for guild | ||
attributes1 | List<int> | ~ 10 items | List of guild operation policies to search for guild | ||
attributes2 | List<int> | ~ 10 items | List of guild operation policies to search for guild | ||
attributes3 | List<int> | ~ 10 items | List of guild operation policies to search for guild | ||
attributes4 | List<int> | ~ 10 items | List of guild operation policies to search for guild | ||
attributes5 | List<int> | ~ 10 items | List of guild operation policies to search for guild | ||
joinPolicies | List<string> | ~ 10 items | List of guild join policies to search for guild | ||
includeFullMembersGuild | bool | false | Whether to include guilds with full guild members in the search results | ||
orderBy | enum { “number_of_players”, “attribute1_asc”, “attribute1_desc”, “attribute2_asc”, “attribute2_desc”, “attribute3_asc”, “attribute3_desc”, “attribute4_asc”, “attribute4_desc”, “attribute5_asc”, “attribute5_desc”, “last_updated” } | ✓ | “number_of_players” | ~ 128 chars | Sort order |
pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | ||
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Enumeration type definition to specify as orderBy
Enumerator String Definition | Description |
---|---|
number_of_players | Number of players joined |
attribute1_asc | Attribute1 ascending |
attribute1_desc | Attribute1 descending |
attribute2_asc | Attribute2 ascending |
attribute2_desc | Attribute2 descending |
attribute3_asc | Attribute3 ascending |
attribute3_desc | Attribute3 descending |
attribute4_asc | Attribute4 ascending |
attribute4_desc | Attribute4 descending |
attribute5_asc | Attribute5 ascending |
attribute5_desc | Attribute5 descending |
last_updated | Last updated |
Result
Type | Description | |
---|---|---|
items | List<EzGuild> | List of Guild |
nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var items = await domain.SearchGuildsAsync(
guildModelName: "guild-model-0001"
).ToListAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.SearchGuilds(
guildModelName: "guild-model-0001"
);
List<EzGuild> items = new List<EzGuild>();
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->Guild->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto It = Domain->SearchGuilds(
"guild-model-0001" // guildModelName
);
TArray<Gs2::UE5::Guild::Model::FEzGuildPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}
updateGuild
Update guild
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
accessToken | string | ✓ | ~ 128 chars | Guild name | |
displayName | string | ✓ | ~ 64 chars | Display Name | |
attribute1 | int | ~ 2147483645 | Attribute 1 | ||
attribute2 | int | ~ 2147483645 | Attribute 2 | ||
attribute3 | int | ~ 2147483645 | Attribute 3 | ||
attribute4 | int | ~ 2147483645 | Attribute 4 | ||
attribute5 | int | ~ 2147483645 | Attribute 5 | ||
joinPolicy | enum { “anybody”, “approval” } | ✓ | ~ 128 chars | Join Policy | |
customRoles | List<EzRoleModel> | ~ 10 items | Permission settings list for each position defined by the guild | ||
guildMemberDefaultRole | string | ~ 128 chars | Custom role that guild members have in their initial state |
Enumeration type definition to specify as joinPolicy
Enumerator String Definition | Description |
---|---|
anybody | Anybody can join |
approval | Approval required |
Result
Type | Description | |
---|---|---|
item | EzGuild | Updated guild |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
);
var result = await domain.UpdateGuildAsync(
accessToken: ,
displayName: "My Guild",
joinPolicy: "anybody",
attribute1: 1,
attribute2: null,
attribute3: null,
attribute4: null,
attribute5: null,
customRoles: null,
guildMemberDefaultRole: null
);
var item = await result.ModelAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
);
var future = domain.UpdateGuildFuture(
accessToken: ,
displayName: "My Guild",
joinPolicy: "anybody",
attribute1: 1,
attribute2: null,
attribute3: null,
attribute4: null,
attribute5: null,
customRoles: null,
guildMemberDefaultRole: null
);
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->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-model-0001", // guildModelName
"guild-0001", // guildName
"user-0001" // userId
);
const auto Future = Domain->UpdateGuild(
, // accessToken
"My Guild", // displayName
"anybody", // joinPolicy
1 // attribute1
// attribute2
// attribute3
// attribute4
// attribute5
// customRoles
// guildMemberDefaultRole
);
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();
updateGuildMemberRole
Update guild member role
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
accessToken | string | ✓ | ~ 128 chars | Guild name | |
targetUserId | string | ✓ | ~ 128 chars | User ID to be updated | |
roleName | string | ✓ | ~ 128 chars | Role Model Name |
Result
Type | Description | |
---|---|---|
item | EzGuild | Updated guild |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
);
var result = await domain.UpdateGuildMemberRoleAsync(
accessToken: ,
targetUserId: "user-0002",
roleName: "role-0001"
);
var item = await result.ModelAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
);
var future = domain.UpdateGuildMemberRoleFuture(
accessToken: ,
targetUserId: "user-0002",
roleName: "role-0001"
);
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->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-model-0001", // guildModelName
"guild-0001", // guildName
"user-0001" // userId
);
const auto Future = Domain->UpdateGuildMemberRole(
, // accessToken
"user-0002", // targetUserId
"role-0001" // roleName
);
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();
acceptRequest
Approve the received request
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
accessToken | string | ✓ | ~ 128 chars | Guild name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
fromUserId | string | ✓ | ~ 128 chars | User Id |
Result
Type | Description | |
---|---|---|
item | EzReceiveMemberRequest | Accepted Member Request |
guild | EzGuild | Guild |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-0001",
guildName: "$guild1.name",
userId: "user-0001"
).ReceiveMemberRequest(
fromUserId: null
);
var result = await domain.AcceptRequestAsync(
accessToken:
);
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-0001",
guildName: "$guild1.name",
userId: "user-0001"
).ReceiveMemberRequest(
fromUserId: null
);
var future = domain.AcceptRequestFuture(
accessToken:
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-0001", // guildModelName
"$guild1.name", // guildName
"user-0001" // userId
)->ReceiveMemberRequest(
nullptr // fromUserId
);
const auto Future = Domain->AcceptRequest(
// accessToken
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
const auto Result = Future->GetTask().Result();
getReceiveRequest
Get the request that was received
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
accessToken | string | ✓ | ~ 128 chars | Guild name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
fromUserId | string | ✓ | ~ 128 chars | User Id |
Result
Type | Description | |
---|---|---|
item | EzReceiveMemberRequest | Friend request |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-0001",
guildName: "$guild1.name",
userId: "user-0001"
).ReceiveMemberRequest(
fromUserId: null
);
var item = await domain.ModelAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-0001",
guildName: "$guild1.name",
userId: "user-0001"
).ReceiveMemberRequest(
fromUserId: null
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-0001", // guildModelName
"$guild1.name", // guildName
"user-0001" // userId
)->ReceiveMemberRequest(
nullptr // fromUserId
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Value change event handling
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-0001",
guildName: "$guild1.name",
userId: "user-0001"
).ReceiveMemberRequest(
fromUserId: null
);
// 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.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-0001",
guildName: "$guild1.name",
userId: "user-0001"
).ReceiveMemberRequest(
fromUserId: null
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-0001", // guildModelName
"$guild1.name", // guildName
"user-0001" // userId
)->ReceiveMemberRequest(
nullptr // fromUserId
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Guild::Model::FReceiveMemberRequest> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
listReceiveRequests
Get a list of received requests
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
accessToken | string | ✓ | ~ 128 chars | Guild name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | ||
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
Type | Description | |
---|---|---|
items | List<EzReceiveMemberRequest> | List of Friend request |
nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-0001",
guildName: "$guild1.name",
userId: "user-0001"
);
var items = await domain.ReceiveRequestsAsync(
).ToListAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-0001",
guildName: "$guild1.name",
userId: "user-0001"
);
var it = domain.ReceiveRequests(
);
List<EzReceiveMemberRequest> items = new List<EzReceiveMemberRequest>();
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->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-0001", // guildModelName
"$guild1.name", // guildName
"user-0001" // userId
);
const auto It = Domain->ReceiveRequests(
);
TArray<Gs2::UE5::Guild::Model::FEzReceiveMemberRequestPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}
rejectRequest
Reject the received request
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
accessToken | string | ✓ | ~ 128 chars | Guild name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
fromUserId | string | ✓ | ~ 128 chars | User Id |
Result
Type | Description | |
---|---|---|
item | EzReceiveMemberRequest | Rejected guild request |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: null,
guildName: "guild-0001",
userId: null
).ReceiveMemberRequest(
fromUserId: "user-0002"
);
var result = await domain.RejectRequestAsync(
accessToken:
);
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: null,
guildName: "guild-0001",
userId: null
).ReceiveMemberRequest(
fromUserId: "user-0002"
);
var future = domain.RejectRequestFuture(
accessToken:
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
nullptr, // guildModelName
"guild-0001", // guildName
nullptr // userId
)->ReceiveMemberRequest(
"user-0002" // fromUserId
);
const auto Future = Domain->RejectRequest(
// accessToken
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
const auto Result = Future->GetTask().Result();
cancelRequest
Cancel the request that was sent
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
accessToken | string | ✓ | ~ 128 chars | User Id | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
targetGuildName | string | ✓ | ~ 128 chars | Guild name |
Result
Type | Description | |
---|---|---|
item | EzSendMemberRequest | Deleted Member Requests |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var result = await domain.CancelRequestAsync(
guildModelName: "guild-0002",
targetGuildName: "guild-0002"
);
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var future = domain.CancelRequestFuture(
guildModelName: "guild-0002",
targetGuildName: "guild-0002"
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto Future = Domain->CancelRequest(
"guild-0002", // guildModelName
"guild-0002" // targetGuildName
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
const auto Result = Future->GetTask().Result();
getSendRequest
Get the request that was sent
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
accessToken | string | ✓ | ~ 128 chars | User Id | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
targetGuildName | string | ✓ | ~ 128 chars | Guild name |
Result
Type | Description | |
---|---|---|
item | EzSendMemberRequest | Member Request |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).SendMemberRequest(
guildModelName: "guild-0002",
guildName: null
);
var item = await domain.ModelAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).SendMemberRequest(
guildModelName: "guild-0002",
guildName: null
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->SendMemberRequest(
"guild-0002", // guildModelName
nullptr // guildName
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Value change event handling
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).SendMemberRequest(
guildModelName: "guild-0002",
guildName: null
);
// 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.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).SendMemberRequest(
guildModelName: "guild-0002",
guildName: null
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->SendMemberRequest(
"guild-0002", // guildModelName
nullptr // guildName
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Guild::Model::FSendMemberRequest> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
listSendRequests
Get a list of sent requests
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
accessToken | string | ✓ | ~ 128 chars | User Id | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | ||
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
Type | Description | |
---|---|---|
items | List<EzSendMemberRequest> | List of Member Request |
nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var items = await domain.SendRequestsAsync(
guildModelName: "guild-0002"
).ToListAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.SendRequests(
guildModelName: "guild-0002"
);
List<EzSendMemberRequest> items = new List<EzSendMemberRequest>();
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->Guild->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto It = Domain->SendRequests(
"guild-0002" // guildModelName
);
TArray<Gs2::UE5::Guild::Model::FEzSendMemberRequestPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}
sendRequest
Send a request
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
accessToken | string | ✓ | ~ 128 chars | User Id | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
targetGuildName | string | ✓ | ~ 128 chars | Guild name |
Result
Type | Description | |
---|---|---|
item | EzGuild | Joined Guild |
sendMemberRequest | EzSendMemberRequest | Sent Member Request |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var result = await domain.SendRequestAsync(
guildModelName: "guild-0002",
targetGuildName: "guild-0002"
);
var item = await result.ModelAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var future = domain.SendRequestFuture(
guildModelName: "guild-0002",
targetGuildName: "guild-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->Guild->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto Future = Domain->SendRequest(
"guild-0002", // guildModelName
"guild-0002" // targetGuildName
);
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();
getJoinedGuild
Get the guild you have joined
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
accessToken | string | ✓ | ~ 128 chars | User Id | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
guildName | string | ✓ | UUID | ~ 36 chars | Guild Name |
Result
Type | Description | |
---|---|---|
item | EzJoinedGuild | Friend request |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).JoinedGuild(
guildModelName: "guild-model-0001",
guildName: "guild-0001"
);
var item = await domain.ModelAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).JoinedGuild(
guildModelName: "guild-model-0001",
guildName: "guild-0001"
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->JoinedGuild(
"guild-model-0001", // guildModelName
"guild-0001" // guildName
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Value change event handling
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).JoinedGuild(
guildModelName: "guild-model-0001",
guildName: "guild-0001"
);
// 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.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).JoinedGuild(
guildModelName: "guild-model-0001",
guildName: "guild-0001"
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->JoinedGuild(
"guild-model-0001", // guildModelName
"guild-0001" // guildName
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Guild::Model::FJoinedGuild> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
listJoinedGuilds
List the guilds you have joined
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
accessToken | string | ✓ | ~ 128 chars | User Id | |
guildModelName | string | ~ 128 chars | Guild Model Name | ||
pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | ||
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
Type | Description | |
---|---|---|
items | List<EzJoinedGuild> | List of Friend request |
nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var items = await domain.JoinedGuildsAsync(
guildModelName: "guild-model-0001"
).ToListAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.JoinedGuilds(
guildModelName: "guild-model-0001"
);
List<EzJoinedGuild> items = new List<EzJoinedGuild>();
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->Guild->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
const auto It = Domain->JoinedGuilds(
"guild-model-0001" // guildModelName
);
TArray<Gs2::UE5::Guild::Model::FEzJoinedGuildPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}
Value change event handling
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
// Start event handling
var callbackId = domain.SubscribeJoinedGuilds(
() => {
// Called when an element of the list changes.
}
);
// Stop event handling
domain.UnsubscribeJoinedGuilds(callbackId);
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
);
var it = domain.JoinedGuilds(
guildModelName: "guild-model-0001"
);
List<EzJoinedGuild> items = new List<EzJoinedGuild>();
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->Guild->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
);
// Start event handling
const auto CallbackId = Domain->SubscribeJoinedGuilds(
[]() {
// Called when an element of the list changes.
}
);
// Stop event handling
Domain->UnsubscribeJoinedGuilds(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
withdrawGuild
Withdraw from the guild you have joined
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
accessToken | string | ✓ | ~ 128 chars | User Id | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
guildName | string | ✓ | UUID | ~ 36 chars | Guild Name |
Result
Type | Description | |
---|---|---|
item | EzJoinedGuild | Accepted Member Request |
guild | EzGuild | Guild |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).JoinedGuild(
guildModelName: "guild-model-0001",
guildName: "guild-0001"
);
var result = await domain.WithdrawGuildAsync(
);
var item = await result.ModelAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Me(
gameSession: GameSession
).JoinedGuild(
guildModelName: "guild-model-0001",
guildName: "guild-0001"
);
var future = domain.WithdrawGuildFuture(
);
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->Guild->Namespace(
"namespace-0001" // namespaceName
)->Me(
GameSession
)->JoinedGuild(
"guild-model-0001", // guildModelName
"guild-0001" // guildName
);
const auto Future = Domain->WithdrawGuild(
);
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();
addIgnoreUser
Add a user who has refused to participate
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
accessToken | string | ✓ | ~ 128 chars | Guild name | |
userId | string | ✓ | ~ 128 chars | User Id |
Result
Type | Description | |
---|---|---|
item | EzIgnoreUser | Refuse to participate user |
guild | EzGuild | Guild |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
);
var result = await domain.AddIgnoreUserAsync(
accessToken: ,
userId: "user-0001"
);
var item = await result.ModelAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
);
var future = domain.AddIgnoreUserFuture(
accessToken: ,
userId: "user-0001"
);
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->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-model-0001", // guildModelName
"guild-0001", // guildName
"user-0001" // userId
);
const auto Future = Domain->AddIgnoreUser(
, // accessToken
"user-0001" // userId
);
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();
deleteIgnoreUser
Delete a user who has refused to participate
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
accessToken | string | ✓ | ~ 128 chars | Guild name | |
userId | string | ✓ | ~ 128 chars | User Id |
Result
Type | Description | |
---|---|---|
item | EzIgnoreUser | Refuse to participate user |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
).IgnoreUser(
);
var result = await domain.DeleteIgnoreUserAsync(
accessToken: ,
userId: "user-0001"
);
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
).IgnoreUser(
);
var future = domain.DeleteIgnoreUserFuture(
accessToken: ,
userId: "user-0001"
);
yield return future;
if (future.Error != null)
{
onError.Invoke(future.Error, null);
yield break;
}
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-model-0001", // guildModelName
"guild-0001", // guildName
"user-0001" // userId
)->IgnoreUser(
);
const auto Future = Domain->DeleteIgnoreUser(
, // accessToken
"user-0001" // userId
);
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
const auto Result = Future->GetTask().Result();
getIgnoreUser
Get a user who has refused to participate
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
accessToken | string | ✓ | ~ 128 chars | Guild name | |
userId | string | ✓ | ~ 128 chars | User Id |
Result
Type | Description | |
---|---|---|
item | EzIgnoreUser | Refuse to participate user |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
).IgnoreUser(
);
var item = await domain.ModelAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
).IgnoreUser(
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-model-0001", // guildModelName
"guild-0001", // guildName
"user-0001" // userId
)->IgnoreUser(
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Value change event handling
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
).IgnoreUser(
);
// 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.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: "user-0001"
).IgnoreUser(
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-model-0001", // guildModelName
"guild-0001", // guildName
"user-0001" // userId
)->IgnoreUser(
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Guild::Model::FIgnoreUser> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
listIgnoreUsers
Get a list of users who have refused to participate
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
accessToken | string | ✓ | ~ 128 chars | Guild name | |
pageToken | string | ~ 1024 chars | Token specifying the position from which to start acquiring data | ||
limit | int | ✓ | 30 | 1 ~ 1000 | Number of data acquired |
Result
Type | Description | |
---|---|---|
items | List<EzIgnoreUser> | List of user IDs that refuse to participate |
nextPageToken | string | Page token to retrieve the rest of the listing |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: null
);
var items = await domain.IgnoreUsersAsync(
).ToListAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: null
);
var it = domain.IgnoreUsers(
);
List<EzIgnoreUser> items = new List<EzIgnoreUser>();
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->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-model-0001", // guildModelName
"guild-0001", // guildName
nullptr // userId
);
const auto It = Domain->IgnoreUsers(
);
TArray<Gs2::UE5::Guild::Model::FEzIgnoreUserPtr> Result;
for (auto Item : *It)
{
if (Item.IsError())
{
return false;
}
Result.Add(Item.Current());
}
Value change event handling
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: null
);
// Start event handling
var callbackId = domain.SubscribeIgnoreUsers(
() => {
// Called when an element of the list changes.
}
);
// Stop event handling
domain.UnsubscribeIgnoreUsers(callbackId);
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: null
);
var it = domain.IgnoreUsers(
);
List<EzIgnoreUser> items = new List<EzIgnoreUser>();
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->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-model-0001", // guildModelName
"guild-0001", // guildName
nullptr // userId
);
// Start event handling
const auto CallbackId = Domain->SubscribeIgnoreUsers(
[]() {
// Called when an element of the list changes.
}
);
// Stop event handling
Domain->UnsubscribeIgnoreUsers(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
getLastGuildMasterActivity
Get last activity date and time of guild master
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
accessToken | string | ✓ | ~ 128 chars | Guild name |
Result
Type | Description | |
---|---|---|
item | EzLastGuildMasterActivity | Refuse to participate user |
guild | EzGuild | Guild |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: null
).LastGuildMasterActivity(
);
var item = await domain.ModelAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: null
).LastGuildMasterActivity(
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-model-0001", // guildModelName
"guild-0001", // guildName
nullptr // userId
)->LastGuildMasterActivity(
);
const auto Future = Domain->Model();
Future->StartSynchronousTask();
if (Future->GetTask().IsError())
{
return false;
}
Value change event handling
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: null
).LastGuildMasterActivity(
);
// 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.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: null
).LastGuildMasterActivity(
);
var future = domain.ModelFuture();
yield return future;
var item = future.Result;
const auto Domain = Gs2->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-model-0001", // guildModelName
"guild-0001", // guildName
nullptr // userId
)->LastGuildMasterActivity(
);
// Start event handling
const auto CallbackId = Domain->Subscribe(
[](TSharedPtr<Gs2::Guild::Model::FLastGuildMasterActivity> value) {
// Called when the value changes
// The "value" is passed the value after the change.
}
);
// Stop event handling
Domain->Unsubscribe(CallbackId);
Warning
This event is called when the value in the local cache that the SDK has is changed.
The local cache will only be changed by executing the SDK’s API, or by executing a stamp sheet via GS2-Distributor with GS2-Gateway notification enabled, or by executing a GS2-JobQueue with GS2-Gateway notification enabled. GS2-Gateway notification enabled.
Therefore, callbacks will not be invoked if the value is changed in any other way.
promoteSeniorMember
Promote the most senior guild member to guild master if the guild master has not logged in for a certain period of time
Request
Type | Require | Default | Limitation | Description | |
---|---|---|---|---|---|
namespaceName | string | ✓ | ~ 128 chars | Namespace name | |
guildModelName | string | ✓ | ~ 128 chars | Guild Model Name | |
accessToken | string | ✓ | ~ 128 chars | Guild name |
Result
Type | Description | |
---|---|---|
item | EzLastGuildMasterActivity | Refuse to participate user |
guild | EzGuild | Guild |
Implementation Example
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: null
);
var result = await domain.PromoteSeniorMemberAsync(
accessToken:
);
var item = await result.ModelAsync();
var domain = gs2.Guild.Namespace(
namespaceName: "namespace-0001"
).Guild(
guildModelName: "guild-model-0001",
guildName: "guild-0001",
userId: null
);
var future = domain.PromoteSeniorMemberFuture(
accessToken:
);
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->Guild->Namespace(
"namespace-0001" // namespaceName
)->Guild(
"guild-model-0001", // guildModelName
"guild-0001", // guildName
nullptr // userId
);
const auto Future = Domain->PromoteSeniorMember(
// accessToken
);
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
OnReceiveRequestNotification
Notification used when a member request is received
Name | Type | Description |
---|---|---|
namespaceName | string | Namespace name |
guildModelName | string | Guild Model Name |
guildName | string | Guild Name |
fromUserId | string | User Id |
Implementation Example
gs2.Guild.OnReceiveRequestNotification += notification =>
{
var namespaceName = notification.NamespaceName;
var guildModelName = notification.GuildModelName;
var guildName = notification.GuildName;
var fromUserId = notification.FromUserId;
};
gs2.Guild.OnReceiveRequestNotification += notification =>
{
var namespaceName = notification.NamespaceName;
var guildModelName = notification.GuildModelName;
var guildName = notification.GuildName;
var fromUserId = notification.FromUserId;
};
Gs2->Guild->OnReceiveRequestNotification().AddLambda([](const auto Notification)
{
const auto NamespaceName = Notification->NamespaceNameValue;
const auto GuildModelName = Notification->GuildModelNameValue;
const auto GuildName = Notification->GuildNameValue;
const auto FromUserId = Notification->FromUserIdValue;
});
OnRemoveRequestNotification
Notification used when a member request is deleted
Name | Type | Description |
---|---|---|
namespaceName | string | Namespace name |
guildModelName | string | Guild Model Name |
guildName | string | Guild Name |
fromUserId | string | User Id |
Implementation Example
gs2.Guild.OnRemoveRequestNotification += notification =>
{
var namespaceName = notification.NamespaceName;
var guildModelName = notification.GuildModelName;
var guildName = notification.GuildName;
var fromUserId = notification.FromUserId;
};
gs2.Guild.OnRemoveRequestNotification += notification =>
{
var namespaceName = notification.NamespaceName;
var guildModelName = notification.GuildModelName;
var guildName = notification.GuildName;
var fromUserId = notification.FromUserId;
};
Gs2->Guild->OnRemoveRequestNotification().AddLambda([](const auto Notification)
{
const auto NamespaceName = Notification->NamespaceNameValue;
const auto GuildModelName = Notification->GuildModelNameValue;
const auto GuildName = Notification->GuildNameValue;
const auto FromUserId = Notification->FromUserIdValue;
});
OnChangeNotification
Notification issued when a guild information is updated
Name | Type | Description |
---|---|---|
namespaceName | string | Namespace name |
guildModelName | string | Guild Model Name |
guildName | string | Guild Name |
Implementation Example
gs2.Guild.OnChangeNotification += notification =>
{
var namespaceName = notification.NamespaceName;
var guildModelName = notification.GuildModelName;
var guildName = notification.GuildName;
};
gs2.Guild.OnChangeNotification += notification =>
{
var namespaceName = notification.NamespaceName;
var guildModelName = notification.GuildModelName;
var guildName = notification.GuildName;
};
Gs2->Guild->OnChangeNotification().AddLambda([](const auto Notification)
{
const auto NamespaceName = Notification->NamespaceNameValue;
const auto GuildModelName = Notification->GuildModelNameValue;
const auto GuildName = Notification->GuildNameValue;
});
OnJoinNotification
Notification issued when a guild member is added
Name | Type | Description |
---|---|---|
namespaceName | string | Namespace name |
guildModelName | string | Guild Model Name |
guildName | string | Guild Name |
joinedUserId | string | User Id |
Implementation Example
gs2.Guild.OnJoinNotification += notification =>
{
var namespaceName = notification.NamespaceName;
var guildModelName = notification.GuildModelName;
var guildName = notification.GuildName;
var joinedUserId = notification.JoinedUserId;
};
gs2.Guild.OnJoinNotification += notification =>
{
var namespaceName = notification.NamespaceName;
var guildModelName = notification.GuildModelName;
var guildName = notification.GuildName;
var joinedUserId = notification.JoinedUserId;
};
Gs2->Guild->OnJoinNotification().AddLambda([](const auto Notification)
{
const auto NamespaceName = Notification->NamespaceNameValue;
const auto GuildModelName = Notification->GuildModelNameValue;
const auto GuildName = Notification->GuildNameValue;
const auto JoinedUserId = Notification->JoinedUserIdValue;
});
OnLeaveNotification
Notification issued when a guild member is removed
Name | Type | Description |
---|---|---|
namespaceName | string | Namespace name |
guildModelName | string | Guild Model Name |
guildName | string | Guild Name |
leavedUserId | string | User Id |
Implementation Example
gs2.Guild.OnLeaveNotification += notification =>
{
var namespaceName = notification.NamespaceName;
var guildModelName = notification.GuildModelName;
var guildName = notification.GuildName;
var leavedUserId = notification.LeavedUserId;
};
gs2.Guild.OnLeaveNotification += notification =>
{
var namespaceName = notification.NamespaceName;
var guildModelName = notification.GuildModelName;
var guildName = notification.GuildName;
var leavedUserId = notification.LeavedUserId;
};
Gs2->Guild->OnLeaveNotification().AddLambda([](const auto Notification)
{
const auto NamespaceName = Notification->NamespaceNameValue;
const auto GuildModelName = Notification->GuildModelNameValue;
const auto GuildName = Notification->GuildNameValue;
const auto LeavedUserId = Notification->LeavedUserIdValue;
});
OnChangeMemberNotification
Notification issued when a guild member is updated
Name | Type | Description |
---|---|---|
namespaceName | string | Namespace name |
guildModelName | string | Guild Model Name |
guildName | string | Guild Name |
changedUserId | string | User Id |
Implementation Example
gs2.Guild.OnChangeMemberNotification += notification =>
{
var namespaceName = notification.NamespaceName;
var guildModelName = notification.GuildModelName;
var guildName = notification.GuildName;
var changedUserId = notification.ChangedUserId;
};
gs2.Guild.OnChangeMemberNotification += notification =>
{
var namespaceName = notification.NamespaceName;
var guildModelName = notification.GuildModelName;
var guildName = notification.GuildName;
var changedUserId = notification.ChangedUserId;
};
Gs2->Guild->OnChangeMemberNotification().AddLambda([](const auto Notification)
{
const auto NamespaceName = Notification->NamespaceNameValue;
const auto GuildModelName = Notification->GuildModelNameValue;
const auto GuildName = Notification->GuildNameValue;
const auto ChangedUserId = Notification->ChangedUserIdValue;
});