ProtectedsourceIDProtectedsourceURLThe most canonical URL for the source
ProtectedsupportedArray of 'thing' properties this adapter supports (e.g., 'label', 'description')
ProtectedsupportedRegular expression which determines whether this adapter supports a given URL
ProtectedthrottleMinimum milliseconds to wait between requests to this adapter's API. Set to 0 to disable throttling.
Protected_lookupInternal lookup implementation to be provided by each adapter. Do not call directly - use lookup() which handles throttling.
All text strings returned in AdapterMultilingualString objects MUST be in "HTML-safe text" format:
& → &, < → <)For text from external APIs, use this three-step sanitization:
import { decodeHTML } from 'entities';
import escapeHTML from 'escape-html';
import stripTags from 'striptags';
const safeText = escapeHTML(stripTags(decodeHTML(externalValue)));
This pattern:
Not all adapters need all three steps - adjust based on the format your
external API returns. If it already returns plain text with no entities
or tags, only escapeHTML() may be needed.
Does this adapter support a given URL?
Perform a lookup for a given URL with automatic throttling. Waits if necessary to respect the adapter's throttleMs setting. Ensures requests are serialized per adapter instance, even with concurrent callers. Implementations should override _lookup() instead of this method.
A short lower-case string, e.g., 'wikidata'