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, limitopt, showDescriptionopt) → {AbortableSearchFetch}

...
Parameters:
Name Type Attributes Description
query string The search term.
limit number <optional>
Maximum number of results.
showDescription boolean <optional>
Whether descriptions should be added to the results.
Source:
Returns:
Type
AbortableSearchFetch

loadMore(query, offset, limitopt, showDescriptionopt) → {AbortableSearchFetch}

...
Parameters:
Name Type Attributes Description
query string The search term.
offset number The number of search results that were already loaded.
limit number <optional>
How many further search results to load (at most).
showDescription boolean <optional>
Whether descriptions should be added to the results.
Source:
Returns:
Type
AbortableSearchFetch

RestResponse

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

SearchClient

...
Type:
  • Object
Properties:
Name Type Attributes Description
fetchByTitle fetchByTitle
loadMore loadMore <optional>
Source:

SearchResponse

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