Skip to content
PHP library for communicating with the Aspose.Diagram Cloud API
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Examples
docs
lib
test/Api
testData
.gitignore
.php_cs
.travis.yml
README.md
composer.json
composer.lock
phpunit.xml.dist

README.md

Aspose.Diagram.Cloud

Requirements

PHP 5.5 and later

Installation & Usage

Composer

diagram-sdk-php is available on Packagist as the diagram-sdk-php package. Run the following command:

composer require aspose/diagram-sdk-php

To use the SDK, use Composer's autoload:

require_once('vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

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

$apiInstance = new Aspose\Diagram\Cloud\Api\DiagramFileApi(
    // 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()
);
$name = "name_example"; // string | The document name.
$format = "format_example"; // string | The exported file format.
$folder = "folder_example"; // string | The document folder.
$storage = "storage_example"; // string | storage name.

try {
    $result = $apiInstance->diagramFileGetDiagram($name, $format, $folder, $storage);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DiagramFileApi->diagramFileGetDiagram: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://api.aspose.cloud/v1.1/

Class Method HTTP request Description
DiagramFileApi diagramFileGetDiagram GET /diagram/{name} Read document info or export.
DiagramFileApi diagramFilePostSaveAs POST /diagram/{name}/SaveAs Convert document and save result to storage.
DiagramFileApi diagramFilePutCreate PUT /diagram/{name} Create new diagram and save result to storage.
DiagramFileApi diagramFilePutUpload PUT /diagram/{name}/upload Upload file and save result to storage.
OAuthApi oAuthPost POST /oauth2/token Get Access token

Documentation For Models

Documentation For Authorization

appsid

  • Type: API key
  • API key parameter name: appsid
  • Location: URL query string

oauth

  • Type: OAuth
  • Flow: implicit
  • Authorization URL:
  • Scopes:
  • write:pets: modify pets in your account

signature

  • Type: API key
  • API key parameter name: signature
  • Location: URL query string

Resources

You can’t perform that action at this time.