전체 재화 조회
플레이어가 보유한 게임 내 전체 재화 정보를 조회 합니다.
호출 정보
CurrencyAll(PlayNANOODelegate callback) {}
호출 상세 정보
| 파라미터 | 설명 | 타입 |
|---|---|---|
| callback | 통신 결과 | PlayNANOODelegate |
소스 코드
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Awake()
{
plugin = Plugin.GetInstance();
plugin.CurrencyManager.All((status, errorMessage, jsonString, values) => {
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
PlayNANOO.Currency.ItemModel[] items = values["Items"] as PlayNANOO.Currency.ItemModel[];
foreach(PlayNANOO.Currency.ItemModel item in items)
{
Debug.Log(item.currency_code);
Debug.Log(item.currency_amount);
}
}
else
{
Debug.Log("Fail");
}
});
}
}
통신 결과
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"items" : [
{
"currency": "CurrencyCode",
"amount": 100
}
]
}
통신 결과 상세 정보
| 데이터키 | 설명 | 타입 |
|---|---|---|
| items.currency | 재화 코드 | string |
| items.amount | 보유 재화 | double |