コード例 #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);
        }
コード例 #2
0
ファイル: ItemWorker.cs プロジェクト: Roytazz/GW2-Projects
        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)));
        }