Documentation ¶
Index ¶
- type SHOUTcastAPIClient
- func (s *SHOUTcastAPIClient) GeTuneInURLs(id string) ([]string, error)
- func (s *SHOUTcastAPIClient) GetAllGenres() ([]string, error)
- func (s *SHOUTcastAPIClient) GetByGenre(genre string, mediaType string, bitRate string, limit string) ([]Station, error)
- func (s *SHOUTcastAPIClient) GetTop500(mediaType string, bitRate string, limit string) ([]Station, error)
- type Station
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SHOUTcastAPIClient ¶
type SHOUTcastAPIClient struct {
// contains filtered or unexported fields
}
SHOUTcastAPIClient is a client for the SHOUTcast.com (legacy) directory
func NewClient ¶
func NewClient(key string) *SHOUTcastAPIClient
NewClient gives a SHOUTcastAPIClient instance
func (*SHOUTcastAPIClient) GeTuneInURLs ¶
func (s *SHOUTcastAPIClient) GeTuneInURLs(id string) ([]string, error)
GeTuneInURLs gives the URLs or a certain SHOUTcast ID
func (*SHOUTcastAPIClient) GetAllGenres ¶
func (s *SHOUTcastAPIClient) GetAllGenres() ([]string, error)
GetAllGenres returns a list with all available genres
func (*SHOUTcastAPIClient) GetByGenre ¶
func (s *SHOUTcastAPIClient) GetByGenre(genre string, mediaType string, bitRate string, limit string) ([]Station, error)
GetByGenre gets the stations by genre All paramaters except genre are optional and can be left out if an empty string is used (TODO: improve these option setters)
type Station ¶
type Station struct { ID string `xml:"id,attr" json:"shoutcastID" bson:"shoutcastID"` Name string `xml:"name,attr" json:"name" bson:"name"` MediaType string `xml:"mt,attr" json:"mediaType" bson:"mediaType"` BitRate string `xml:"br,attr" json:"bitrate" bson:"bitrate"` Genre string `xml:"genre,attr" json:"genre" bson:"genre"` Genre2 string `xml:"genre2,attr" json:"genre2" bson:"genre2"` Genre3 string `xml:"genre3,attr" json:"genre3" bson:"genre3"` Genre4 string `xml:"genre4,attr" json:"genre4" bson:"genre4"` Genre5 string `xml:"genre5,attr" json:"genre5" bson:"genre5"` LogoURL string `xml:"logo,attr" json:"logoURL" bson:"logoURL"` CurrentTrack string `xml:"ct,attr" json:"curentTrack" bson:"curentTrack"` ListnerCount int `xml:"lc,attr" json:"listenerCount" bson:"listenerCount"` ListenURLs []string `json:"listenURLs" bson:"listenURLs"` }
Station contains the data of a station listing
Click to show internal directories.
Click to hide internal directories.