-
Notifications
You must be signed in to change notification settings - Fork 309
client.Search for SearchTypeShow returns zero values #257
Copy link
Copy link
Open
Description
Hi!
Currently working in a project with this Spotify client. When using client.Search for SearchTypeShow it always returns zero values of type SimpleShowPage.
I create client in this way:
ctx := context.Background()
authConfig := &clientcredentials.Config{
ClientID: SpotifyId,
ClientSecret: SpotifySecret,
TokenURL: spotifyauth.TokenURL,
}
accessToken, err := authConfig.Token(ctx)
if err != nil {
log.Fatal("Error creating spotify client: ", err)
}
httpClient := spotifyauth.New().Client(ctx, accessToken)
Spotify = *spotify.New(httpClient)This is the line I use to call the search method, being podcastName a string:
result, err := client.Search(ctx, podcastName, spotify.SearchTypeShow)
if err != nil {
return "", fmt.Errorf("error searching podcast: %v", err)
}
log.Println(result.Shows)And this is what I get as result.Shows no matter which podcastName value I use:
2024/03/28 20:54:39 &{{https://api.spotify.com/v1/search?query=cosas+de+profes&type=show&offset=0&limit=20 20 0 399 https://api.spotify.com/v1/search?query=cosas+de+profes&type=show&offset=20&limit=20 } [{{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}} {{[] [] false map[] [] <nil> [] } {{ 0 0 0 } []}}]}I am using the exact same way to search for SearchTypeArtist, which works perfectly.
Any help or comments would be helpful. Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels