aurigma/php-asset-processor-client

PHP API Client for Asset Processor service of Customer's Canvas web-to-print system.

1.1.1 2023-11-03 11:35 UTC

This package is auto-updated.

Last update: 2024-02-03 12:06:33 UTC


README

======================================================

This module is a PHP API client for Asset Processor service which is a part of Customer's Canvas web-to-print system. It is supposed that you are familiar with its services and understand how to use its APIs. To learn more about Customer's Canvas and its services, refer the Getting Started section of its documentation.

Pre-requisites

To be able to use this package, you need to meet the following requirements:

  • You must have an account at Customer's Canvas.

For other platforms, see the Backend services article in Customer's Canvas documentation.

Installation

composer require aurigma/php-asset-processor-client

Requirements

PHP 7.2 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/aurigma/php-asset-processor-client.git"
    }
  ],
  "require": {
    "aurigma/php-asset-processor-client": "*@dev"
  }
}

Then run composer install

Getting Started

Please follow the installation procedure.

Receive an access token through your backend as explained in the documentation and deliver it to your app.

Then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new OpenAPI\Client\Api\BuildInfoApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $result = $apiInstance->buildInfoGetInfo();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BuildInfoApi->buildInfoGetInfo: ', $e->getMessage(), PHP_EOL;
}
?>

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

Aurigma Inc info@aurigma.com (https://customerscanvas.com)

API Endpoints

All URIs are relative to https://dm-assetprocessor.azurewebsites.net/

Class Method HTTP request Description
BuildInfoApi buildInfoGetInfo GET /api/processor/v1/info Gets assembly build info
BuildInfoApi buildInfoHeadInfo HEAD /api/processor/v1/info Gets assembly build info
ColorProfileProcessorApi colorProfileProcessorImportColorProfile POST /api/processor/v1/colorProfiles/import Imports color profile and saves it to storage.
ColorProfileProcessorApi colorProfileProcessorUpdate POST /api/processor/v1/colorProfiles/{id}/update Updates color profile file and metadata in storage
DataSchemaProcessorApi dataSchemaProcessorGetLinks GET /api/processor/v1/dataSchemas/{id}/links Gets all links associated with this data schema.
DataSchemaProcessorApi dataSchemaProcessorImportDataSchema POST /api/processor/v1/dataSchemas/import Imports data schema and saves it to storage.
DataSchemaProcessorApi dataSchemaProcessorUpdate POST /api/processor/v1/dataSchemas/{id}/update Updates data schema file and metadata in storage
DataSetProcessorApi dataSetProcessorCheck POST /api/processor/v1/dataSets/{id}/check Checks if data set taken from storage has any problems
DataSetProcessorApi dataSetProcessorEmbedDataSchema POST /api/processor/v1/dataSets/{id}/schema/embed Embeds linked data schema to the data set
DataSetProcessorApi dataSetProcessorExportDataSet GET /api/processor/v1/dataSets/{id}/export Exports data set
DataSetProcessorApi dataSetProcessorExtractDataSchema POST /api/processor/v1/dataSets/{id}/schema/extract Extracts data schema from data set and saves it to the specified folder
DataSetProcessorApi dataSetProcessorImportDataSet POST /api/processor/v1/dataSets/import Imports data set and saves it to storage.
DataSetProcessorApi dataSetProcessorLinkDataSchema POST /api/processor/v1/dataSets/{id}/schema/link Links data schema to the data set
DataSetProcessorApi dataSetProcessorUpdate POST /api/processor/v1/dataSets/{id}/update Updates data set file and metadata in storage
DesignProcessorApi designProcessorCheck POST /api/processor/v1/designs/{id}/check Checks if design taken from storage has any problems
DesignProcessorApi designProcessorCreateBlankDesign POST /api/processor/v1/designs/blank Creates design by product model and saves it to storage
DesignProcessorApi designProcessorEmbedDataSchema POST /api/processor/v1/designs/{id}/schema/embed Embeds linked data schema to the design file
DesignProcessorApi designProcessorExportDesign GET /api/processor/v1/designs/{id}/export Exports design file
DesignProcessorApi designProcessorExtractDataSchema POST /api/processor/v1/designs/{id}/schema/extract Extracts data schema from design file and saves it to the specified folder
DesignProcessorApi designProcessorGetDepositPhotos POST /api/processor/v1/designs/{id}/depositphotos Return information about inserted images from DepositPhotos
DesignProcessorApi designProcessorImportDesign POST /api/processor/v1/designs/import Imports design from source file and saves it to storage.
DesignProcessorApi designProcessorLinkDataSchema POST /api/processor/v1/designs/{id}/schema/link Links data schema to the design file
DesignProcessorApi designProcessorPreparePreview GET /api/processor/v1/designs/{id}/preview/{namespace}/{name}/{width}x{height} Creates preview image for design taken from storage.
DesignProcessorApi designProcessorPreparePreviewUrl GET /api/processor/v1/designs/{id}/preview/{namespace}/{name}/{width}x{height}/url Creates preview image for design taken from storage.
DesignProcessorApi designProcessorRemoveDataSchema POST /api/processor/v1/designs/{id}/schema/remove Removes data schema from the design file
DesignProcessorApi designProcessorUpdate POST /api/processor/v1/designs/{id}/update Updates design file and metadata in storage
FontProcessorApi fontProcessorImportFont POST /api/processor/v1/fonts/import Imports font from source file and saves it to storage.
FontProcessorApi fontProcessorPreparePreview GET /api/processor/v1/fonts/{id}/preview/{namespace}/{name}/{width}x{height} Creates preview image for font taken from storage.
FontProcessorApi fontProcessorPreparePreviewUrl GET /api/processor/v1/fonts/{id}/preview/{namespace}/{name}/{width}x{height}/url Creates preview image for font taken from storage.
FontProcessorApi fontProcessorUpdate POST /api/processor/v1/fonts/{id}/update Updates font file and metadata in storage
ImageProcessorApi imageProcessorImportImage POST /api/processor/v1/images/import Imports image from source file and saves it to storage.
ImageProcessorApi imageProcessorPreparePreview GET /api/processor/v1/images/{id}/preview/{namespace}/{name}/{width}x{height} Creates preview image for image taken from storage.
ImageProcessorApi imageProcessorPreparePreviewUrl GET /api/processor/v1/images/{id}/preview/{namespace}/{name}/{width}x{height}/url Creates preview image for image taken from storage.
ImageProcessorApi imageProcessorUpdate POST /api/processor/v1/images/{id}/update Updates image file and metadata in storage
IntegrationProcessorApi integrationProcessorPull GET /api/processor/v1/integration/pull/{tenantId}/{userId}/{designId} Loads design from storage (private or public)
IntegrationProcessorApi integrationProcessorPush POST /api/processor/v1/integration/push/{tenantId}/{userId}/{designId} Saves design to private storage
PrivateDesignProcessorApi privateDesignProcessorCheck POST /api/processor/v1/private-designs/{id}/check Checks if design taken from private storage has any problems
PrivateDesignProcessorApi privateDesignProcessorCreateBlankDesign POST /api/processor/v1/private-designs/blank Creates design by product model and saves it to private storage
PrivateDesignProcessorApi privateDesignProcessorEmbedDataSchema POST /api/processor/v1/private-designs/{id}/schema/embed Embeds linked data schema to the design file
PrivateDesignProcessorApi privateDesignProcessorExportDesign GET /api/processor/v1/private-designs/{id}/export Exports design file
PrivateDesignProcessorApi privateDesignProcessorExtractDataSchema POST /api/processor/v1/private-designs/{id}/schema/extract Extracts data schema from design file and saves it to the specified folder
PrivateDesignProcessorApi privateDesignProcessorGetDepositPhotos POST /api/processor/v1/private-designs/{id}/depositphotos Return information about inserted images from DepositPhotos
PrivateDesignProcessorApi privateDesignProcessorImportDesign POST /api/processor/v1/private-designs/import Imports design from source file and saves it to private storage.
PrivateDesignProcessorApi privateDesignProcessorLinkDataSchema POST /api/processor/v1/private-designs/{id}/schema/link Links data schema to the design file
PrivateDesignProcessorApi privateDesignProcessorPreparePreview GET /api/processor/v1/private-designs/{id}/preview/{namespace}/{name}/{width}x{height} Creates preview image for design taken from private storage.
PrivateDesignProcessorApi privateDesignProcessorPreparePreviewUrl GET /api/processor/v1/private-designs/{id}/preview/{namespace}/{name}/{width}x{height}/url Creates preview image for design taken from private storage.
PrivateDesignProcessorApi privateDesignProcessorRemoveDataSchema POST /api/processor/v1/private-designs/{id}/schema/remove Removes data schema from the design file
PrivateDesignProcessorApi privateDesignProcessorUpdate POST /api/processor/v1/private-designs/{id}/update Updates design file and metadata in private storage
PrivateImageProcessorApi privateImageProcessorImportImage POST /api/processor/v1/private-images/import Imports image from source file and saves it to private storage.
PrivateImageProcessorApi privateImageProcessorPreparePreview GET /api/processor/v1/private-images/{id}/preview/{namespace}/{name}/{width}x{height} Creates preview image for image taken from private storage.
PrivateImageProcessorApi privateImageProcessorPreparePreviewUrl GET /api/processor/v1/private-images/{id}/preview/{namespace}/{name}/{width}x{height}/url Creates preview image for image taken from private storage.
PrivateImageProcessorApi privateImageProcessorUpdate POST /api/processor/v1/private-images/{id}/update Updates image file and metadata in private storage

Models