Skip to main content
Version: 6.0.0

GetProductList

public BackndProductReturnObject GetProductList();

BackndProductReturnObject

GetReturnValueByProductItemList

If an error occurred, null is returned.

BackndCouponReturnObject bro = Backnd.Coupon.GetCouponList();

foreach(BackndCouponItem item in bro.GetReturnValueByCouponList()) {
Debug.Log(item.ToString());
}

BackndProductItem

public class BackndProductItem
{
public string TBC;
public string inDate;
public string uuid;
public string name;
public string explain;
}

Description

You can look up the list of game cash items registered in BACKND Console.

Example

Synchronous

Backnd.GameCash.GetProductList();

Asynchronous

Backnd.GameCash.GetProductList((callback) => 
{
// Post-process
});

Return cases

Success cases

When the lookup is successful
statusCode : 200

returnValue : refer to GetReturnValuetoJSON

Error cases

When there is no product registered in BACKND Console
statusCode : 404
errorCode : NotFoundException

GetReturnValuetoJSON

{
rows:
[
{
TBC: { N : 3300 }, // TBC value
inDate: { S : "2018-03-06T02:26:09.526Z"}, // Cash item indate
uuid: { S : "bb35b960-20e5-11e8-8fdb-4928c1afeae2" }, // Cash item uuid
name: { S : "Luden's Echo" }, // Name of cash item
explain: { S : "Rare item" } // Cash item description
},
{
TBC: [Object],
inDate: [Object],
uuid: [Object],
name: [Object],
explain: [Object]
}
}

Sample code

public class ProductItem
{
public string TBC;
public string inDate;
public string uuid;
public string name;
public string explain;
public override string ToString()
{
return $"TBC : {TBC}\ninDate : {inDate}\nuuid : {uuid}\nname : {name}\nexplain : {explain}\n";
}
};
public void GetProductList()
{
var bro = Backnd.GameCash.GetProductList();

BACKND.LitJson.JsonData json = bro.FlattenRows();
List<ProductItem> productList = new List<ProductItem>();

for(int i = 0; i < json.Count; i++)
{
ProductItem product = new ProductItem();

product.TBC = json[i]["TBC"].ToString();
product.inDate = json[i]["inDate"].ToString();
product.uuid = json[i]["uuid"].ToString();
product.name = json[i]["name"].ToString();
product.explain = json[i]["explain"].ToString();

productList.Add(product);
Debug.Log(product.ToString());
}
}