WikimediaCatalogProvider
public sealed class WikimediaCatalogProvider : RemoteCatalogProviderBase, IRemoteCatalogProvider, IRemoteCatalogAccessProbeSearches Wikimedia Commons media files and exposes their original HTTPS downloads with attribution and license metadata.
Constructors
Section titled “Constructors”
WikimediaCatalogProvider(HttpClient)
Section titled “WikimediaCatalogProvider(HttpClient)”public WikimediaCatalogProvider(HttpClient client = null)Creates a Wikimedia 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”
FetchAsync(RemoteCatalogRequest, CancellationToken)
Section titled “FetchAsync(RemoteCatalogRequest, CancellationToken)”public override Task<RemoteCatalogPage> FetchAsync(RemoteCatalogRequest request, CancellationToken cancellationToken)Searches the Commons file namespace with offset pagination and maps file, attribution, category, and license metadata into catalog items.
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 a Commons page identifier and returns its original HTTPS file when the file URL and extension can be resolved.
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”
public override string Id { get; }Returns
System.String