Skip to main content
Version: 5.11.8

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

Error cases

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

When the ranking to be updated is not a meta ranking
statusCode : 400
errorCode : BadParameterException

When updated to a value other than int, long double, and float
statusCode : 400
errorCode : BadParameterException

When there is an attempt to update the ranking with a non-existent uuid
statusCode : 404
errorCode : NotFoundException

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

When a user who has not joined a guild attempts to update the ranking
statusCode : 412
errorCode : PreconditionFailed

When there is an attempt to update the ranking during UTC +9 04:00 - 05:00
statusCode : 428
errorCode : Precondition Required

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