Java library for communicating with the Aspose.Diagram Cloud API
Switch branches/tags
Nothing to show
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.
.swagger-codegen
RemoteSystemsTempFiles
docs
gradle/wrapper
src
testData
.classpath
.gitignore
.project
.swagger-codegen-ignore
.travis.yml
README.md
build.gradle
build.sbt
gradle.properties
gradlew
gradlew.bat
pom.xml
settings.gradle

README.md

aspose-Diagram-cloud

Requirements

Building the API client library requires Maven to be installed.

Installation

To install the API client library to your local Maven repository, simply execute:

mvn install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn deploy

Refer to the official documentation for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-Diagram-cloud</artifactId>
    <version>18.10</version>
    <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "com.aspose:aspose-Diagram-cloud:18.10"

Others

At first generate the JAR by executing:

mvn package

Then manually install the following JARs:

  • target/aspose-Diagram-cloud-18.10.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

import com.aspose.cloud.diagram.client.*;
import com.aspose.cloud.diagram.client.auth.*;
import com.aspose.cloud.diagram.model.*;
import com.aspose.cloud.diagram.api.DiagramFileApi;

import java.io.File;
import java.util.*;

public class DiagramFileApiExample {

    public static void main(String[] args) {
        
        DiagramFileApi apiInstance = new DiagramFileApi();
        String name = "name_example"; // String | The document name.
        String format = "format_example"; // String | The exported file format.
        String folder = "folder_example"; // String | The document folder.
        String storage = "storage_example"; // String | storage name.
        try {
            File result = apiInstance.diagramFileGetDiagram(name, format, folder, storage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DiagramFileApi#diagramFileGetDiagram");
            e.printStackTrace();
        }
    }
}

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

Authentication schemes defined for the API:

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

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author