feat: Add specialized client implementations for PDF operations
This commit is contained in:
48
DocumentService.Client/Clients/PdfConversionClient.cs
Normal file
48
DocumentService.Client/Clients/PdfConversionClient.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using DocumentService.Client.Interfaces;
|
||||
using DocumentService.Client.Models.Requests;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Net.Http;
|
||||
|
||||
namespace DocumentService.Client.Clients;
|
||||
|
||||
/// <summary>
|
||||
/// Implementation of PDF conversion client (PDF ? PDF/A).
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// All methods throw <see cref="NotImplementedException"/> because the corresponding
|
||||
/// API endpoints are not yet implemented on the server side.
|
||||
/// </remarks>
|
||||
public class PdfConversionClient(HttpClient httpClient, ILogger<PdfConversionClient> logger) : BaseDocumentClient(httpClient, logger), IPdfConversionClient
|
||||
{
|
||||
/// <inheritdoc />
|
||||
[Obsolete("API endpoint not implemented yet")]
|
||||
public Task<Stream> ConvertToPdfAAsync(Stream pdfStream, string pdfALevel = "PDF/A-3b", CancellationToken cancellationToken = default)
|
||||
{
|
||||
Logger.LogWarning("ConvertToPdfA endpoint is not implemented yet in API");
|
||||
throw new NotImplementedException("API endpoint POST /api/pdf/conversion/to-pdfa is not implemented yet");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[Obsolete("API endpoint not implemented yet")]
|
||||
public Task<Stream> ConvertToPdfAAsync(byte[] pdfBytes, string pdfALevel = "PDF/A-3b", CancellationToken cancellationToken = default)
|
||||
{
|
||||
Logger.LogWarning("ConvertToPdfA endpoint is not implemented yet in API");
|
||||
throw new NotImplementedException("API endpoint POST /api/pdf/conversion/to-pdfa is not implemented yet");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[Obsolete("API endpoint not implemented yet")]
|
||||
public Task<Stream> ConvertFromPdfAAsync(Stream pdfStream, CancellationToken cancellationToken = default)
|
||||
{
|
||||
Logger.LogWarning("ConvertFromPdfA endpoint is not implemented yet in API");
|
||||
throw new NotImplementedException("API endpoint POST /api/pdf/conversion/from-pdfa is not implemented yet");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
[Obsolete("API endpoint not implemented yet")]
|
||||
public Task<Stream> ConvertFromPdfAAsync(byte[] pdfBytes, CancellationToken cancellationToken = default)
|
||||
{
|
||||
Logger.LogWarning("ConvertFromPdfA endpoint is not implemented yet in API");
|
||||
throw new NotImplementedException("API endpoint POST /api/pdf/conversion/from-pdfa is not implemented yet");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user