Finished getSearchSuggestions

This commit is contained in:
Zechariah 2022-03-30 17:36:30 +08:00
parent 75da9033fd
commit afb8147a26
2 changed files with 39 additions and 0 deletions

View File

@ -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.

View File

@ -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<string[]>`
## TypeScript Source Code
```ts
public async getSearchSuggestions(query: string): Promise<string[]>
```