Interface ICatalogsClient
Provides methods to interact with catalogs.
public interface ICatalogsClient
Methods
AcceptLicense(string)
Accepts the current license of the specified catalog.
HttpResponseMessage AcceptLicense(string catalogId)
Parameters
catalogIdstringThe catalog identifier.
Returns
AcceptLicenseAsync(string, CancellationToken)
Accepts the current license of the specified catalog.
Task<HttpResponseMessage> AcceptLicenseAsync(string catalogId, CancellationToken cancellationToken = default)
Parameters
catalogIdstringThe catalog identifier.
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
DeleteAttachment(string, string)
Deletes the specified attachment.
HttpResponseMessage DeleteAttachment(string catalogId, string attachmentId)
Parameters
Returns
DeleteAttachmentAsync(string, string, CancellationToken)
Deletes the specified attachment.
Task<HttpResponseMessage> DeleteAttachmentAsync(string catalogId, string attachmentId, CancellationToken cancellationToken = default)
Parameters
catalogIdstringThe catalog identifier.
attachmentIdstringThe attachment identifier.
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
Get(string)
Gets the specified catalog.
ResourceCatalog Get(string catalogId)
Parameters
catalogIdstringThe catalog identifier.
Returns
GetAsync(string, CancellationToken)
Gets the specified catalog.
Task<ResourceCatalog> GetAsync(string catalogId, CancellationToken cancellationToken = default)
Parameters
catalogIdstringThe catalog identifier.
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
GetAttachmentStream(string, string)
Gets the specified attachment.
HttpResponseMessage GetAttachmentStream(string catalogId, string attachmentId)
Parameters
Returns
GetAttachmentStreamAsync(string, string, CancellationToken)
Gets the specified attachment.
Task<HttpResponseMessage> GetAttachmentStreamAsync(string catalogId, string attachmentId, CancellationToken cancellationToken = default)
Parameters
catalogIdstringThe catalog identifier.
attachmentIdstringThe attachment identifier.
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
GetAttachments(string)
Gets all attachments for the specified catalog.
IReadOnlyList<string> GetAttachments(string catalogId)
Parameters
catalogIdstringThe catalog identifier.
Returns
GetAttachmentsAsync(string, CancellationToken)
Gets all attachments for the specified catalog.
Task<IReadOnlyList<string>> GetAttachmentsAsync(string catalogId, CancellationToken cancellationToken = default)
Parameters
catalogIdstringThe catalog identifier.
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
GetAvailability(string, DateTime, DateTime, TimeSpan)
Gets the specified catalog's availability.
CatalogAvailability GetAvailability(string catalogId, DateTime begin, DateTime end, TimeSpan step)
Parameters
catalogIdstringThe catalog identifier.
beginDateTimeStart date/time.
endDateTimeEnd date/time.
stepTimeSpanStep period.
Returns
GetAvailabilityAsync(string, DateTime, DateTime, TimeSpan, CancellationToken)
Gets the specified catalog's availability.
Task<CatalogAvailability> GetAvailabilityAsync(string catalogId, DateTime begin, DateTime end, TimeSpan step, CancellationToken cancellationToken = default)
Parameters
catalogIdstringThe catalog identifier.
beginDateTimeStart date/time.
endDateTimeEnd date/time.
stepTimeSpanStep period.
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
GetChildCatalogInfos(string)
Gets a list of child catalog info for the provided parent catalog identifier.
IReadOnlyList<CatalogInfo> GetChildCatalogInfos(string catalogId)
Parameters
catalogIdstringThe parent catalog identifier.
Returns
GetChildCatalogInfosAsync(string, CancellationToken)
Gets a list of child catalog info for the provided parent catalog identifier.
Task<IReadOnlyList<CatalogInfo>> GetChildCatalogInfosAsync(string catalogId, CancellationToken cancellationToken = default)
Parameters
catalogIdstringThe parent catalog identifier.
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
GetLicense(string)
Gets the license of the catalog if available.
string? GetLicense(string catalogId)
Parameters
catalogIdstringThe catalog identifier.
Returns
GetLicenseAsync(string, CancellationToken)
Gets the license of the catalog if available.
Task<string?> GetLicenseAsync(string catalogId, CancellationToken cancellationToken = default)
Parameters
catalogIdstringThe catalog identifier.
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
GetMetadata(string)
Gets the catalog metadata.
CatalogMetadata GetMetadata(string catalogId)
Parameters
catalogIdstringThe catalog identifier.
Returns
GetMetadataAsync(string, CancellationToken)
Gets the catalog metadata.
Task<CatalogMetadata> GetMetadataAsync(string catalogId, CancellationToken cancellationToken = default)
Parameters
catalogIdstringThe catalog identifier.
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
GetTimeRange(string)
Gets the specified catalog's time range.
CatalogTimeRange GetTimeRange(string catalogId)
Parameters
catalogIdstringThe catalog identifier.
Returns
GetTimeRangeAsync(string, CancellationToken)
Gets the specified catalog's time range.
Task<CatalogTimeRange> GetTimeRangeAsync(string catalogId, CancellationToken cancellationToken = default)
Parameters
catalogIdstringThe catalog identifier.
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
SearchCatalogItems(IReadOnlyList<string>)
Searches for the given resource paths and returns the corresponding catalog items.
IReadOnlyDictionary<string, CatalogItem> SearchCatalogItems(IReadOnlyList<string> resourcePaths)
Parameters
resourcePathsIReadOnlyList<string>The list of resource paths.
Returns
SearchCatalogItemsAsync(IReadOnlyList<string>, CancellationToken)
Searches for the given resource paths and returns the corresponding catalog items.
Task<IReadOnlyDictionary<string, CatalogItem>> SearchCatalogItemsAsync(IReadOnlyList<string> resourcePaths, CancellationToken cancellationToken = default)
Parameters
resourcePathsIReadOnlyList<string>The list of resource paths.
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
SetMetadata(string, CatalogMetadata)
Puts the catalog metadata.
HttpResponseMessage SetMetadata(string catalogId, CatalogMetadata metadata)
Parameters
catalogIdstringThe catalog identifier.
metadataCatalogMetadataThe catalog metadata to set.
Returns
SetMetadataAsync(string, CatalogMetadata, CancellationToken)
Puts the catalog metadata.
Task<HttpResponseMessage> SetMetadataAsync(string catalogId, CatalogMetadata metadata, CancellationToken cancellationToken = default)
Parameters
catalogIdstringThe catalog identifier.
metadataCatalogMetadataThe catalog metadata to set.
cancellationTokenCancellationTokenThe token to cancel the current operation.
Returns
UploadAttachment(string, string, Stream)
Uploads the specified attachment.
HttpResponseMessage UploadAttachment(string catalogId, string attachmentId, Stream content)
Parameters
catalogIdstringThe catalog identifier.
attachmentIdstringThe attachment identifier.
contentStreamThe binary file content.
Returns
UploadAttachmentAsync(string, string, Stream, CancellationToken)
Uploads the specified attachment.
Task<HttpResponseMessage> UploadAttachmentAsync(string catalogId, string attachmentId, Stream content, CancellationToken cancellationToken = default)
Parameters
catalogIdstringThe catalog identifier.
attachmentIdstringThe attachment identifier.
contentStreamThe binary file content.
cancellationTokenCancellationTokenThe token to cancel the current operation.