Package io.github.thoroldvix.api
Class TranscriptRequest
java.lang.Object
io.github.thoroldvix.api.TranscriptRequest
Request object for retrieving transcripts.
Contains API key required for the YouTube V3 API, and optionally a file path to the text file containing the authentication cookies. If cookies are not provided, the API will not be able to access age restricted videos. Also contains a flag to stop on error, or continue on error. Defaults to false if not provided.
-
Constructor Summary
ConstructorDescriptionTranscriptRequest
(String apiKey) TranscriptRequest
(String apiKey, boolean stopOnError) TranscriptRequest
(String apiKey, String cookiesPath) TranscriptRequest
(String apiKey, String cookiesPath, boolean stopOnError) Creates a new instance ofTranscriptRequest
-
Method Summary
Modifier and TypeMethodDescriptionboolean
-
Constructor Details
-
TranscriptRequest
Creates a new instance ofTranscriptRequest
- Parameters:
apiKey
- API key for the YouTube V3 API (see Getting started)cookiesPath
- The file path to the text file containing the authentication cookies. Used in the case if some videos are age restricted see {Cookies}stopOnError
- Whether to stop if transcript retrieval fails for a video. If false, all transcripts that could not be retrieved will be skipped, * otherwise an exception will be thrown on first error.
-
TranscriptRequest
-
TranscriptRequest
-
TranscriptRequest
-
-
Method Details
-
getApiKey
- Returns:
- API key for the YouTube V3 API (see Getting started)
-
getCookiesPath
- Returns:
- The file path to the text file containing the authentication cookies. Used in the case if some videos are age restricted see {Cookies}
-
isStopOnError
public boolean isStopOnError()- Returns:
- Whether to stop if transcript retrieval fails for a video. If false, all transcripts that could not be retrieved will be skipped, * otherwise an exception will be thrown on first error.
-