| Modifier and Type | Field and Description |
|---|---|
protected static String |
API_URL
The base URL of the REST service.
|
| Constructor and Description |
|---|
RadioBrowser(int timeout,
String myUserAgent)
Creates a new API client.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteStation(Station station)
Deletes a station.
|
String |
editStation(Station station)
Edits an existing station on the server.
|
Optional<Station> |
getStationById(String id)
Get a station referenced by the ID.
|
Stream<Station> |
listBrokenStations()
Get a list of all broken stations as one continuous stream.
|
List<Station> |
listBrokenStations(Paging paging)
Get a list of all broken stations.
|
Map<String,Integer> |
listCodecs()
List the known codecs.
|
Map<String,Integer> |
listCountries()
List the known countries.
|
List<Station> |
listDeletedStations()
Get a list of the deleted stations.
|
Stream<Station> |
listImprovableStations()
Get a list of all broken stations as one continuous stream.
|
List<Station> |
listImprovableStations(Paging paging)
Get a list of all improvable stations.
|
Map<String,Integer> |
listLanguages()
List the known languages.
|
Stream<Station> |
listLastChangedStations()
Get a stream of last changed stations.
|
List<Station> |
listLastChangedStations(Paging paging)
Get a list of the last changed stations.
|
Stream<Station> |
listLastClickStations()
Get a stream of last clicked stations.
|
List<Station> |
listLastClickStations(Paging paging)
Get a list of the last clicked stations.
|
Stream<Station> |
listStations(ListParameter... listParam)
Get a list of all stations.
|
List<Station> |
listStations(Paging paging,
ListParameter... listParam)
Get a list of all stations.
|
List<Station> |
listStationsBy(Paging paging,
SearchMode searchMode,
String searchTerm,
ListParameter... listParam)
Get a list of stations matching a certain search criteria.
|
Stream<Station> |
listStationsBy(SearchMode searchMode,
String searchTerm,
ListParameter... listParam)
Get a stream of stations matching a certain search criteria.
|
Map<String,Integer> |
listTags()
List the known tags.
|
Stream<Station> |
listTopClickStations()
Get a stream of all top click stations.
|
List<Station> |
listTopClickStations(Paging paging)
Get a list of the top click stations.
|
Stream<Station> |
listTopVoteStations()
Get a stream of the top vote stations.
|
List<Station> |
listTopVoteStations(Paging paging)
Get a list of the top vote stations.
|
String |
postNewStation(Station station)
Posts a new station to the server.
|
URL |
resolveStreamUrl(Station station)
Resolves the streaming URL for the given station.
|
void |
undeleteStation(Station station)
Undeletes a station.
|
protected static final String API_URL
public RadioBrowser(int timeout,
String myUserAgent)
timeout - the timeout for connect and read requests in milliseconds.
Must be greater than zero.myUserAgent - the user agent String for your user agent.
Must be something to point to you.public Map<String,Integer> listCountries()
public Map<String,Integer> listCodecs()
public Map<String,Integer> listLanguages()
public Map<String,Integer> listTags()
public List<Station> listStations(Paging paging, ListParameter... listParam)
paging - the offset and limit of the page to retrieve.listParam - the optional listing parameters.public Stream<Station> listStations(ListParameter... listParam)
listParam - the optional listing parameters.public List<Station> listBrokenStations(Paging paging)
paging - the offset and limit of the page to retrieve.public Stream<Station> listBrokenStations()
public List<Station> listImprovableStations(Paging paging)
paging - the offset and limit of the page to retrieve.public Stream<Station> listImprovableStations()
public List<Station> listTopClickStations(Paging paging)
paging - the offset and limit of the page to retrieve.public Stream<Station> listTopClickStations()
public List<Station> listTopVoteStations(Paging paging)
paging - the offset and limit of the page to retrieve.public Stream<Station> listTopVoteStations()
public List<Station> listLastClickStations(Paging paging)
paging - the offset and limit of the page to retrieve.public Stream<Station> listLastClickStations()
public List<Station> listLastChangedStations(Paging paging)
paging - the offset and limit of the page to retrieve.public Stream<Station> listLastChangedStations()
public List<Station> listDeletedStations()
public Optional<Station> getStationById(String id)
id - the id of the station to retrieve.public List<Station> listStationsBy(Paging paging, SearchMode searchMode, String searchTerm, ListParameter... listParam)
paging - the offset and limit of the page to retrieve.searchMode - the field to match.searchTerm - the term to search for.listParam - the optional listing parameters.public Stream<Station> listStationsBy(SearchMode searchMode, String searchTerm, ListParameter... listParam)
searchMode - the field to match.searchTerm - the term to search for.listParam - the optional listing parameters.public URL resolveStreamUrl(Station station)
station - the station to retrieve the stream URL for.RadioBrowserException - if the URL could not be retrieedpublic void deleteStation(Station station)
station - the station to delete from the REST service.public void undeleteStation(Station station)
station - the station to delete from the REST service.public String postNewStation(Station station)
station - the station to add to the REST service.RadioBrowserException - if there was a problem
creating the station.public String editStation(Station station)
station - the station to edit with the REST service.RadioBrowserException - if there was a problem
editing the station.Copyright © 2017. All rights reserved.