private async Task UpdatePrices() { var theFile = new CachedRemoteFile("http://doc-x.net/hex/all_prices_json.txt", mFileService); if (await theFile.DownloadFile()) { mRepo.UpdatePrices(AuctionHouseData.ParseJson(theFile.Content)); await mRepo.Persist(); } }
private async Task UpdateItems() { var theItemListFile = new CachedRemoteFile("http://hexdbapi.hexsales.net/v1/objects/search", mFileService); theItemListFile.PostMessage = "{}"; theItemListFile.CacheFileName = "itemlist.json"; if (await theItemListFile.DownloadFile()) { var theItems = HexItemSearch.ParseJson(theItemListFile.Content); mRepo.UpdateItemInfo(theItems); await mRepo.Persist(); } }