Package io.github.thoroldvix.api
Interface YoutubeClient
public interface YoutubeClient
Responsible for sending GET requests to YouTube.
-
Method Summary
Modifier and TypeMethodDescriptionget(YtApiV3Endpoint endpoint, Map<String, String> params) Sends a GET request to the specified endpoint and returns the response body.Sends a GET request to the specified URL and returns the response body.
-
Method Details
-
get
Sends a GET request to the specified URL and returns the response body.- Parameters:
url- The URL to which the GET request is made.headers- A map of additional headers to include in the request.- Returns:
- The body of the response as a
String. - Throws:
TranscriptRetrievalException- If the request to YouTube fails.
-
get
Sends a GET request to the specified endpoint and returns the response body.- Parameters:
endpoint- The endpoint to which the GET request is made.params- A map of parameters to include in the request.- Returns:
- The body of the response as a
String. - Throws:
TranscriptRetrievalException- If the request to YouTube fails.
-