Beispiel #1
0
        private static SteamInventory ReadSteamInventory(dynamic steamInventoryD)
        {
            SteamInventory steamInventory = null;

            if (steamInventoryD != null)
            {
                dynamic items = steamInventoryD.items;

                int?totalItems = steamInventoryD.total_items ?? null;

                List <SteamInventoryItem> steamInventoryItems = new List <SteamInventoryItem>();
                if (items != null)
                {
                    foreach (dynamic item in items)
                    {
                        SteamInventoryItem steamInventoryItem = ReadSteamInventoryItem(item);
                        steamInventoryItems.Add(steamInventoryItem);
                    }
                }

                steamInventory = new SteamInventory(totalItems, steamInventoryItems);
            }

            return(steamInventory);
        }
Beispiel #2
0
 internal AccountInventory(SteamInventory steamInventory, BitSkinsInventory bitSkinsInventory,
                           PendingWithdrawalFromBitskinsInventory pendingWithdrawalFromBitskinsInventory)
 {
     SteamInventory    = steamInventory;
     BitSkinsInventory = bitSkinsInventory;
     PendingWithdrawalFromBitskinsInventory = pendingWithdrawalFromBitskinsInventory;
 }
Beispiel #3
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);
        }