Download the PHP package seams-cms/delivery-sdk without Composer
On this page you can find all versions of the php package seams-cms/delivery-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package delivery-sdk
Seams-CMS delivery SDK for PHP
This repository hosts the SDK for the Seams-CMS delivery API.
Usage
Before installing, make sure you have an Seams-CMS account with an API key. This information is needed in the SDK.
$factory = new SeamsCMS\Delivery\ClientFactory(<apiKey>, <workspace>);
$client = $factory->build();
$collection = $client->getWorkspaceCollection();
echo "Your workspace name: " . $collection->getEntries()[0]->getName() . PHP_EOL;
Using the image builder
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\">";
Contributing
Please read the CONTRIBUTION file for more information on how to contribute.
Running tests
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
All versions of delivery-sdk with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^6.3
ocramius/generated-hydrator Version ^2.2|^3.0
psr/http-message Version ^1.0
symfony/options-resolver Version ^3.4|^4.0