Esempio n. 1
0
        /// <summary>
        /// Allows you to retrieve your account's available inventory on Steam (items listable for sale),
        /// your BitSkins inventory (items currently on sale), and your pending withdrawal inventory (items you delisted or purchased).
        /// </summary>
        /// <param name="app">Inventory's game id.</param>
        /// <param name="page">Page number for BitSkins inventory.</param>
        /// <returns>Account's inventories.</returns>
        public static AccountInventory GetAccountInventory(Market.AppId.AppName app, int page)
        {
            CheckParameters(page);
            string           urlRequest       = GetUrlRequest(app, page);
            string           result           = Server.ServerRequest.RequestServer(urlRequest);
            AccountInventory accountInventory = ReadAccountInventory(result);

            return(accountInventory);
        }
Esempio n. 2
0
        private static AccountInventory ReadAccountInventory(string result)
        {
            dynamic responseServerD             = JsonConvert.DeserializeObject(result);
            dynamic steamInventoryD             = responseServerD.data.steam_inventory;
            dynamic bitskinsInventoryD          = responseServerD.data.bitskins_inventory;
            dynamic pendingWithdrawalInventoryD = responseServerD.data.pending_withdrawal_from_bitskins;

            SteamInventory    steamInventory    = ReadSteamInventory(steamInventoryD);
            BitSkinsInventory bitSkinsInventory = ReadBitSkinsInventory(bitskinsInventoryD);
            PendingWithdrawalFromBitskinsInventory pendingWithdrawalFromBitskinsInventory = ReadPendingWithdrawalFromBitskinsInventory(pendingWithdrawalInventoryD);

            AccountInventory accountInventorys = new AccountInventory(steamInventory, bitSkinsInventory, pendingWithdrawalFromBitskinsInventory);

            return(accountInventorys);
        }