우편에 첨부된 아이템의 이름과 개수 가져오는 법을 모르겠습니다.

문의 응대 : 평일 오전 10시 ~ 오후 6시
문의를 남기실 경우 다음 항목을 작성해 주세요.
정보가 부족하거나 응대시간 외 문의하는 경우 확인 및 답변이 지연될 수 있습니다.

  • 뒤끝 SDK 버전 : 5.7.0
  • 프로젝트명 :
  • 스테이터스 코드 :
  • 에러 코드 :
  • 에러 메시지 :

여기보고 했는데,
잘 되질 않네요…

var bro = Backend.UPost.ReceivePostItem(postType, postIndate);
JsonData postList = bro.GetReturnValuetoJSON()[“postItems”];
위 코드를 사용해서 아이템 이름과 개수를 가져올 수 있는데, 해당 코드는 아이템을 획득할 때 사용되더라구요…
혹시 우편리스트를 읽어오면서 아이템 이름과 개수를 읽어올 수 있는 방법이 있을까요?

안녕하세요 개발자님,
문의하신 내용에 대하여 예시 코드를 안내해드립니다.
확인하여 이용해 주시면 감사하겠습니다. :D

public class UPostChartItem
{
    public string chartFileName;
    public string itemID;
    public string itemName;
    public string hpPower;
    public int itemCount;
    public override string ToString()
    {
        return $"item({chartFileName} / {itemID} / {itemName} / {hpPower} / {itemCount})";
    }
}
public class UPostItem
{
    public string title;
    public string author;
    public string content;
    public DateTime expirationDate;
    public DateTime reservationDate;
    public DateTime sentDate;
    public string nickname;
    public string inDate;
    public List<UPostChartItem> items = new List<UPostChartItem>();
    public override string ToString()
    {
        string totalString = string.Empty;
        string itemList = "";
        for (int i = 0; i < items.Count; i++)
        {
            itemList += items[i].ToString();
        }
        totalString = $"{title} / {author} / {content} / {expirationDate} / {reservationDate} / {sentDate} / {nickname} / {inDate}";
        totalString += "\nItemList : \n";
        totalString += itemList;
        return totalString;
    }
}
public void GetPostListTest()
{
    int limit = 100;
    List<UPostItem> postItemList = new List<UPostItem>();
    BackendReturnObject bro = Backend.UPost.GetPostList(PostType.Admin, limit);
    if (bro.IsSuccess())
    {
        JsonData postListJson = bro.GetReturnValuetoJSON()["postList"];
        for (int i = 0; i < postListJson.Count; i++)
        {
            UPostItem rankItem = new UPostItem();
            rankItem.content = postListJson[i]["content"].ToString();
            rankItem.expirationDate = DateTime.Parse(postListJson[i]["expirationDate"].ToString());
            rankItem.reservationDate = DateTime.Parse(postListJson[i]["reservationDate"].ToString());
            rankItem.nickname = postListJson[i]["nickname"].ToString();
            rankItem.inDate = postListJson[i]["inDate"].ToString();
            rankItem.title = postListJson[i]["title"].ToString();
            if (postListJson[i].ContainsKey("author"))
            {
                rankItem.author = postListJson[i]["author"].ToString();
            }
            rankItem.sentDate = DateTime.Parse(postListJson[i]["sentDate"].ToString());
            if (postListJson[i]["items"].Count > 0)
            {
                for (int itemNum = 0; itemNum < postListJson[i]["items"].Count; itemNum++)
                {
                    UPostChartItem item = new UPostChartItem();
                    item.itemCount = Int32.Parse(postListJson[i]["items"][itemNum]["itemCount"].ToString());
                    item.chartFileName = postListJson[i]["items"][itemNum]["item"]["chartFileName"].ToString();
                    item.itemID = postListJson[i]["items"][itemNum]["item"]["itemID"].ToString();
                    item.itemName = postListJson[i]["items"][itemNum]["item"]["itemName"].ToString();
                    item.hpPower = postListJson[i]["items"][itemNum]["item"]["hpPower"].ToString();
                    rankItem.items.Add(item);
                }
            }
            postItemList.Add(rankItem);
            Debug.Log(rankItem.ToString());
        }
    }
}