Skip to content

Commit 9d443f4

Browse files
committed
getProjectVersionFromIdOrNumber
1 parent a722647 commit 9d443f4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/Client/ModrinthAPIClient.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,18 @@ public function getProjectDependencies(string $idOrSlug): ProjectDependencies
227227
return new ProjectDependencies($this, $this->projects->getDependencies($idOrSlug));
228228
}
229229

230+
/**
231+
* Get a project's version by ID or number
232+
* @param string $idOrSlug
233+
* @param string $version
234+
* @return Version
235+
* @throws ApiException
236+
*/
237+
public function getProjectVersionFromIdOrNumber(string $idOrSlug, string $version): Version
238+
{
239+
return new Version($this, $this->versions->getVersionFromIdOrNumber($idOrSlug, $version));
240+
}
241+
230242
/**
231243
* Get all versions of a project
232244
* @param string $idOrSlug Project ID or slug

0 commit comments

Comments
 (0)