Documentation ¶
Index ¶
- Constants
- Variables
- type Api
- func (a *Api) GetCountries(ctx context.Context) ([]Country, error)
- func (a *Api) GetLanguages(ctx context.Context) ([]Language, error)
- func (a *Api) GetStations(ctx context.Context, uuids []string) ([]Station, error)
- func (a *Api) Search(ctx context.Context, s SearchParams) ([]Station, error)
- func (a *Api) StationCounter(ctx context.Context, uuid string) error
- func (a *Api) StationVote(ctx context.Context, uuid string) error
- func (a *Api) TopStations(ctx context.Context) ([]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 = "all.api.radio-browser.info"
)
Variables ¶
View Source
var ServerErrMsg = errors.New("Server response not available")
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct {
// contains filtered or unexported fields
}
func (*Api) GetCountries ¶ added in v0.2.0
func (*Api) GetLanguages ¶ added in v0.2.0
func (*Api) GetStations ¶
func (*Api) StationCounter ¶ added in v0.2.4
func (*Api) StationVote ¶ added in v0.3.0
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.