Skip to main content

Item Details

API to query detailed information about a specific item in the inbox.

URL Confirmation

This API uses the service-api.playnanoo.com domain.

API Information

  • URL: https://service-api.playnanoo.com/inbox/v20220901/show
  • Method: PUT
  • Authentication Required: Yes
DeviceInfo Inheritance

The Req class of this API inherits from DeviceInfo. All properties of DeviceInfo are automatically included.

Request Parameters

ParameterTypeRequiredDescription
item_keystringYesItem key to query

Response Data

Res Class

FieldTypeDescription
itemsSerializeItems[]Item list
messagesSerializeItemMessages[]Message list

SerializeItems Structure

FieldTypeDescription
item_codestringItem code
item_countintItem count

SerializeItemMessages Structure

FieldTypeDescription
languagestringLanguage code
titlestringMessage title
contentstringMessage content

Unity C# Implementation

BaseResponse Class

Base class for all API responses.

public class BaseResponse
{
public string ErrorCode;
public string Message;
public string WithdrawalKey;
public string BlockKey;
}

Field descriptions:

  • ErrorCode: Error code
  • Message: Error message
  • WithdrawalKey: Key required for recovery if account is in withdrawal grace period (provided only for accounts in withdrawal grace period)
  • BlockKey: Key provided for blocked accounts (provided only for blocked accounts)

Inbox Item Details Query Class

using System;
using System.Collections;
using UnityEngine.Networking;

public class InboxShow
{
static string url = "https://service-api.playnanoo.com/inbox/v20220901/show";

[Serializable]
public class Req : DeviceInfo
{
public string item_key;

public IEnumerator Send(
string item_key,
Action<Res> onSuccess,
Action<BaseResponse> onError)
{
if (!string.IsNullOrEmpty(item_key)) this.item_key = item_key;

// PUT method call
yield return HttpClient.Send<Req, Res>(
UnityWebRequest.kHttpVerbPUT,
url,
requireToken: true,
body: this,
onSuccess: onSuccess,
onError: onError
);
}
}

[Serializable]
public class Res : BaseResponse
{
public SerializeItems[] items;
public SerializeItemMessages[] messages;
}

[Serializable]
public class SerializeItems
{
public string item_code;
public int item_count;
}

[Serializable]
public class SerializeItemMessages
{
public string language;
public string title;
public string content;
}
}

Usage Example

public void ShowInboxItem()
{
InboxShow.Req req = new InboxShow.Req();

StartCoroutine(req.Send(
item_key: "item_key_12345",
onSuccess: res =>
{
Debug.Log("Inbox item details query successful");

if (res.items != null)
{
foreach (var item in res.items)
{
Debug.Log($"Item: {item.item_code}, Count: {item.item_count}");
}
}

if (res.messages != null)
{
foreach (var msg in res.messages)
{
Debug.Log($"Message[{msg.language}]: {msg.title} - {msg.content}");
}
}
},
onError: (error) =>
{
Debug.LogError($"Inbox item details query failed: [{error.ErrorCode}] [{error.Message}]");
}
));
}
Item Key

item_key is the unique key of the item returned from the inbox item list query API.