Refactor: Standardize method names across clients
Renamed methods across multiple client classes for consistency, shortening and aligning naming conventions (e.g., `CheckAttachmentsAsync` → `CheckAsync`, `ValidatePdfAsync` → `ValidateAsync`). Updated corresponding interfaces, unit tests, and documentation to reflect the new method names. Standardized method signatures to support both `Stream` and `byte[]` overloads consistently. Improved error handling in tests and updated examples in the README for batch processing and validation scenarios. Enhanced API endpoint overview for clarity.
This commit is contained in:
@@ -12,7 +12,7 @@ namespace DocumentService.Client.Clients;
|
||||
public class PdfValidationClient(HttpClient httpClient, ILogger<PdfValidationClient> logger) : BaseDocumentClient(httpClient, logger), IPdfValidationClient
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public async Task<PdfValidationResult> ValidatePdfAsync(Stream pdfStream, CancellationToken cancellationToken = default)
|
||||
public async Task<PdfValidationResult> ValidateAsync(Stream pdfStream, CancellationToken cancellationToken = default)
|
||||
{
|
||||
var result = await SendMultipartAsync<PdfValidationResult>(
|
||||
"/api/pdf/validation/validate",
|
||||
@@ -24,7 +24,7 @@ public class PdfValidationClient(HttpClient httpClient, ILogger<PdfValidationCli
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<PdfValidationResult> ValidatePdfAsync(byte[] pdfBytes, CancellationToken cancellationToken = default)
|
||||
public async Task<PdfValidationResult> ValidateAsync(byte[] pdfBytes, CancellationToken cancellationToken = default)
|
||||
{
|
||||
var request = new ValidatePdfBase64Request
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user