道具详细信息
查询玩家邮箱中保管的道具详细信息。
调用信息
public void Show (string itemKey, PlayNANOODelegate callback) {}
调用详细信息
| 参数 | 说明 | 类型 |
|---|---|---|
| itemKey | 道具识别键 | string |
| callback | 通信结果 | PlayNANOODelegate |
源代码
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Awake()
{
plugin = Plugin.GetInstance();
string itemKey = "ITEM_KEY";
plugin.InboxManager.Show(itemKey, (status, error, jsonString, values) =>
{
PlayNANOO.Inbox.ItemValueModel[] items = values["Items"] as PlayNANOO.Inbox.ItemValueModel[];
foreach (PlayNANOO.Inbox.ItemValueModel item in items)
{
Debug.Log(item.item_code);
Debug.Log(item.item_count);
}
PlayNANOO.Inbox.MessageValueModel[] messages = values["Messages"] as PlayNANOO.Inbox.MessageValueModel[];
foreach (PlayNANOO.Inbox.MessageValueModel message in messages)
{
Debug.Log(message.language);
Debug.Log(message.title);
Debug.Log(message.content);
}
});
}
}
通信结果
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"items": [
{
"item_code": "gold",
"item_count": 100
}
],
"messages": [
{
"language": "default",
"title": "hello",
"content": "hello world"
}
]
}
通信结果详细信息
| 数据键 | 说明 | 类型 |
|---|---|---|
| items.item_codeunt | 道具代码 | string |
| items.item_count | 道具数量 | integer |
| messages.language | 消息语言代码 | string |
| messages.title | 消息标题 | string |
| messages.content | 消息正文 | string |