This repository hosts the SDK for the Seams-CMS delivery API.
Before installing, make sure you have an Seams-CMS account with an API key. This information is needed in the SDK.
$factory = new SeamsCMS\ClientFactory(<apiKey>, <workspace>);
$client = $factory->build();
$collection = $client->getWorkspaceCollection();
echo "Your workspace name: " . $collection->getEntries()[0]->getName() . PHP_EOL;
The image builder allows you to simply generate images based on your assets. It consists of a
fluent interface that allows you to simple add commands to the builder. When calling getSourceUrl
,
the builder will take all commands and generate a URL that points to the actual image.
$imageSrc = $imageBuilder::fromPath(<workspace>, <asset>)
->width(100)
->height(100)
->negate()
->getSourceUrl()
;
echo "<img src=\"$imageSrc\">";
Please read the CONTRIBUTION file for more information on how to contribute.
Note that when running tests, you must install all the composer packages first. Run composer install
in the current directory to install all (development) packages before running the tests.
Running all tests:
composer tests
To run only the unit-tests:
./vendor/bin/phpunit