Table of Contents

Interface ICatalogsClient

Namespace
Nexus.Api.V1
Assembly
Nexus.Api.dll

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

catalogId string

The catalog identifier.

Returns

HttpResponseMessage

AcceptLicenseAsync(string, CancellationToken)

Accepts the current license of the specified catalog.

Task<HttpResponseMessage> AcceptLicenseAsync(string catalogId, CancellationToken cancellationToken = default)

Parameters

catalogId string

The catalog identifier.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<HttpResponseMessage>

DeleteAttachment(string, string)

Deletes the specified attachment.

HttpResponseMessage DeleteAttachment(string catalogId, string attachmentId)

Parameters

catalogId string

The catalog identifier.

attachmentId string

The attachment identifier.

Returns

HttpResponseMessage

DeleteAttachmentAsync(string, string, CancellationToken)

Deletes the specified attachment.

Task<HttpResponseMessage> DeleteAttachmentAsync(string catalogId, string attachmentId, CancellationToken cancellationToken = default)

Parameters

catalogId string

The catalog identifier.

attachmentId string

The attachment identifier.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<HttpResponseMessage>

Get(string)

Gets the specified catalog.

ResourceCatalog Get(string catalogId)

Parameters

catalogId string

The catalog identifier.

Returns

ResourceCatalog

GetAsync(string, CancellationToken)

Gets the specified catalog.

Task<ResourceCatalog> GetAsync(string catalogId, CancellationToken cancellationToken = default)

Parameters

catalogId string

The catalog identifier.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<ResourceCatalog>

GetAttachmentStream(string, string)

Gets the specified attachment.

HttpResponseMessage GetAttachmentStream(string catalogId, string attachmentId)

Parameters

catalogId string

The catalog identifier.

attachmentId string

The attachment identifier.

Returns

HttpResponseMessage

GetAttachmentStreamAsync(string, string, CancellationToken)

Gets the specified attachment.

Task<HttpResponseMessage> GetAttachmentStreamAsync(string catalogId, string attachmentId, CancellationToken cancellationToken = default)

Parameters

catalogId string

The catalog identifier.

attachmentId string

The attachment identifier.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<HttpResponseMessage>

GetAttachments(string)

Gets all attachments for the specified catalog.

IReadOnlyList<string> GetAttachments(string catalogId)

Parameters

catalogId string

The catalog identifier.

Returns

IReadOnlyList<string>

GetAttachmentsAsync(string, CancellationToken)

Gets all attachments for the specified catalog.

Task<IReadOnlyList<string>> GetAttachmentsAsync(string catalogId, CancellationToken cancellationToken = default)

Parameters

catalogId string

The catalog identifier.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<IReadOnlyList<string>>

GetAvailability(string, DateTime, DateTime, TimeSpan)

Gets the specified catalog's availability.

CatalogAvailability GetAvailability(string catalogId, DateTime begin, DateTime end, TimeSpan step)

Parameters

catalogId string

The catalog identifier.

begin DateTime

Start date/time.

end DateTime

End date/time.

step TimeSpan

Step period.

Returns

CatalogAvailability

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

catalogId string

The catalog identifier.

begin DateTime

Start date/time.

end DateTime

End date/time.

step TimeSpan

Step period.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<CatalogAvailability>

GetChildCatalogInfos(string)

Gets a list of child catalog info for the provided parent catalog identifier.

IReadOnlyList<CatalogInfo> GetChildCatalogInfos(string catalogId)

Parameters

catalogId string

The parent catalog identifier.

Returns

IReadOnlyList<CatalogInfo>

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

catalogId string

The parent catalog identifier.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<IReadOnlyList<CatalogInfo>>

GetLicense(string)

Gets the license of the catalog if available.

string? GetLicense(string catalogId)

Parameters

catalogId string

The catalog identifier.

Returns

string

GetLicenseAsync(string, CancellationToken)

Gets the license of the catalog if available.

Task<string?> GetLicenseAsync(string catalogId, CancellationToken cancellationToken = default)

Parameters

catalogId string

The catalog identifier.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<string>

GetMetadata(string)

Gets the catalog metadata.

CatalogMetadata GetMetadata(string catalogId)

Parameters

catalogId string

The catalog identifier.

Returns

CatalogMetadata

GetMetadataAsync(string, CancellationToken)

Gets the catalog metadata.

Task<CatalogMetadata> GetMetadataAsync(string catalogId, CancellationToken cancellationToken = default)

Parameters

catalogId string

The catalog identifier.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<CatalogMetadata>

GetTimeRange(string)

Gets the specified catalog's time range.

CatalogTimeRange GetTimeRange(string catalogId)

Parameters

catalogId string

The catalog identifier.

Returns

CatalogTimeRange

GetTimeRangeAsync(string, CancellationToken)

Gets the specified catalog's time range.

Task<CatalogTimeRange> GetTimeRangeAsync(string catalogId, CancellationToken cancellationToken = default)

Parameters

catalogId string

The catalog identifier.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<CatalogTimeRange>

SearchCatalogItems(IReadOnlyList<string>)

Searches for the given resource paths and returns the corresponding catalog items.

IReadOnlyDictionary<string, CatalogItem> SearchCatalogItems(IReadOnlyList<string> resourcePaths)

Parameters

resourcePaths IReadOnlyList<string>

The list of resource paths.

Returns

IReadOnlyDictionary<string, CatalogItem>

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

resourcePaths IReadOnlyList<string>

The list of resource paths.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<IReadOnlyDictionary<string, CatalogItem>>

SetMetadata(string, CatalogMetadata)

Puts the catalog metadata.

HttpResponseMessage SetMetadata(string catalogId, CatalogMetadata metadata)

Parameters

catalogId string

The catalog identifier.

metadata CatalogMetadata

The catalog metadata to set.

Returns

HttpResponseMessage

SetMetadataAsync(string, CatalogMetadata, CancellationToken)

Puts the catalog metadata.

Task<HttpResponseMessage> SetMetadataAsync(string catalogId, CatalogMetadata metadata, CancellationToken cancellationToken = default)

Parameters

catalogId string

The catalog identifier.

metadata CatalogMetadata

The catalog metadata to set.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<HttpResponseMessage>

UploadAttachment(string, string, Stream)

Uploads the specified attachment.

HttpResponseMessage UploadAttachment(string catalogId, string attachmentId, Stream content)

Parameters

catalogId string

The catalog identifier.

attachmentId string

The attachment identifier.

content Stream

The binary file content.

Returns

HttpResponseMessage

UploadAttachmentAsync(string, string, Stream, CancellationToken)

Uploads the specified attachment.

Task<HttpResponseMessage> UploadAttachmentAsync(string catalogId, string attachmentId, Stream content, CancellationToken cancellationToken = default)

Parameters

catalogId string

The catalog identifier.

attachmentId string

The attachment identifier.

content Stream

The binary file content.

cancellationToken CancellationToken

The token to cancel the current operation.

Returns

Task<HttpResponseMessage>