PixabayCatalogProvider
public sealed class PixabayCatalogProvider : RemoteCatalogProviderBase, IRemoteCatalogProvider, IRemoteCatalogAccessProbeSearches Pixabay images and videos using an API key and caches API responses for 24 hours.
Constructors
Section titled “Constructors”
PixabayCatalogProvider(HttpClient)
Section titled “PixabayCatalogProvider(HttpClient)”public PixabayCatalogProvider(HttpClient client = null)Creates a Pixabay provider with a caller-owned HTTP client, or an owned default client when none is supplied.
Parameters
| Name | Type |
|---|---|
client |
System.Net.Http.HttpClient |
Methods
Section titled “Methods”
CheckAccessAsync(RemoteCatalogRequest, CancellationToken)
Section titled “CheckAccessAsync(RemoteCatalogRequest, CancellationToken)”public override Task<RemoteCatalogAccessResult> CheckAccessAsync(RemoteCatalogRequest request, CancellationToken cancellationToken)Checks catalog access and marks credentials validated only when the search uses no cached responses.
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)Returns safe-search image and video results with independent page cursors, using the API key and the 24-hour response cache.
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)Returns available original, vector, and large image files or video quality variants from the API or its 24-hour response cache.
Parameters
| Name | Type |
|---|---|
itemId |
System.String |
request |
AssetInventory.RemoteCatalogRequest |
cancellationToken |
System.Threading.CancellationToken |
Returns
System.Threading.Tasks.Task{System.Collections.Generic.IReadOnlyList{AssetInventory.RemoteDownloadVariant}}
Properties
Section titled “Properties”
MaximumResponseBytes
Section titled “MaximumResponseBytes”protected override int MaximumResponseBytes { get; }Returns
System.Int32
public override string Id { get; }Returns
System.String