private async Task UpdateVillageAsync(ClanVillageApiModel village) { VillageApiModel?storedVillage; VillageApiModel?downloadedVillage; try { storedVillage = await _cocApi.GetVillageAsync(village.VillageTag, allowStoredItem : true, allowExpiredItem : true); downloadedVillage = await _cocApi.GetVillageAsync(village.VillageTag, allowStoredItem : true, allowExpiredItem : false); } catch (NotFoundException) { //there is a bug in the api where some villages that appear in the clan village list do not appear in the player end point return; } storedVillage.Update(_cocApi, downloadedVillage); }
private void CocApi_ClanVillageNameChanged(ClanVillageApiModel oldMember, string newName) { _logService.LogInformation($"New name: {newName}"); }