.NET 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.
docs
src
testData
.gitignore
Aspose.Diagram.Cloud.SDK.sln
README.md
build.bat

README.md

Aspose.Diagram.Cloud.SDK - the C# library for the Web API Swagger specification

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

This C# SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0
  • SDK version: 18.10
  • Build package: io.swagger.codegen.languages.CSharpClientCodegen

Frameworks supported

  • .NET 4.0 or later
  • Windows Phone 7.1 (Mango)

Dependencies

The DLLs included in the package may not be the latest version. We recommend using [NuGet] (https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:

Install-Package RestSharp
Install-Package Newtonsoft.Json

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742

Installation

Run the following command to generate the DLL

  • [Mac/Linux] /bin/sh build.sh
  • [Windows] build.bat

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

using Aspose.Diagram.Cloud.SDK.Api;
using Aspose.Diagram.Cloud.SDK.Client;
using Aspose.Diagram.Cloud.SDK.Model;

Packaging

A .nuspec is included with the project. You can follow the Nuget quickstart to create and publish packages.

This .nuspec uses placeholders from the .csproj, so build the .csproj directly:

nuget pack -Build -OutputDirectory out Aspose.Diagram.Cloud.SDK.csproj

Then, publish to a local feed or other host and consume the new package via Nuget as usual.

Getting Started

using System;
using System.Diagnostics;
using Aspose.Diagram.Cloud.SDK.Api;
using Aspose.Diagram.Cloud.SDK.Client;
using Aspose.Diagram.Cloud.SDK.Model;

namespace Example
{
    public class Example
    {
        public void main()
        {

            var apiInstance = new DiagramFileApi();
            var name = name_example;  // string | The document name.
            var format = format_example;  // string | The exported file format. (optional) 
            var folder = folder_example;  // string | The document folder. (optional) 
            var storage = storage_example;  // string | storage name. (optional) 

            try
            {
                // Read document info or export.
                System.IO.Stream result = apiInstance.DiagramFileGetDiagram(name, format, folder, storage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DiagramFileApi.DiagramFileGetDiagram: " + e.Message );
            }

        }
    }
}

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