diff --git a/cursepy/wrapper.py b/cursepy/wrapper.py index c43d92b..0948eaf 100644 --- a/cursepy/wrapper.py +++ b/cursepy/wrapper.py @@ -369,7 +369,7 @@ def get_minecraft(self) -> base.CurseGame: def sub_category(self, category_id: int) -> Tuple[base.CurseCategory, ...]: """ Returns all sub-catagories for the given category. - + We automatically pass the game ID when called, so the user can fetch sub-categories without passing a game ID. This allows us to operate like the BaseClient method for getting sub-categories. @@ -398,7 +398,7 @@ def search_resource_packs(self, search: SearchParam=None) -> Tuple[base.CurseAdd search = self.get_search() - search.categoryId = MinecraftWrapper.RESOURCE_PACKS + search.rootCategoryId = MinecraftWrapper.RESOURCE_PACKS return self.search(MinecraftWrapper.GAME_ID, search) @@ -419,7 +419,7 @@ def search_modpacks(self, search: SearchParam=None) -> Tuple[base.CurseAddon, .. search = self.get_search() - search.categoryId = MinecraftWrapper.MODPACKS + search.rootCategoryId = MinecraftWrapper.MODPACKS return self.search(MinecraftWrapper.GAME_ID, search) @@ -440,7 +440,7 @@ def search_mods(self, search: SearchParam=None) -> Tuple[base.CurseAddon, ...]: search = self.get_search() - search.categoryId = MinecraftWrapper.MODS + search.rootCategoryId = MinecraftWrapper.MODS return self.search(MinecraftWrapper.GAME_ID, search) @@ -461,7 +461,7 @@ def search_worlds(self, search: SearchParam=None) -> Tuple[base.CurseAddon, ...] search = self.get_search() - search.categoryId = MinecraftWrapper.WORLDS + search.rootCategoryId = MinecraftWrapper.WORLDS return self.search(MinecraftWrapper.GAME_ID, search) @@ -482,6 +482,6 @@ def search_plugins(self, search: SearchParam=None) -> Tuple[base.CurseAddon]: search = self.get_search() - search.categoryId = MinecraftWrapper.BUKKIT + search.rootCategoryId = MinecraftWrapper.BUKKIT return self.search(MinecraftWrapper.GAME_ID, search) diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 64dfed3..8605dda 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -17,6 +17,7 @@ Bug Fixes --------- * Fixed an issue with the MinecraftWrapper passing a category ID to the search() and iter_search() methods. +* MinecraftWrapper now uses 'rootCategoryId' instead of 'categoryId' on the SearchParam when searching 2.0.0 =====