cloudinary/media-editing-api

Cloudinary Media Editing API

0.2.0-beta 2022-08-01 20:09 UTC

This package is auto-updated.

Last update: 2024-11-29 06:53:01 UTC


README

Cloudinary Media Editing API

For more information, please visit https://cloudinary.com.

Installation & Usage

Requirements

PHP 7.3 and later.

Composer

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

{
  "require": {
    "cloudinary/media-editing-api": "*"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/media-editing-api/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

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



// Configure Cloudinary URL: basicAuth
$config = Cloudinary\MediaEditing\Configuration::getDefaultConfiguration()
              ->setCloudinaryUrl('cloudinary://key:secret@cloud_name');


$apiInstance = new Cloudinary\MediaEditing\Api\TransformApi(null, $config);

$transform_request = {"input_type":"url","url":"https://cloudinary-devs.github.io/cld-docs-assets/assets/images/shoes.jpg","transformation_descriptor":{"descriptor_type":"canonical","canonical_transformation":"w_500,c_scale,f_auto"}}; // \Cloudinary\MediaEditing\Model\TransformRequest

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

API Endpoints

All URIs are relative to https://api.cloudinary.com/v2/demo

Models

Authorization

basicAuth

  • Type: HTTP basic authentication

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This Cloudinary PHP package is automatically generated.

  • API version: 0.1.0-beta
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen