Ejemplo n.º 1
0
        private void GetMarketInventoryCallback(
            DMarketSDK.IntegrationAPI.Request.BasicIntegration.GetUserInventoryRequest.Response result,
            DMarketSDK.IntegrationAPI.Request.BasicIntegration.GetUserInventoryRequest.RequestParams request)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(string.Format("GetInventory request completed. Total Items Count: {0}", result.Items.Count));
            foreach (var item in result.Items)
            {
                builder.Append(string.Format("\nInventory item assetId: {0}, classId: {1}", item.assetId,
                                             item.classId));
            }

            Debug.Log(builder.ToString());
        }
Ejemplo n.º 2
0
        private void MarketFlow_GetInMarketInventoryBeforeFromMarketCallback(
            DMarketSDK.IntegrationAPI.Request.BasicIntegration.GetUserInventoryRequest.Response result,
            DMarketSDK.IntegrationAPI.Request.BasicIntegration.GetUserInventoryRequest.RequestParams request)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(string.Format("GetInventory request before FromMarket completed. Total Items Count: {0}",
                                         result.Items.Count));
            foreach (var item in result.Items)
            {
                builder.Append(string.Format("\nInventory item assetId: {0}, classId: {1}", item.assetId,
                                             item.classId));
            }

            Debug.Log(builder.ToString());
            _serverApi.GetInMarketInventory(_marketAccessToken, MarketFlow_GetInMarketInventoryAfterFromMarketCallback,
                                            OnErrorCallback);
            Debug.Log("GetInMarketInventory request was sent.");
        }
Ejemplo n.º 3
0
        private void MarketFlow_GetInMarketInventoryAfterFromMarketCallback(
            DMarketSDK.IntegrationAPI.Request.BasicIntegration.GetUserInventoryRequest.Response result,
            DMarketSDK.IntegrationAPI.Request.BasicIntegration.GetUserInventoryRequest.RequestParams request)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(string.Format("GetInventory request after FromMarket completed. Total Items Count: {0}",
                                         result.Items.Count));
            foreach (var item in result.Items)
            {
                builder.Append(string.Format("\nInventory item assetId: {0}, classId: {1}", item.assetId,
                                             item.classId));
            }
            Price price = new Price
            {
                Amount = _priceAmount
            };

            _clientApi.CreateSellOfferRequest(_itemAssetId, price.Amount, price.Currency,
                                              MarketFlow_GetMySellOffersList, OnErrorCallback);
            Debug.Log("CreateSellOffer request was sent.");
            Debug.Log(builder.ToString());
        }