From afb8147a26f18402095e5d8833f57ea91e1b7753 Mon Sep 17 00:00:00 2001 From: Zechariah Date: Wed, 30 Mar 2022 17:36:30 +0800 Subject: [PATCH] Finished getSearchSuggestions --- docs/guides/usage/getSearchSuggestions.md | 20 +++++++++++++++++++ .../ytmusic-methods/getSearchSuggestions.md | 19 ++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/docs/guides/usage/getSearchSuggestions.md b/docs/guides/usage/getSearchSuggestions.md index e69de29..e5701ab 100644 --- a/docs/guides/usage/getSearchSuggestions.md +++ b/docs/guides/usage/getSearchSuggestions.md @@ -0,0 +1,20 @@ +# Getting search suggestions + +`getSearchSuggestions()` will fetch you a list of search suggestions based on the query + +```ts +ytmusic.getSearchSuggestions("Lilac").then(res => { + console.log(res) +}) +// > [ +// > "lilac", +// > "lilac iu", +// > "lilac band", +// > "lilac wine", +// > "lilac wine miley cyrus", +// > "lilac close my eyes forever", +// > "lilac holy diver" +// > ] +``` + +See the [reference](../../references/ytmusic-methods/getSearchSuggestions.html) for information. diff --git a/docs/references/ytmusic-methods/getSearchSuggestions.md b/docs/references/ytmusic-methods/getSearchSuggestions.md index e69de29..f218382 100644 --- a/docs/references/ytmusic-methods/getSearchSuggestions.md +++ b/docs/references/ytmusic-methods/getSearchSuggestions.md @@ -0,0 +1,19 @@ +# getSearchSuggestions + +See the [guide](../../guides/usage/getSearchSuggestions.html) for information on how to use this. + +## Parameters + +| Name | Data Type | Description | +| :---- | :-------- | :------------------------------------ | +| query | string | Search query you want suggestions for | + +## Returns + +`Promise` + +## TypeScript Source Code + +```ts +public async getSearchSuggestions(query: string): Promise +```