Bulk transcription of many videos, a playlist or a channel. Available once the account has bought a credit pack.
Summary
Functions
POST /v1/batch with exactly one of :items (a list of links), :playlist or
:channel; also :language, :limit, :name. Returns the batch map.
DELETE /v1/library/batches/{batch_id}. Returns %{"removed" => true}.
GET /v1/batch/{batch_id}/export. Returns the file as a binary (zip by default).
Options: :format ("zip", "csv", "txt", "json", "srt", "vtt"), :files,
:timestamps (boolean).
GET /v1/batch/{batch_id}. Returns %{"batch", "items", "nextPageToken"}.
Options: :max_results, :page_token.
POST /v1/batch/{batch_id}/retry. Never retried automatically. Returns %{"batch", "retried", "credits"}.
Polls get/3 until the batch is completed or failed and returns that last answer.
Options: :timeout (ms, default 1_800_000), :poll_interval (ms, default 3_000).
Returns TIMEOUT when the batch is not finished in time.
Functions
@spec create(YouTubeTranscriptNet.Client.t(), keyword()) :: {:ok, map()} | {:error, YouTubeTranscriptNet.Error.t()}
POST /v1/batch with exactly one of :items (a list of links), :playlist or
:channel; also :language, :limit, :name. Returns the batch map.
Never retried automatically: a repeat could charge twice. Passing none or more than one
source returns INVALID_REQUEST without sending anything.
@spec delete(YouTubeTranscriptNet.Client.t(), String.t()) :: {:ok, map()} | {:error, YouTubeTranscriptNet.Error.t()}
DELETE /v1/library/batches/{batch_id}. Returns %{"removed" => true}.
@spec export(YouTubeTranscriptNet.Client.t(), String.t(), keyword()) :: {:ok, binary()} | {:error, YouTubeTranscriptNet.Error.t()}
GET /v1/batch/{batch_id}/export. Returns the file as a binary (zip by default).
Options: :format ("zip", "csv", "txt", "json", "srt", "vtt"), :files,
:timestamps (boolean).
@spec get(YouTubeTranscriptNet.Client.t(), String.t(), keyword()) :: {:ok, map()} | {:error, YouTubeTranscriptNet.Error.t()}
GET /v1/batch/{batch_id}. Returns %{"batch", "items", "nextPageToken"}.
Options: :max_results, :page_token.
@spec retry(YouTubeTranscriptNet.Client.t(), String.t()) :: {:ok, map()} | {:error, YouTubeTranscriptNet.Error.t()}
POST /v1/batch/{batch_id}/retry. Never retried automatically. Returns %{"batch", "retried", "credits"}.
@spec wait(YouTubeTranscriptNet.Client.t(), String.t(), keyword()) :: {:ok, map()} | {:error, YouTubeTranscriptNet.Error.t()}
Polls get/3 until the batch is completed or failed and returns that last answer.
Options: :timeout (ms, default 1_800_000), :poll_interval (ms, default 3_000).
Returns TIMEOUT when the batch is not finished in time.