This repository was archived by the owner on Jan 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 </PropertyGroup >
88
99 <ItemGroup >
10- <PackageReference Include =" ClashOfClans" Version =" 8.4.2 " />
11- <PackageReference Include =" Microsoft.Extensions.Configuration.Json" Version =" 6 .0.0" />
10+ <PackageReference Include =" ClashOfClans" Version =" 8.5.0-rc1 " />
11+ <PackageReference Include =" Microsoft.Extensions.Configuration.Json" Version =" 7 .0.0" />
1212 </ItemGroup >
1313
1414 <ItemGroup >
Original file line number Diff line number Diff line change @@ -129,5 +129,23 @@ public async Task RetrieveInformationAboutClansCurrentClanWarLeagueGroup()
129129
130130 static string Statistics ( ClanWarLeagueWarClan clan ) => $ "{ clan . Name } [{ clan . Stars } \u2605 /{ clan . DestructionPercentage : 0.00} %/{ clan . Attacks } ]";
131131 }
132+
133+ /// <summary>
134+ /// Retrieve clan's capital raid seasons
135+ /// </summary>
136+ public async Task RetrieveClansCapitalRaidSeasons ( )
137+ {
138+ var query = new Query
139+ {
140+ Limit = 1
141+ } ;
142+ var coc = new ClashOfClansClient ( token ) ;
143+ var capitalRaidSeasons = ( ClanCapitalRaidSeasons ) await coc . Clans . GetCapitalRaidSeasonsAsync ( clanTag , query ) ;
144+
145+ if ( capitalRaidSeasons . SingleOrDefault ( ) is ClanCapitalRaidSeason crs )
146+ {
147+ Console . WriteLine ( $ "CapitalTotalLoot { crs . CapitalTotalLoot } , TotalAttacks { crs . TotalAttacks } ") ;
148+ }
149+ }
132150 }
133151}
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ static async Task Main(string[] args)
2727 await clansExamples . RetrieveClansClanWarLog ( ) ;
2828 await clansExamples . RetrieveInformationAboutClansCurrentClanWar ( ) ;
2929 await clansExamples . RetrieveInformationAboutClansCurrentClanWarLeagueGroup ( ) ;
30+ await clansExamples . RetrieveClansCapitalRaidSeasons ( ) ;
3031
3132 // Access player specific information
3233 var playersExamples = new PlayersExamples ( token , playerTag ) ;
You can’t perform that action at this time.
0 commit comments