Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
b04da8b
feat: add new spell & equipment
MagicTheDev Jul 8, 2025
0115c24
feat: add war equality
MagicTheDev Jul 8, 2025
af1c4b6
feat: add type hinting
MagicTheDev Jul 9, 2025
9bdc705
feat: add eq
MagicTheDev Jul 9, 2025
cddbd73
feat: add async iterator for season rankings
MagicTheDev Jul 21, 2025
8baa8d9
feat: add new & reworked static files
MagicTheDev Jul 28, 2025
4dc84be
feat: add new & reworked static files
MagicTheDev Jul 28, 2025
214eba4
feat: add new & reworked static files
MagicTheDev Jul 29, 2025
9964244
feat: add new & reworked static files
MagicTheDev Oct 13, 2025
2b56305
feat: add new & reworked static files
MagicTheDev Oct 20, 2025
73719a8
feat: add new & reworked static files
MagicTheDev Oct 20, 2025
17195f3
feat: add new & reworked static files
MagicTheDev Oct 20, 2025
071d7f3
feat: add new & reworked static files
MagicTheDev Oct 20, 2025
2434a95
feat: revamped static data
MagicTheDev Nov 28, 2025
7aafb95
docs: update to v4.0
MagicTheDev Nov 28, 2025
dce8c69
feat: new classes for static data
MagicTheDev Nov 28, 2025
6a1a69e
feat: add new enums for static data + new game content
MagicTheDev Nov 28, 2025
87be7ce
feat: add new "dataclass"
MagicTheDev Nov 28, 2025
1999337
feat: make changes for new statc data parsing/passthru
MagicTheDev Nov 28, 2025
c3e4f59
refactor: classes compatible with new static data
MagicTheDev Nov 28, 2025
c4971e0
feat: add TID class for translation
MagicTheDev Nov 28, 2025
c56a3a4
fix: few fixes to tests for class changes
MagicTheDev Nov 28, 2025
2e43096
chore: remove unused classes
MagicTheDev Nov 28, 2025
3b039e3
feat: parser core code
MagicTheDev Nov 28, 2025
a067541
chore: cleanup
MagicTheDev Nov 28, 2025
c132099
feat: move supercharge data to under the relevant building, reducing …
MagicTheDev Nov 28, 2025
8839c3a
feat: cleanup + add minimum level checks on lookup
MagicTheDev Nov 28, 2025
304861a
chore: remove unused file
MagicTheDev Nov 28, 2025
b2951f9
chore: remove unused imports
MagicTheDev Nov 28, 2025
7414bd5
feat: Army Recipe support
MagicTheDev Nov 28, 2025
e309ca2
feat: army recipe support + update get_item methods w/ new_static data
MagicTheDev Nov 28, 2025
5f799b9
refactor: use leagueTier data
MagicTheDev Nov 28, 2025
9818412
feat: add achievements + ability to generate constants file
MagicTheDev Nov 29, 2025
dbc2f83
feat: generated constants
MagicTheDev Nov 29, 2025
2dbcb4c
feat: add achievements data
MagicTheDev Nov 29, 2025
994cd14
refactor: rename field to "village"
MagicTheDev Nov 29, 2025
f04a2da
feat: add SceneryType
MagicTheDev Nov 29, 2025
218fe7b
chore: remove equipment lookup
MagicTheDev Nov 29, 2025
dd6924e
chore: remove unused runtime check + create_army_link()
MagicTheDev Nov 29, 2025
788eeee
refactor: rename village field
MagicTheDev Nov 29, 2025
9a44f85
chore: update import for constants
MagicTheDev Nov 29, 2025
6eb4747
feat: add static cwl group data
MagicTheDev Nov 29, 2025
a9a38af
docs: add docstrings
MagicTheDev Nov 29, 2025
db53a9f
refactor: remove unused file
MagicTheDev Nov 29, 2025
73a16b4
chore: cleanup imports
MagicTheDev Nov 29, 2025
beb7fd4
chore: cleanup imports
MagicTheDev Nov 29, 2025
c57e57d
fix: super troop order list
MagicTheDev Nov 29, 2025
713c50c
chore: clean up imports
MagicTheDev Nov 29, 2025
e2f9035
feat: add translation support
MagicTheDev Nov 29, 2025
9c151f1
docs: add docstrings to new classes & functions
MagicTheDev Nov 29, 2025
a3a4593
docs: update static data docs
MagicTheDev Nov 29, 2025
e41a560
docs: update docs with missing classes
MagicTheDev Nov 29, 2025
120a9f5
refactor: use level 0 for lowest available level
MagicTheDev Nov 29, 2025
69e2f03
feat: add _id to league tiers, have house slot type match API, & add …
MagicTheDev Nov 29, 2025
efb78b6
fix: correct management of no loot resource
MagicTheDev Nov 29, 2025
db1a768
feat: allow initalization of minimum level item
MagicTheDev Nov 29, 2025
7b30fc7
fix: add missing resource type
MagicTheDev Nov 29, 2025
427c2f5
chore: formatting
MagicTheDev Nov 29, 2025
695e96f
feat: add is_ checks for home base, builder base & siege machine
MagicTheDev Nov 29, 2025
2c603d9
refactor: remove max_level from subclasses
MagicTheDev Nov 29, 2025
f4dfbea
fix: use value as fallback for str
MagicTheDev Nov 29, 2025
f1c7a65
feat: add static holder
MagicTheDev Nov 29, 2025
14d94f9
feat: calc max_level in base class
MagicTheDev Nov 29, 2025
2333c79
fix: load data
MagicTheDev Nov 29, 2025
b660325
refactor: rename class
MagicTheDev Nov 29, 2025
f637a39
refactor: rename file
MagicTheDev Nov 29, 2025
650f9fe
docs: add static classes
MagicTheDev Nov 29, 2025
349054c
docs: add static classes
MagicTheDev Nov 29, 2025
f7d8742
Merge remote-tracking branch 'origin/master'
MagicTheDev Nov 29, 2025
6ed3d8f
fix: enum capitalization
MagicTheDev Nov 29, 2025
19776fb
fix: seasonal defense data changes
MagicTheDev Nov 29, 2025
bcda6da
fix: seasonal defense data changes
MagicTheDev Nov 29, 2025
68df429
fix: add missing resource type
MagicTheDev Nov 29, 2025
3ddaaa5
fix: add missing resource type
MagicTheDev Nov 29, 2025
585109d
fix: spelling
MagicTheDev Nov 29, 2025
822fc19
refactor: remove siege machines
MagicTheDev Nov 29, 2025
5a30be1
docs: alphabetical
MagicTheDev Nov 29, 2025
a2a4226
docs: v4
MagicTheDev Nov 29, 2025
8f06e7d
docs: v4
MagicTheDev Nov 29, 2025
fa884f3
refactor: remove _TID
MagicTheDev Nov 29, 2025
cf8e828
refactor: explicit language types
MagicTheDev Nov 29, 2025
fac49d8
fix: lookup error
MagicTheDev Nov 29, 2025
82ae211
fix: re-add equipment to hero
MagicTheDev Nov 29, 2025
06185b5
feat: better attribute error
MagicTheDev Nov 29, 2025
a699098
fix: lookup error
MagicTheDev Nov 29, 2025
e676ab1
feat: add base boolean to heroes
MagicTheDev Nov 30, 2025
0682fa5
feat: add base boolean to heroes
MagicTheDev Nov 30, 2025
23ef5c3
fix: fixes for lv 1 bb troops
MagicTheDev Nov 30, 2025
5de1ce4
Resolve merge conflicts with upstream
MagicTheDev Nov 30, 2025
e1caae4
fix: remove uv.lock
MagicTheDev Nov 30, 2025
0c605bd
chore: delete test file
MagicTheDev Nov 30, 2025
e04d646
chore: formatting
MagicTheDev Nov 30, 2025
f0a0b90
chore: formatting
MagicTheDev Nov 30, 2025
b93a43c
feat: add village + ui priority to achievements, sorted as in-game
MagicTheDev Nov 30, 2025
6ed419a
Remove .DS_Store from tracking and add to .gitignore
MagicTheDev Nov 30, 2025
f9ac158
fix: have hero order be unlock order
MagicTheDev Nov 30, 2025
decf693
feat: upgrade time parser + rename build_cost/time
MagicTheDev Nov 30, 2025
aa1119d
feat: rename upgrade_cost to build_cost for leveled structures
MagicTheDev Nov 30, 2025
32533ae
refactor: move to mock data
MagicTheDev Nov 30, 2025
49653f7
fix: remove gender
MagicTheDev Nov 30, 2025
70b2f3b
feat: add clanCapital village type + add to achievements
MagicTheDev Nov 30, 2025
c2c64e3
feat: update league path
MagicTheDev Nov 30, 2025
1bf9308
feat: update league path
MagicTheDev Nov 30, 2025
467ba21
feat: set builder base league to None of no bb league
MagicTheDev Nov 30, 2025
7bed2b0
feat: set bb league fallback
MagicTheDev Nov 30, 2025
11484c0
feat: set bb league fallback
MagicTheDev Nov 30, 2025
d4ae794
fix: remove old enum
MagicTheDev Dec 1, 2025
d7a0c88
fix: remove old enum
MagicTheDev Dec 1, 2025
12e8230
feat: rename build/upgrade cost field
MagicTheDev Dec 1, 2025
c17d9a5
Remove Gender enum documentation
MagicTheDev Dec 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# macOS system files
.DS_Store

# Byte-compiled / optimized / DLL files
.idea/
__pycache__/
Expand Down
Binary file added coc/.DS_Store
Binary file not shown.
53 changes: 34 additions & 19 deletions coc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,40 @@
SOFTWARE.
"""

__version__ = "3.10.0"
__version__ = "4.0.0"

from .abc import BasePlayer, BaseClan
from .buildings import (
Building,
GearUp,
MergeRequirement,
SeasonalDefenseModule,
SeasonalDefense,
Supercharge,
TownhallUnlock,
TownhallWeapon,
Trap,
)
from .characters import Guardian, Helper
from .clans import RankedClan, Clan
from .client import Client
from .constants import *
from .cosmetics import Skin, Scenery, Obstacle, Decoration, ClanCapitalHousePart
from .events import PlayerEvents, ClanEvents, WarEvents, EventsClient, ClientEvents
from .enums import (
PlayerHouseElementType,
Resource,
Role,
WarRound,
ACHIEVEMENT_ORDER,
BUILDER_TROOPS_ORDER,
HERO_ORDER,
PETS_ORDER,
ELIXIR_TROOP_ORDER,
DARK_ELIXIR_TROOP_ORDER,
HOME_TROOP_ORDER,
SIEGE_MACHINE_ORDER,
ELIXIR_SPELL_ORDER,
DARK_ELIXIR_SPELL_ORDER,
SPELL_ORDER,
SUPER_TROOP_ORDER,
UNRANKED_LEAGUE_DATA,
WarState,
BattleModifier,
WarResult,
ProductionBuildingType,
BuildingType,
VillageType,
SceneryType,
EquipmentRarity,
SkinTier
)
from .errors import (
ClashOfClansException,
Expand All @@ -58,30 +68,35 @@
GatewayError,
PrivateWarLog,
)
from .game_data import AccountData, Upgrade, Boosts, ArmyRecipe, HeroLoadout, StaticData
from .hero import Equipment, Hero, Pet
from .http import BasicThrottler, BatchThrottler, HTTPClient
from .iterators import (
ClanIterator,
PlayerIterator,
ClanWarIterator,
PlayerIterator,
LeagueWarIterator,
CurrentWarIterator,
)
from .miscmodels import (
Achievement,
Badge,
BaseLeague,
CapitalDistrict,
Icon,
ChatLanguage,
GoldPassSeason,
Icon,
Label,
League,
LegendStatistics,
LoadGameData,
Location,
PlayerHouseElement,
Season,
Timestamp,
TimeDelta,
Label,
BaseLeague
TID,
Translation
)
from .players import Player, ClanMember, RankedPlayer
from .player_clan import PlayerClan
Expand All @@ -91,5 +106,5 @@
from .war_clans import WarClan, ClanWarLeagueClan
from .war_attack import WarAttack
from .war_members import ClanWarLeagueClanMember, ClanWarMember
from .wars import ClanWar, ClanWarLogEntry, ClanWarLeagueGroup
from .wars import ClanWar, ClanWarLogEntry, ClanWarLeagueGroup, ExtendedCWLGroup
from . import utils
Loading
Loading