mirror of
https://github.com/TeamPiped/Piped-Backend
synced 2025-09-06 13:31:17 +02:00
20 lines
473 B
Java
20 lines
473 B
Java
package me.kavin.piped.utils;
|
|
|
|
|
|
import me.kavin.piped.consts.Constants;
|
|
|
|
import static me.kavin.piped.utils.RequestUtils.sendGetJson;
|
|
|
|
public class RydHelper {
|
|
public static double getDislikeRating(String videoId) throws Exception {
|
|
|
|
if (Constants.DISABLE_RYD)
|
|
return -1;
|
|
|
|
return sendGetJson(Constants.RYD_PROXY_URL + "/votes/" + videoId)
|
|
.thenApply(tree -> tree.path("rating").asDouble(-1))
|
|
.get();
|
|
|
|
}
|
|
}
|