mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-01-05 17:45:49 +01:00
fix 400
This commit is contained in:
parent
a3c40d10ce
commit
2ebad96acf
@ -28,14 +28,12 @@ import fi.vanced.utils.requests.Route;
|
||||
|
||||
public class WhitelistRequester {
|
||||
private static final String YT_API_URL = "https://www.youtube.com/youtubei/v1/";
|
||||
private static final String YT_API_KEY = "replaceMeWithTheYouTubeAPIKey";
|
||||
|
||||
private WhitelistRequester() {}
|
||||
|
||||
public static void addChannelToWhitelist(WhitelistType whitelistType, View view, ImageView buttonIcon, Context context) {
|
||||
try {
|
||||
HttpURLConnection connection = getConnectionFromRoute(WhitelistRoutes.GET_CHANNEL_DETAILS, YT_API_KEY);
|
||||
connection.setRequestMethod("POST");
|
||||
HttpURLConnection connection = getConnectionFromRoute(WhitelistRoutes.GET_CHANNEL_DETAILS, "replaceMeWithTheYouTubeAPIKey");
|
||||
connection.setRequestProperty("Content-Type", "application/json; utf-8");
|
||||
connection.setRequestProperty("Accept", "application/json");
|
||||
connection.setDoOutput(true);
|
||||
|
@ -1,11 +1,11 @@
|
||||
package fi.vanced.libraries.youtube.whitelisting.requests;
|
||||
|
||||
import static fi.vanced.utils.requests.Route.Method.GET;
|
||||
import static fi.vanced.utils.requests.Route.Method.POST;
|
||||
|
||||
import fi.vanced.utils.requests.Route;
|
||||
|
||||
public class WhitelistRoutes {
|
||||
public static final Route GET_CHANNEL_DETAILS = new Route(GET, "player?key={api_key}");
|
||||
public static final Route GET_CHANNEL_DETAILS = new Route(POST, "player?key={api_key}");
|
||||
|
||||
private WhitelistRoutes() {}
|
||||
}
|
Loading…
Reference in New Issue
Block a user