Documentation
¶
Index ¶
- Constants
- Variables
- type API
- func (a *API) GetCountries() ([]model.Country, error)
- func (a *API) GetLanguages() ([]model.Language, error)
- func (a *API) GetStations(uuids []string) ([]model.Station, error)
- func (a *API) Search(s SearchParams) ([]model.Station, error)
- func (a *API) StationCounter(uuid string) error
- func (a *API) StationVote(uuid string) error
- func (a *API) TopStations() ([]model.Station, error)
- type ClickCounterResponse
- type Country
- type Language
- type OrderBy
- type SearchParams
- type ServerMirror
- type Station
- type StationTag
Constants ¶
View Source
const DefLimit = 30
View Source
const (
HOST = "radio-browser.info"
)
Variables ¶
View Source
var ErrServerMsg = errors.New("server response not available")
Functions ¶
This section is empty.
Types ¶
type API ¶ added in v0.8.10
type API struct {
// contains filtered or unexported fields
}
func (*API) GetStations ¶ added in v0.8.10
func (*API) StationCounter ¶ added in v0.8.10
func (*API) StationVote ¶ added in v0.8.10
type ClickCounterResponse ¶
type OrderBy ¶ added in v0.2.1
type OrderBy string
const ( Votes OrderBy = "votes" // Number of votes for this station. This number is by server and only ever increases. It will never be reset to 0. Clickcount OrderBy = "clickcount" // Clicks within the last 24 hours Clicktrend OrderBy = "clicktrend" // The difference of the clickcounts within the last 2 days. Posivite values mean an increase, negative a decrease of clicks. Bitrate OrderBy = "bitrate" Name OrderBy = "name" Tags OrderBy = "tags" CountryOrder OrderBy = "country" LanguageOrder OrderBy = "language" Codec OrderBy = "codec" Random OrderBy = "random" )
type SearchParams ¶
type SearchParams struct {
Name string
TagList string
Country string
State string
Language string
Limit int
Order OrderBy
Reverse bool
Offset int
}
func DefaultSearchParams ¶ added in v0.1.2
func DefaultSearchParams() SearchParams
type ServerMirror ¶
type Station ¶
type Station struct {
// A globally unique identifier for the change of the station information
Changeuuid string `json:"changeuuid"`
// A globally unique identifier for the station
Stationuuid string `json:"stationuuid"`
Serveruuid interface{} `json:"serveruuid"`
// The name of the station
Name string `json:"name"`
// The stream URL provided by the user
URL string `json:"url"`
// An automatically "resolved" stream URL. Things resolved are playlists (M3U/PLS/ASX...), HTTP redirects (Code 301/302).
// This link is especially usefull if you use this API from a platform that is not able to do a resolve on its own (e.g. JavaScript in browser)
// or you just don't want to invest the time in decoding playlists yourself.
URLResolved string `json:"url_resolved"`
// URL to the homepage of the stream, so you can direct the user to a page with more information about the stream.
Homepage string `json:"homepage"`
Favicon string `json:"favicon"`
// Tags of the stream with more information about it
Tags string `json:"tags"`
// DEPRECATED: use countrycode instead, full name of the country. Currently it is autogenerated from the countrycode.
Country string `json:"country"`
// Official countrycodes as in ISO 3166-1 alpha-2
Countrycode string `json:"countrycode"`
//"US-NY"
ISO3166_2 interface{} `json:"iso_3166_2"`
State string `json:"state"`
// string, multivalue, split by comma Languages that are spoken in this stream.
Language string `json:"language"`
// Languages that are spoken in this stream by code ISO 639-2/B
Languagecodes string `json:"languagecodes"`
// Number of votes for this station. This number is by server and only ever increases. It will never be reset to 0.
Votes int64 `json:"votes"`
Lastchangetime string `json:"lastchangetime"`
LastchangetimeIso8601 string `json:"lastchangetime_iso8601"`
Codec string `json:"codec"`
Bitrate int64 `json:"bitrate"`
HLS int64 `json:"hls"`
Lastcheckok int64 `json:"lastcheckok"`
Lastchecktime string `json:"lastchecktime"`
LastchecktimeIso8601 string `json:"lastchecktime_iso8601"`
Lastcheckoktime string `json:"lastcheckoktime"`
LastcheckoktimeIso8601 string `json:"lastcheckoktime_iso8601"`
Lastlocalchecktime string `json:"lastlocalchecktime"`
LastlocalchecktimeIso8601 string `json:"lastlocalchecktime_iso8601"`
Clicktimestamp string `json:"clicktimestamp"`
ClicktimestampIso8601 string `json:"clicktimestamp_iso8601"`
Clickcount int64 `json:"clickcount"`
Clicktrend int64 `json:"clicktrend"`
SSLError int64 `json:"ssl_error"`
GeoLat interface{} `json:"geo_lat"`
GeoLong interface{} `json:"geo_long"`
HasExtendedInfo bool `json:"has_extended_info"`
}
func (Station) Description ¶
func (Station) FilterValue ¶
type StationTag ¶
Click to show internal directories.
Click to hide internal directories.