diff --git a/README.md b/README.md index da6d3e6..0bd07be 100644 --- a/README.md +++ b/README.md @@ -331,9 +331,6 @@ Other tags: $sideTypes = $modrinthClient->getSideTypes(); $donationPlatforms = $modrinthClient->getDonationPlatforms(); $reportTypes = $modrinthClient->getReportTypes(); - -// get the full text of a license by its SPDX id -$licenseText = $modrinthClient->getLicenseText("MIT"); ``` ## Updating the generated code diff --git a/src/Client/ModrinthAPIClient.php b/src/Client/ModrinthAPIClient.php index afb461a..63e28ee 100644 --- a/src/Client/ModrinthAPIClient.php +++ b/src/Client/ModrinthAPIClient.php @@ -17,7 +17,6 @@ use Aternos\ModrinthApi\Client\Tags\Category; use Aternos\ModrinthApi\Client\Tags\DonationPlatform; use Aternos\ModrinthApi\Client\Tags\GameVersion; -use Aternos\ModrinthApi\Client\Tags\License; use Aternos\ModrinthApi\Client\Tags\Loader; use Aternos\ModrinthApi\Client\Tags\ProjectType; use Aternos\ModrinthApi\Client\Threads\Report; @@ -34,7 +33,6 @@ use Aternos\ModrinthApi\Model\GetLatestVersionsFromHashesBody; use Aternos\ModrinthApi\Model\HashList; use Aternos\ModrinthApi\Model\InvalidInputError; -use Aternos\ModrinthApi\Model\LicenseTag; use Aternos\ModrinthApi\Model\LoaderTag; use Aternos\ModrinthApi\Model\ModifyReportRequest; use Aternos\ModrinthApi\Model\Notification as NotificationModel; diff --git a/src/Client/Tags/License.php b/src/Client/Tags/License.php deleted file mode 100644 index 504d751..0000000 --- a/src/Client/Tags/License.php +++ /dev/null @@ -1,38 +0,0 @@ -container); - } - - /** - * Convert this loader to a facet to use it in a search - * @return Facet - */ - public function toFacet(): Facet - { - return new Facet(FacetType::LICENSE, $this->getShort()); - } - - function getClient(): ModrinthAPIClient - { - return $this->client; - } -} diff --git a/tests/Unit/Client/Tags/TagsTest.php b/tests/Unit/Client/Tags/TagsTest.php index d88c6e6..0b5dbaa 100644 --- a/tests/Unit/Client/Tags/TagsTest.php +++ b/tests/Unit/Client/Tags/TagsTest.php @@ -12,13 +12,11 @@ use Aternos\ModrinthApi\Client\Tags\Category; use Aternos\ModrinthApi\Client\Tags\DonationPlatform; use Aternos\ModrinthApi\Client\Tags\GameVersion; -use Aternos\ModrinthApi\Client\Tags\License; use Aternos\ModrinthApi\Client\Tags\Loader; use Aternos\ModrinthApi\Client\Tags\ProjectType; use Aternos\ModrinthApi\Model\CategoryTag; use Aternos\ModrinthApi\Model\DonationPlatformTag; use Aternos\ModrinthApi\Model\GameVersionTag; -use Aternos\ModrinthApi\Model\LicenseTag; use Aternos\ModrinthApi\Model\LoaderTag; use Aternos\ModrinthApi\Tests\Unit\Client\ClientTestCase; @@ -66,14 +64,6 @@ protected function gameVersion(ModrinthAPIClient $client): GameVersion ])); } - protected function license(ModrinthAPIClient $client): License - { - return new License($client, new LicenseTag([ - "short" => "MIT", - "name" => "MIT License", - ])); - } - public function testCategoryToFacet(): void { $facet = $this->category($this->createClient())->toFacet(); @@ -100,14 +90,6 @@ public function testGameVersionToFacet(): void $this->assertEquals("1.20.1", $facet->getValue()); } - public function testLicenseToFacet(): void - { - $facet = $this->license($this->createClient())->toFacet(); - - $this->assertEquals(FacetType::LICENSE, $facet->getType()); - $this->assertEquals("MIT", $facet->getValue()); - } - public function testProjectTypeGetNameAndToFacet(): void { $projectType = new ProjectType($this->createClient(), "modpack"); @@ -174,14 +156,4 @@ public function testProjectTypeSearchProjects(): void parse_str($this->getRequest()->getUri()->getQuery(), $query); $this->assertEquals('[["project_type = shader"]]', $query["facets"]); } - - public function testLicenseSearchProjects(): void - { - $client = $this->createClient([$this->emptySearchResponse()]); - - $this->license($client)->searchProjects(); - - parse_str($this->getRequest()->getUri()->getQuery(), $query); - $this->assertEquals('[["license = MIT"]]', $query["facets"]); - } }