PommaLabs.Thumbnailer.Client
6.2.0
Prefix Reserved
dotnet add package PommaLabs.Thumbnailer.Client --version 6.2.0
NuGet\Install-Package PommaLabs.Thumbnailer.Client -Version 6.2.0
<PackageReference Include="PommaLabs.Thumbnailer.Client" Version="6.2.0" />
paket add PommaLabs.Thumbnailer.Client --version 6.2.0
#r "nuget: PommaLabs.Thumbnailer.Client, 6.2.0"
// Install PommaLabs.Thumbnailer.Client as a Cake Addin #addin nuget:?package=PommaLabs.Thumbnailer.Client&version=6.2.0 // Install PommaLabs.Thumbnailer.Client as a Cake Tool #tool nuget:?package=PommaLabs.Thumbnailer.Client&version=6.2.0
Thumbnailer Client for .NET
A .NET client for Thumbnailer, which wraps v2 endpoints under an easy to use interface.
Table of Contents
Install
NuGet package PommaLabs.Thumbnailer.Client is available for download:
dotnet add package PommaLabs.Thumbnailer.Client
Usage
Client wraps the job-based logic of v2 endpoints under a simpler interface, which hides the details of Thumbnailer jobs and exposes high-level operations such as media optimization and thumbnail generation.
When using dependency injection, client can be registered and configured using following extension method:
using Microsoft.Extensions.DependencyInjection;
using PommaLabs.Thumbnailer.Client;
services.Configure<ThumbnailerClientConfiguration>(Configuration.GetSection("Thumbnailer"));
services.AddThumbnailerClient();
After that, client will be available as an instance of IThumbnailerClient
.
Client can also be created by instancing following class, providing required objects
such as client configuration and a logger:
using PommaLabs.Thumbnailer.Client;
using PommaLabs.Thumbnailer.Client.Services.Clients;
IThumbnailerClient thumbnailerClient = new ConcreteThumbnailerClient(clientConfiguration, logger);
Media optimization can be invoked with following methods:
var optimizedMediaBytes = await thumbnailerClient.OptimizeMediaAsync(
fileContents, optionalContentType, optionalFileName, optionalCancellationToken);
var optimizedMediaBytes = await thumbnailerClient.OptimizeMediaAsync(
fileUri, optionalCancellationToken);
Thumbnail generation can be invoked with following methods:
var thumbnailBytes = await thumbnailerClient.GenerateThumbnailAsync(
fileContents, optionalContentType, optionalFileName,
/* Thumbnail generation parameters... */, optionalCancellationToken);
var thumbnailBytes = await thumbnailerClient.GenerateThumbnailAsync(
fileUri, /* Thumbnail generation parameters... */, optionalCancellationToken);
Maintainers
Contributing
MRs accepted.
Small note: If editing the README, please conform to the standard-readme specification.
Contributors
@AlessioGiacobbe implemented new client methods to access image placeholder generation endpoints, which rely on BlurHash and ThumbHash algorithms.
Editing
Visual Studio Code, with Remote Containers extension, is the recommended way to work on this project.
A development container has been configured with all required tools.
Visual Studio Community is also supported
and an updated solution file, thumbnailer-dotnet-client.sln
, has been provided.
Restoring dependencies
When opening the development container, dependencies should be automatically restored.
Anyway, dependencies can be restored with following command:
dotnet restore
Running tests
Tests can be run with following command:
dotnet test
Tests can also be run with following command, which collects coverage information:
./build.sh --target run-tests
License
MIT © 2019-2024 PommaLabs Team and Contributors
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (>= 8.0.11)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Options (>= 8.0.2)
- Newtonsoft.Json (>= 13.0.3)
- Polly.Core (>= 8.5.0)
- PommaLabs.MimeTypes (>= 2.9.6)
- System.Diagnostics.DiagnosticSource (>= 9.0.0)
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 |
---|---|---|
6.2.0 | 28 | 11/19/2024 |
6.1.3 | 441 | 3/15/2024 |
6.1.2 | 256 | 12/15/2023 |
6.1.1 | 67 | 12/14/2023 |
6.1.0 | 134 | 11/25/2023 |
6.0.0 | 161 | 6/5/2023 |
5.1.0 | 1,003 | 12/19/2022 |
5.0.0 | 92 | 11/27/2022 |
4.2.0 | 446 | 12/19/2021 |
4.1.0 | 454 | 11/21/2021 |
4.0.2 | 189 | 8/20/2021 |
3.1.0 | 1,101 | 2/7/2021 |
3.0.0 | 1,289 | 11/9/2020 |
2.1.0 | 1,064 | 9/10/2020 |
2.0.2 | 1,043 | 6/19/2020 |
2.0.1 | 988 | 6/11/2020 |
2.0.0 | 1,022 | 6/1/2020 |
1.7.1 | 1,065 | 4/13/2020 |
1.6.3 | 1,029 | 3/29/2020 |
1.6.0 | 1,081 | 3/8/2020 |