Add Search Wrapper

This commit is contained in:
aditya-K2
2023-04-14 05:47:38 +05:30
parent 3e929d6072
commit 77134039db

View File

@@ -289,3 +289,11 @@ func GetArtistAlbums(artistID spotify.ID) ([]spotify.SimpleAlbum, error) {
}
return c.Albums, nil
}
func Search(s string) (*spotify.SearchResult, error) {
return Client.Search(ctx(), s,
spotify.SearchTypePlaylist|
spotify.SearchTypeAlbum|
spotify.SearchTypeTrack|
spotify.SearchTypeArtist)
}