uid: azure-cognitiveservices-autosuggest summary: *content
Microsoft Azure SDK for Node.js - AutoSuggestAPIClient
This project provides a Node.js package for accessing Azure. Right now it supports:
- Node.js version 6.x.x or higher
Features
How to Install
npm install azure-cognitiveservices-autosuggest
How to use
Authentication, client creation and autoSuggest as an example.
const serviceKey = "<service-key>";const query = "Satya Nadella";const credentials = serviceKey;const autoSuggestApiClient = credentials; let autoSuggestResults;try autoSuggestResults = await autoSuggestApiClient; console; catch err console;if !autoSuggestResults console; else // AutoSuggest results const suggestionGroups = autoSuggestResultssuggestionGroups; if !suggestionGroups || suggestionGroupslength === 0 console; else console; let suggestionGroupNumber = 0; for const suggestionGroup of suggestionGroups console; const searchSuggestions = suggestionGroupsearchSuggestions; if !searchSuggestions || searchSuggestionslength === 0 console; else let searchSuggestionNumber = 0; for const searchSuggestion of searchSuggestions console;