|
| 1 | +# Aspose.Diagram.Cloud.SDK - the C# library for the Web API Swagger specification |
| 2 | + |
| 3 | +No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) |
| 4 | + |
| 5 | +This C# SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: |
| 6 | + |
| 7 | +- API version: 1.0 |
| 8 | +- SDK version: 18.10 |
| 9 | +- Build package: io.swagger.codegen.languages.CSharpClientCodegen |
| 10 | + |
| 11 | +<a name="frameworks-supported"></a> |
| 12 | +## Frameworks supported |
| 13 | +- .NET 4.0 or later |
| 14 | +- Windows Phone 7.1 (Mango) |
| 15 | + |
| 16 | +<a name="dependencies"></a> |
| 17 | +## Dependencies |
| 18 | +- [RestSharp](https://www.nuget.org/packages/RestSharp) - 105.1.0 or later |
| 19 | +- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 9.0.1 or later |
| 20 | + |
| 21 | +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: |
| 22 | +``` |
| 23 | +Install-Package RestSharp |
| 24 | +Install-Package Newtonsoft.Json |
| 25 | +``` |
| 26 | + |
| 27 | +NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742) |
| 28 | + |
| 29 | +<a name="installation"></a> |
| 30 | +## Installation |
| 31 | +Run the following command to generate the DLL |
| 32 | +- [Mac/Linux] `/bin/sh build.sh` |
| 33 | +- [Windows] `build.bat` |
| 34 | + |
| 35 | +Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: |
| 36 | +```csharp |
| 37 | +using Aspose.Diagram.Cloud.SDK.Api; |
| 38 | +using Aspose.Diagram.Cloud.SDK.Client; |
| 39 | +using Aspose.Diagram.Cloud.SDK.Model; |
| 40 | +``` |
| 41 | +<a name="packaging"></a> |
| 42 | +## Packaging |
| 43 | + |
| 44 | +A `.nuspec` is included with the project. You can follow the Nuget quickstart to [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#create-the-package) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#publish-the-package) packages. |
| 45 | + |
| 46 | +This `.nuspec` uses placeholders from the `.csproj`, so build the `.csproj` directly: |
| 47 | + |
| 48 | +``` |
| 49 | +nuget pack -Build -OutputDirectory out Aspose.Diagram.Cloud.SDK.csproj |
| 50 | +``` |
| 51 | + |
| 52 | +Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) or [other host](https://docs.microsoft.com/en-us/nuget/hosting-packages/overview) and consume the new package via Nuget as usual. |
| 53 | + |
| 54 | +<a name="getting-started"></a> |
| 55 | +## Getting Started |
| 56 | + |
| 57 | +```csharp |
| 58 | +using System; |
| 59 | +using System.Diagnostics; |
| 60 | +using Aspose.Diagram.Cloud.SDK.Api; |
| 61 | +using Aspose.Diagram.Cloud.SDK.Client; |
| 62 | +using Aspose.Diagram.Cloud.SDK.Model; |
| 63 | + |
| 64 | +namespace Example |
| 65 | +{ |
| 66 | + public class Example |
| 67 | + { |
| 68 | + public void main() |
| 69 | + { |
| 70 | + |
| 71 | + var apiInstance = new DiagramFileApi(); |
| 72 | + var name = name_example; // string | The document name. |
| 73 | + var format = format_example; // string | The exported file format. (optional) |
| 74 | + var folder = folder_example; // string | The document folder. (optional) |
| 75 | + var storage = storage_example; // string | storage name. (optional) |
| 76 | +
|
| 77 | + try |
| 78 | + { |
| 79 | + // Read document info or export. |
| 80 | + System.IO.Stream result = apiInstance.DiagramFileGetDiagram(name, format, folder, storage); |
| 81 | + Debug.WriteLine(result); |
| 82 | + } |
| 83 | + catch (Exception e) |
| 84 | + { |
| 85 | + Debug.Print("Exception when calling DiagramFileApi.DiagramFileGetDiagram: " + e.Message ); |
| 86 | + } |
| 87 | + |
| 88 | + } |
| 89 | + } |
| 90 | +} |
| 91 | +``` |
| 92 | + |
| 93 | +<a name="documentation-for-api-endpoints"></a> |
| 94 | +## Documentation for API Endpoints |
| 95 | + |
| 96 | +All URIs are relative to *https://api.aspose.cloud/v1.1/* |
| 97 | + |
| 98 | +Class | Method | HTTP request | Description |
| 99 | +------------ | ------------- | ------------- | ------------- |
| 100 | +*DiagramFileApi* | [**DiagramFileGetDiagram**](docs/DiagramFileApi.md#diagramfilegetdiagram) | **GET** /diagram/{name} | Read document info or export. |
| 101 | +*DiagramFileApi* | [**DiagramFilePostSaveAs**](docs/DiagramFileApi.md#diagramfilepostsaveas) | **POST** /diagram/{name}/SaveAs | Convert document and save result to storage. |
| 102 | +*DiagramFileApi* | [**DiagramFilePutCreate**](docs/DiagramFileApi.md#diagramfileputcreate) | **PUT** /diagram/{name} | Create new diagram and save result to storage. |
| 103 | +*DiagramFileApi* | [**DiagramFilePutUpload**](docs/DiagramFileApi.md#diagramfileputupload) | **PUT** /diagram/{name}/upload | Upload file and save result to storage. |
| 104 | +*OAuthApi* | [**OAuthPost**](docs/OAuthApi.md#oauthpost) | **POST** /oauth2/token | Get Access token |
| 105 | + |
| 106 | + |
| 107 | +<a name="documentation-for-models"></a> |
| 108 | +## Documentation for Models |
| 109 | + |
| 110 | + - [Model.AccessTokenResponse](docs/AccessTokenResponse.md) |
| 111 | + - [Model.DiagramModel](docs/DiagramModel.md) |
| 112 | + - [Model.FileFormatRequest](docs/FileFormatRequest.md) |
| 113 | + - [Model.Link](docs/Link.md) |
| 114 | + - [Model.PageModel](docs/PageModel.md) |
| 115 | + - [Model.SaaSposeResponse](docs/SaaSposeResponse.md) |
| 116 | + - [Model.SaveResult](docs/SaveResult.md) |
| 117 | + - [Model.SharpModel](docs/SharpModel.md) |
| 118 | + - [Model.DiagramResponse](docs/DiagramResponse.md) |
| 119 | + - [Model.SaveResponse](docs/SaveResponse.md) |
| 120 | + |
| 121 | + |
| 122 | +<a name="documentation-for-authorization"></a> |
| 123 | +## Documentation for Authorization |
| 124 | + |
| 125 | +<a name="appsid"></a> |
| 126 | +### appsid |
| 127 | + |
| 128 | +- **Type**: API key |
| 129 | +- **API key parameter name**: appsid |
| 130 | +- **Location**: URL query string |
| 131 | + |
| 132 | +<a name="oauth"></a> |
| 133 | +### oauth |
| 134 | + |
| 135 | +- **Type**: OAuth |
| 136 | +- **Flow**: implicit |
| 137 | +- **Authorization URL**: |
| 138 | +- **Scopes**: |
| 139 | + - write:pets: modify pets in your account |
| 140 | + |
| 141 | +<a name="signature"></a> |
| 142 | +### signature |
| 143 | + |
| 144 | +- **Type**: API key |
| 145 | +- **API key parameter name**: signature |
| 146 | +- **Location**: URL query string |
| 147 | + |
0 commit comments