Table of Contents

Class CatalogsClient

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

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

public class CatalogsClient : ICatalogsClient
Inheritance
CatalogsClient
Implements
Inherited Members

Methods

AcceptLicense(string)

Accepts the current license of the specified catalog.

public HttpResponseMessage AcceptLicense(string catalogId)

Parameters

catalogId string

The catalog identifier.

Returns

HttpResponseMessage

AcceptLicenseAsync(string, CancellationToken)

Accepts the current license of the specified catalog.

public 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.

public 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.

public 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.

public ResourceCatalog Get(string catalogId)

Parameters

catalogId string

The catalog identifier.

Returns

ResourceCatalog

GetAsync(string, CancellationToken)

Gets the specified catalog.

public 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.

public 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.

public 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.

public IReadOnlyList<string> GetAttachments(string catalogId)

Parameters

catalogId string

The catalog identifier.

Returns

IReadOnlyList<string>

GetAttachmentsAsync(string, CancellationToken)

Gets all attachments for the specified catalog.

public 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.

public 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.

public 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.

public 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.

public 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.

public string? GetLicense(string catalogId)

Parameters

catalogId string

The catalog identifier.

Returns

string

GetLicenseAsync(string, CancellationToken)

Gets the license of the catalog if available.

public 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.

public CatalogMetadata GetMetadata(string catalogId)

Parameters

catalogId string

The catalog identifier.

Returns

CatalogMetadata

GetMetadataAsync(string, CancellationToken)

Gets the catalog metadata.

public 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.

public CatalogTimeRange GetTimeRange(string catalogId)

Parameters

catalogId string

The catalog identifier.

Returns

CatalogTimeRange

GetTimeRangeAsync(string, CancellationToken)

Gets the specified catalog's time range.

public 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.

public 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.

public 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.

public 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.

public 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.

public 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.

public 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>