Skip to main content
Version: 5.9.6

SendUserPost

public BackendReturnObject SendUserPost(string ReceiverIndate, PostItem item);

Note
This function provides the same feature as Social.Post.SendPost of the previous mail function.

Parameters

ValueTypeDescription
ReceiverIndatestringRecipient's indate
postItemPostItemInformation on the item to be gifted

PostItem

ValueTypeDescription
TitlestringMail title(1–20 characters; uppercase/lowercase alphabets, numbers, Korean characters, special characters, and spaces allowed)
ContentstringMail content(optional; 1–50 characters; uppercase/lowercase alphabets, numbers, Korean characters, special characters, and spaces allowed)
TableNamestringGame information table of the game item
RowInDatestringRow key of the game information table
ColumnstringColumn key of the game information table

Description

Sends the information in game information management to another game user via mail.

  • Up to 50 pieces of mail can be sent to a user per day.
  • Mail that has already been sent cannot be canceled(recalled).
  • After the mail is sent, the relevant cell is deleted from the server, and the information in the cell is modified to "NULL":true.

Mail sending process

As mail is sent based on game information, it is essential to update game information before sending the mail.
After sending the mail, the game information of the relevant user is deleted("NULL":true), and it is added to the recipient's mail list.
Therefore, it is necessary to fetch the user's game information again after sending the mail and re-update the game information in the client.(The mail recipient's game information is not updated automatically.)

  1. Update game information (Update the user data stored on the server to the latest state. This step is not necessary if you can assure that they are up to date.)

  2. Send mail (When the client sends mail, the server deletes the data in the relevant column from the sender's row(replaces with "NULL":true) and sends the mail to the recipient.)

  3. Update the deletion of the column data(replaced with "NULL":true) from the sender's row in the client (After the mail is sent, the client must be updated by looking up the user's current information using the game information lookup method.)

Example

Synchronous

PostItem postItem = new PostItem
{
Title = "You can have this!",
Content = "I don't need it lol",
TableName = table_name,
RowInDate = indate,
Column = column_name
};
Backend.UPost.SendUserPost("ReceiverIndate", postItem);

Asynchronous

PostItem postItem = new PostItem
{
Title = "You can have this!",
Content = "I don't need it lol",
TableName = table_name,
RowInDate = indate,
Column = column_name
};
Backend.UPost.SendUserPost("ReceiverIndate", postItem, (callback) =>
{
// Post-process
}) ;

SendQueue

PostItem postItem = new PostItem
{
Title = "You can have this!",
Content = "I don't need it lol",
TableName = table_name,
RowInDate = indate,
Column = column_name
};
SendQueue.Enqueue(Backend.UPost.SendUserPost, "ReceiverIndate", postItem, (callback) =>
{
// Post-process
}) ;

Return cases

Success cases

When sent successfully
statusCode : 204

Error cases

When the title/content does not meet the minimum/maximum length
statusCode : 400
errorCode : BadParameterException

When you send it to yourself
statusCode : 403
errorCode : ForbiddenException

When the indate(game data) is invalid
statusCode : 404 errorCode : NotFoundException

When you send more than 50 pieces of mail a day
statusCode : 429
errorCode : Too Many Request