Documentation
¶
Index ¶
- func ExtractSong(url string)
- func GetArtwork(data []byte) (string, []byte)
- func GetClientID(data []byte) string
- func GetTitle(data []byte) string
- func Search(query string) string
- type AudioLink
- type Soundcloud
- func (s *Soundcloud) ConstructStreamURL(doc *html.Node) (string, error)
- func (s *Soundcloud) GetArtwork(doc *html.Node) (string, error)
- func (s *Soundcloud) GetClientID() (string, error)
- func (s *Soundcloud) GetHLSURL(doc *html.Node) (string, error)
- func (s *Soundcloud) GetTitle(doc *html.Node) (string, error)
- func (s *Soundcloud) GetTrackAuthorization(doc *html.Node) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractSong ¶
func ExtractSong(url string)
ExtractSong queries the SoundCloud api and receives a m3u8 file, then binds the segments received into a .mp3 file
func GetArtwork ¶
GetArtwork returns the song artwork url and image
func GetClientID ¶
GetClientID returns a the new generated client_id when a request is made to SoundCloud's API TODO implment tests
Types ¶
type AudioLink ¶
type AudioLink struct {
URL string `json:"url"`
}
AudioLink struct for unmarshalling data
type Soundcloud ¶
type Soundcloud struct { Client *http.Client // http client // contains filtered or unexported fields }
Soundcloud struct represents a http client to make requests to SoundCloud's API
func (*Soundcloud) ConstructStreamURL ¶
func (s *Soundcloud) ConstructStreamURL(doc *html.Node) (string, error)
ConstructStreamURL will construct a stream url from a SoundCloud song url
func (*Soundcloud) GetArtwork ¶
func (s *Soundcloud) GetArtwork(doc *html.Node) (string, error)
func (*Soundcloud) GetClientID ¶
func (s *Soundcloud) GetClientID() (string, error)
GetClientID returns a new generated client_id when a request is made to SoundCloud's API
func (*Soundcloud) GetHLSURL ¶
func (s *Soundcloud) GetHLSURL(doc *html.Node) (string, error)
GetHLSURL gets the HLS URL from the SoundCloud song URL
func (*Soundcloud) GetTitle ¶
func (s *Soundcloud) GetTitle(doc *html.Node) (string, error)
GetTitle will return the title of the song
func (*Soundcloud) GetTrackAuthorization ¶
func (s *Soundcloud) GetTrackAuthorization(doc *html.Node) (string, error)
GetTrackAuthorization will get the track authorization URL from the SoundCloud song URL