Skip to content

SketchfabCatalogProvider

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

Searches downloadable Sketchfab models and resolves authenticated GLB, glTF, and USDZ downloads.

public SketchfabCatalogProvider(HttpClient client = null)

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

Parameters

Name Type
client System.Net.Http.HttpClient

CheckAccessAsync(RemoteCatalogRequest, CancellationToken)

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

Validates an API token or OAuth credential against the current-account endpoint; download permissions remain model-specific.

Parameters

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

Returns

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

FetchAsync(RemoteCatalogRequest, CancellationToken)

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

Searches downloadable models with cursor pagination, enriching results with cached license definitions and a thumbnail near 384 pixels wide.

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)

Uses the configured API token or OAuth credential to retrieve available HTTPS GLB, glTF, and USDZ download variants for a model.

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