Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/Client/ModrinthAPIClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
38 changes: 0 additions & 38 deletions src/Client/Tags/License.php

This file was deleted.

28 changes: 0 additions & 28 deletions tests/Unit/Client/Tags/TagsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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();
Expand All @@ -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");
Expand Down Expand Up @@ -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"]);
}
}
Loading