A Java API for the RadioBrowser internet radio station online repository.
The library is useful for applications wanting to retrieve internet radio station URLs, streams and meta information.
First step is to include the dependency in your Maven or Gradle project. For maven you need this dependency:
<dependency>
<groupId>de.sfuhrm</groupId>
<artifactId>radiobrowser4j</artifactId>
<version>2.0.2</version>
</dependency>
After adding this dependency, you can start by creating one instance and using it
// 5000ms timeout, user agent is Demo agent/1.0
RadioBrowser browser = new RadioBrowser(5000, "Demo agent/1.0");
// print the first 64 stations in station name order
browser.listStations(ListParameter.create().order(FieldName.name))
.limit(64)
.forEach(s -> System.out.printf("%s: %s%n",
s.getName(),
s.getUrl()
));
You can take a look at the documentation to get the full concepts of the API.
The library was extracted from a internet radio player and recorder program in Java, radiorecorder. You can take a look at real-life usage patterns there.
The API is tested using the WireMock REST testing framework. Mocked web requests/responses are located in the test resources.
- v2.0.2:
- Minor code improvements.
- Updated dependencies.
- v2.0.0:
- Support new radiobrowser API.
- Clients will have to do minor changes to calling the library.
- v1.3.0:
- Use new API DNS names.
- Update maven plugins / dependencies.
- v1.2.1:
- Made building with JDK 11 possible.
- JDK 10/11 building in TravisCI.
- Updated dependencies.
- v1.2.0:
- Minor code improvements.
- Updated many dependencies, for example Jersey JAX-RS.
- v1.1.0:
- Added stream API calls.
- Added tags list version to Station.
- ListParameter for list order control.
- editStation call in RadioBrowser.
- v1.0.0: First maven release.
Copyright 2017-2020 Stephan Fuhrmann
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and