Show:

Methods

(inner) adaptApiResponse(config, query, restResponse, showDescription) → {SearchResponse}

...
Parameters:
Name Type Description
config MwMap
query string
restResponse RestResponse
showDescription boolean
Source:
Returns:
Type
SearchResponse

(inner) fetchByTitle()

...

(inner) nullish(a, b) → {any}

...
Nullish coalescing operator (??) helper
Parameters:
Name Type Description
a any
b any
Source:
Returns:
Type
any

(inner) restSearchClient(config) → {SearchClient}

...
Parameters:
Name Type Description
config MwMap
Source:
Returns:
Type
SearchClient

Type Definitions

AbortableSearchFetch

...
Type:
  • Object
Properties:
Name Type Description
fetch Promise.<SearchResponse>
abort function
Source:

fetchByTitle(query, domain, limitopt) → {AbortableSearchFetch}

...
Parameters:
Name Type Attributes Description
query string The search term.
domain string The base URL for the wiki without protocol. Example: 'sr.wikipedia.org'.
limit number <optional>
Maximum number of results.
Source:
Returns:
Type
AbortableSearchFetch

RestResponse

...
Type:
  • Object
Properties:
Name Type Description
pages Array.<RestResult>
Source:

SearchClient

...
Type:
  • Object
Properties:
Name Type Description
fetchByTitle fetchByTitle
Source:

SearchResponse

...
Type:
  • Object
Properties:
Name Type Description
query string
results Array.<SearchResult>
Source: