Class: SearchTypeaheadAPI

SearchTypeaheadAPI()

SearchTypeahead API class with methods of fetching search results for ibm.com

Constructor

new SearchTypeaheadAPI()

Source:

Methods

(async, static) getResults(query) → {Promise.<any>}

Gets search results

Parameters:
Name Type Description
query string

Query string to pass to the service

Source:
Returns:

Response data from ibm search

Type
Promise.<any>
Example
import { SearchTypeaheadAPI } from '@carbon/ibmdotcom-services';

async function getResults(query) {
  const response = await SearchTypeaheadAPI.getResults(query);
  return response;
}