Constructor
(abstract) new AbstractLookupAdapter(updateCallback)
Parameters:
Name | Type | Description |
---|---|---|
updateCallback |
function |
|
Members
sourceID :String
Canonical identifier for this source. Lower-case string, no whitespace.
Type:
- String
supportedPattern :RegExp
RegExp for URLs this adapter can handle.
Type:
- RegExp
Methods
ask(url) → {Boolean}
Does this adapter support the given URL? By default, performs a simple regex check.
Parameters:
Name | Type | Description |
---|---|---|
url |
String | the URL to test |
Returns:
true if supported
- Type
- Boolean
getSourceID() → {String}
Return the canonical source identifier for this adapter
Returns:
- Type
- String
(abstract) lookup(_url) → {Promise}
Perform a lookup for a given URL.
Parameters:
Name | Type | Description |
---|---|---|
_url |
String | the URL to perform lookup for |
Returns:
promise that resolves with a result object of the form LookupResult on success, and rejects with an error on failure
- Type
- Promise