addClick method

Future<bool> addClick(
  1. String stationUUID
)

Increase the click count of a station by one. This should be called everytime when a user starts playing a stream to mark the stream more popular than others. Every call to this endpoint from the same IP address and for the same station only gets counted once per day. The call will return detailed information about the stream, supported output formats: JSON, XML ,PLS ,M3U

Implementation

Future<bool> addClick(String stationUUID) async {
  var url = Uri.parse("$srvUrl/url/$stationUUID");

  http.Response response = await http.get(url, headers: {"User-Agent": clientName});
  var ds = json.decode(response.body);
  return ds["ok"] == "true";
}