@@ -223,8 +223,7 @@ public function checkProjectValidity(string $idOrSlug): ?string
223223 {
224224 try {
225225 return $ this ->projects ->checkProjectValidity ($ idOrSlug )->getId ();
226- }
227- catch (ApiException $ exception ) {
226+ } catch (ApiException $ exception ) {
228227 if ($ exception ->getCode () === 404 ) {
229228 return null ;
230229 }
@@ -258,17 +257,19 @@ public function getProjectVersionFromIdOrNumber(string $idOrSlug, string $versio
258257 /**
259258 * Get all versions of a project
260259 * @param string $idOrSlug Project ID or slug
261- * @param string[]|null $loaders only show versions for any of these loaders // TODO: enum??
260+ * @param string[]|null $loaders only show versions for any of these loaders
262261 * @param string[]|null $gameVersions
263262 * @param bool|null $featured
263+ * @param bool|null $include_changelog whether to include changelogs in the response. Currently defaults to true on modrinth side.
264264 * @return Version[]
265265 * @throws ApiException
266266 */
267267 public function getProjectVersions (
268268 string $ idOrSlug ,
269269 ?array $ loaders = null ,
270270 ?array $ gameVersions = null ,
271- ?bool $ featured = null
271+ ?bool $ featured = null ,
272+ ?bool $ include_changelog = null ,
272273 ): array
273274 {
274275 return array_map (function (VersionModel $ version ): Version {
@@ -277,7 +278,8 @@ public function getProjectVersions(
277278 $ idOrSlug ,
278279 $ loaders ? json_encode ($ loaders ) : null ,
279280 $ gameVersions ? json_encode ($ gameVersions ) : null ,
280- $ featured
281+ $ featured ,
282+ $ include_changelog ,
281283 ));
282284 }
283285
@@ -366,9 +368,9 @@ public function getLatestVersionFromHash(
366368 * @throws ApiException
367369 */
368370 public function getLatestVersionsFromHashes (
369- array $ hashes ,
370- array $ loaders ,
371- array $ gameVersions ,
371+ array $ hashes ,
372+ array $ loaders ,
373+ array $ gameVersions ,
372374 HashAlgorithm $ algorithm = HashAlgorithm::SHA1
373375 ): array
374376 {
0 commit comments