Exemple #1
0
        public static async Task <AccountInventory> GetAccountInventory(string apiKey)
        {
            var accountInv = new AccountInventory()
            {
                Account         = await AccountAPI.Account(apiKey),
                Characters      = await CharacterAPI.Characters(apiKey),
                Bank            = await AccountAPI.Bank(apiKey),
                SharedInventory = await AccountAPI.SharedInventory(apiKey),
                Materials       = await AccountAPI.MaterialStorage(apiKey),
                Wallet          = await AccountAPI.Wallet(apiKey)
            };
            await accountInv.SetGuildBank(apiKey);

            return(accountInv);
        }
Exemple #2
0
        internal async Task Populate(string apiKey)
        {
            Wallet = await AccountAPI.Wallet(apiKey);

            var characterResult = await CharacterAPI.Characters(apiKey);

            Characters = GroupItems(CharacterItems(characterResult));

            var bankResult = await AccountAPI.Bank(apiKey);

            Bank = GroupItems(GetItems(bankResult.Cast <Equipment>().ToList()));

            var sharedResult = await AccountAPI.SharedInventory(apiKey);

            SharedInventory = GroupItems(GetItems(sharedResult.Cast <Equipment>().ToList()));

            MaterialStorage = GroupItems(GetItems(await AccountAPI.MaterialStorage(apiKey)));
            DeliveryBox     = GroupItems(GetItems(GetDeliveryBox(await CommerceAPI.DeliveryBox(apiKey))));
            GuildBank       = GroupItems(GetItems(await GetGuildInventory(await AccountAPI.Account(apiKey), apiKey)));
        }