Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1.23 KB

README.md

File metadata and controls

44 lines (34 loc) · 1.23 KB

RadioNetAPI

An API wrapper for the semi-public radio.net API

Installation

Download the jar file from the release page.

Maven

<repository>
    <id>coly</id>
    <url>https://m2.coly.dev/releases</url>
</repository>

<dependency>
    <groupId>dev.coly</groupId>
    <artifactId>radio-net-api</artifactId>
    <version>VERSION</version>
</dependency>

Usage

This project can only be used as a libary.

Examples

Station station = RadioNetAPI.searchStation("schlagerparadies", Locale.GERMAN);
System.out.println("The Station " +  station.getName() + " is located in " + city + ", " + country);
SearchResponse searchResponse = RadioNetAPI.searchStations("Schlagerparadies", 10, Locale.GERMAN);
System.out.println("The search returned " + searchResponse.getResults().size() + " results.");
NowPlaying nowPlaying = RadioNetAPI.getNowPlaying("schlagerparadies", Locale.GERMAN);
System.out.println("The station is now playing: " + nowPlaying.getTitle());

Tips

  • The stationId is case sensitive
  • NowPlaying#getTitle can get some wierd shorted text in some examples. It will not be an title and artist for all stations.