Skip to main content
Version: SDK-5.11.4

UpdateGuildMetaData

public BackendReturnObject UpdateGuildMetaData(string rankUuid, string metaKey, int value);
public BackendReturnObject UpdateGuildMetaData(string rankUuid, string metaKey, long value);
public BackendReturnObject UpdateGuildMetaData(string rankUuid, string metaKey, float value);
public BackendReturnObject UpdateGuildMetaData(string rankUuid, string metaKey, double value);

Note

Old version rankings cannot use this method.

Parameters

ValueTypeDescription
rankUuidstringuuid of the ranking to update
metaKeystringMetadata key of the guild to update
valueint/longValue to update

The rankUuid value can be checked using the following methods:

Description

The ranking is updated at the same time as the guild's metadata.

  • If the metadata to update does not exist, the corresponding metadata will be newly created.
  • UpdateGuildMetaData is a method where the ranking update function is added to the Backend.Social.Guild.ModifyGuildV3 method.
  • Data updated without using the UpdateGuildMetaData method is not reflected in the ranking.
    The range of metadata values used for ranking(values to be used as scores) must be as follows.
    Values out of that range may not be stored properly(e.g., rounded up or down), and cause an error when looking up the ranking in the SDK.
    Integer: -9007199254740992 - 9007199254740992(-2^53 - 2^53)
    Real number: -3.40282347E+38F - 3.40282347E+38F(float.MinValue - float.MaxValue)

Guild rankings do not support additional fields.

Example

Synchronous

Backend.URank.Guild.UpdateGuildMetaData("rankUuid", "meta key to update", 1);

Asynchronous

Backend.URank.Guild.UpdateGuildMetaData("rankUuid", "meta key to update", 1, callback => {
// Post-process
});

SendQueue

SendQueue.Enqueue(Backend.URank.Guild.UpdateGuildMetaData, "rankUuid", "meta key to update", 1, callback => {
// Post-process
});

Return cases

Success cases

When the update is successful
statusCode : 204
message : Success

Error cases

When the uuid is null or string.Empty
statusCode : 400
errorCode : ValidationException
message : rankUuid is null or empty

When the ranking to be updated is not a meta ranking
statusCode : 400
errorCode : BadParameterException
message : bad table, Invalid table

When updated to a value other than int, long double, and float
statusCode : 400
errorCode : BadParameterException
message : bad value must number, The value must be a number

When there is an attempt to update the ranking with a non-existent uuid
statusCode : 404
errorCode : NotFoundException
message : rank not found, rank cannot be found

When there is an attempt to update the ranking with other metadata, not the one registered when creating the guild ranking
statusCode : 404
errorCode : NotFoundException
message : guild rank not found, guild rank cannot be found

When a user who has not joined a guild attempts to update the ranking
statusCode : 412
errorCode : PreconditionFailed
message : notGuildMember prerequisites are not met.

When there is an attempt to update the ranking during UTC +9 04:00 - 05:00
statusCode : 428
errorCode : Precondition Required
message : Precondition Required ranking is being counted When there is an attempt to update the ranking between 4 am - 5 am in Korean time

When there is an attempt to update an expired one-time ranking
statusCode : 428
errorCode : Precondition Required
message : Precondition Required ranking is being counted