From d98d5a74c45985d7f431db8477ce903a04ae16c4 Mon Sep 17 00:00:00 2001 From: Paul Vogel Date: Mon, 10 Nov 2025 16:41:48 +0100 Subject: [PATCH] Add optional filter NeoForgeUpdate to getForgeUpdates --- lib/Client/ModrinthAPIClient.php | 5 +++-- lib/Client/NeoForgeUpdate.php | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 lib/Client/NeoForgeUpdate.php diff --git a/lib/Client/ModrinthAPIClient.php b/lib/Client/ModrinthAPIClient.php index 7c8f1ea..a92124c 100644 --- a/lib/Client/ModrinthAPIClient.php +++ b/lib/Client/ModrinthAPIClient.php @@ -627,12 +627,13 @@ public function getStatistics(): Statistics /** * Get the forge update data for a mod * @param string $idOrSlug + * @param NeoForgeUpdate|null $neoForgeFilter * @return ForgeUpdates|InvalidInputError * @throws ApiException */ - public function getForgeUpdates(string $idOrSlug): ForgeUpdates|InvalidInputError + public function getForgeUpdates(string $idOrSlug, ?NeoForgeUpdate $neoForgeFilter = null): ForgeUpdates|InvalidInputError { - return $this->misc->forgeUpdates($idOrSlug); + return $this->misc->forgeUpdates($idOrSlug, $neoForgeFilter?->value); } /** diff --git a/lib/Client/NeoForgeUpdate.php b/lib/Client/NeoForgeUpdate.php new file mode 100644 index 0000000..ba953fb --- /dev/null +++ b/lib/Client/NeoForgeUpdate.php @@ -0,0 +1,21 @@ +