Documentation ¶
Overview ¶
Package search provides the required metadata and youtube link to download a song.
Index ¶
- func GetSpotifyClient(clientId, clientSecret string) (*spotify.Client, error)
- func GetYoutubeLink(songName string, songArtists []string) (string, error)
- type Song
- func (s *Song) FromId(client *spotify.Client, spotifyId spotify.ID) error
- func (s *Song) FromPlaylistTrack(playlistTrack *spotify.PlaylistTrack) error
- func (s *Song) FromQuery(client *spotify.Client, query string) error
- func (s *Song) FromSimpleTrack(client *spotify.Client, simpleTrack *spotify.SimpleTrack) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSpotifyClient ¶
GetSpotifyClient returns a spotify client that's used for searching and getting metadata from spotify.
Types ¶
type Song ¶
func GetAlbumTracks ¶
GetAlbumTracks gets all the tracks in in album using its spotify id.
func GetPlaylistTracks ¶
GetPlaylistTracks gets all the songs of a playlist using its spotify id.
func (*Song) FromId ¶
FromId sets the metadata and the yt link of the underlying Song `s` from the spotify id of a track.
func (*Song) FromPlaylistTrack ¶
func (s *Song) FromPlaylistTrack(playlistTrack *spotify.PlaylistTrack) error
FromPlaylistTrack sets the underlying Songs `FullTrack` and yt link by using a PlaylistTrack
func (*Song) FromQuery ¶
FromQuery gets search for the `query` and get's sets the metadata and yt link of the underlying Song `s`
func (*Song) FromSimpleTrack ¶
FromSimpleTrack sets the underlying Songs `FullTrack` and yt link by using a SimpleTrack