The library is useful for applications wanting to retrieve internet radio station URLs, streams and meta information.
How to use
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.0</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 JavaDoc documentation to get the full concepts of the API.
How it is tested
The API is tested using the WireMock REST testing framework. Mocked web requests/responses are located in the test resources.
- Use new API DNS names.
- Update maven plugins / dependencies.
- Made building with JDK 11 possible.
- JDK 10/11 building in TravisCI.
- Updated dependencies.
- Minor code improvements.
- Updated many dependencies, for example Jersey JAX-RS.
- 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-2018 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
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