nerdolando-svg-api-client 1.0.2

dotnet add package nerdolando-svg-api-client --version 1.0.2                
NuGet\Install-Package nerdolando-svg-api-client -Version 1.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nerdolando-svg-api-client" Version="1.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add nerdolando-svg-api-client --version 1.0.2                
#r "nuget: nerdolando-svg-api-client, 1.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install nerdolando-svg-api-client as a Cake Addin
#addin nuget:?package=nerdolando-svg-api-client&version=1.0.2

// Install nerdolando-svg-api-client as a Cake Tool
#tool nuget:?package=nerdolando-svg-api-client&version=1.0.2                

This library converts SVG files to other graphic formats:

  • PNG
  • EPS
  • PDF
  • EMF
  • WMF

It connects to https://sevigo.eu application in order to do that.

You can use it for free. To use it:

  1. Register your api client here: https://sevigo.eu/Api
  2. Create application settings:

"SevigoApiOptions": { "ApiKey": <your API Key> }

  1. Register SevigoClient:

services.AddSevigo(Configuration.GetSection("SevigoApiOptions");

  1. Usage:

ApiClient adds itself to Dependency Injection mechanism. So you can call it like that:

using Nerdolando.SevigoApiClient; using Nerdolando.SevigoApiClient.Common;

class MyService { private readonly MainApiClient _sevigoApiClient;

public MyService(MainApiClient sevigoApiClient)
{
	_sevigoApiClient = sevigoApiClient;
}

public async Task ConvertSvg(string svgContent)
{
	var request = new ConvertFileRequest();
	request.SvgContent = svgContent;
	request.ExportType = ExportType.PNG; //or choose any other
	
	var response = await _apiClient.ConvertSvg(request);
}

}

  1. Return value You will get example response:

{ "error": "", // error message if any, may be null "statusCode": 200, //request status code, if 401 or 403 it means that your API Key is incorrect "downloadUrl": "", //url where your converted file is stored - it will be available only for 7 days "isErrorStatusCode": true/false //tells you if request has succeeded or not. }

WARNING! As Sevigo is being hosted on Azure consumption plan, SevigoApi may not always be ready to run. Thus you should wake it up first - for this call CallHealthCheck() method before your first action.

That's all! Any questions? Leave a message at: admin@sevigo.eu

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 125 9/23/2023
1.0.1 116 9/18/2023
1.0.0 131 7/14/2023