Skip to content

OpenverseCatalogProvider

ClassAssetInventoryAssetInventory.Editor
public sealed class OpenverseCatalogProvider : RemoteCatalogProviderBase, IRemoteCatalogProvider, IRemoteCatalogAccessProbe

Provides query-based discovery of Openverse images and audio with source-file download resolution.

public OpenverseCatalogProvider(HttpClient client = null)

Creates an Openverse provider with a caller-owned HTTP client, or an owned default client when none is supplied.

Parameters

Name Type
client System.Net.Http.HttpClient

FetchAsync(RemoteCatalogRequest, CancellationToken)

Section titled “FetchAsync(RemoteCatalogRequest, CancellationToken)”
public override Task<RemoteCatalogPage> FetchAsync(RemoteCatalogRequest request, CancellationToken cancellationToken)

Searches non-mature images and audio with separate continuation pages, preserving successful results when the other media search has an HTTP failure.

Parameters

Name Type
request AssetInventory.RemoteCatalogRequest
cancellationToken System.Threading.CancellationToken

Returns

System.Threading.Tasks.Task{AssetInventory.RemoteCatalogPage}

GetVariantsAsync(string, RemoteCatalogRequest, CancellationToken)

Section titled “GetVariantsAsync(string, RemoteCatalogRequest, CancellationToken)”
public override Task<IReadOnlyList<RemoteDownloadVariant>> GetVariantsAsync(string itemId, RemoteCatalogRequest request, CancellationToken cancellationToken)

Looks up an image or audio identifier and returns its HTTPS source file when a usable file extension is available.

Parameters

Name Type
itemId System.String
request AssetInventory.RemoteCatalogRequest
cancellationToken System.Threading.CancellationToken

Returns

System.Threading.Tasks.Task{System.Collections.Generic.IReadOnlyList{AssetInventory.RemoteDownloadVariant}}

public override string Id { get; }

Returns

System.String