shoutcastcom

package
v0.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2019 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

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)

func (*SHOUTcastAPIClient) GetTop500

func (s *SHOUTcastAPIClient) GetTop500(mediaType string, bitRate string, limit string) ([]Station, error)

GetTop500 gets the top 500 stations All paramaters 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL