Class CaptionsResource
The "captions" collection of methods.
Inherited Members
Namespace: Google.Apis.YouTube.v3
Assembly: Google.Apis.YouTube.v3.dll
Syntax
public class CaptionsResource
Constructors
CaptionsResource(IClientService)
Constructs a new resource.
Declaration
public CaptionsResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Methods
Delete(string)
Deletes a resource.
Declaration
public virtual CaptionsResource.DeleteRequest Delete(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id |
|
Returns
Type | Description |
---|---|
CaptionsResource.DeleteRequest |
Download(string)
Downloads a caption track.
Declaration
public virtual CaptionsResource.DownloadRequest Download(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id | The ID of the caption track to download, required for One Platform. |
Returns
Type | Description |
---|---|
CaptionsResource.DownloadRequest |
Insert(Caption, Repeatable<string>)
Inserts a new resource into this collection.
Declaration
public virtual CaptionsResource.InsertRequest Insert(Caption body, Repeatable<string> part)
Parameters
Type | Name | Description |
---|---|---|
Caption | body | The body of the request. |
Repeatable<string> | part | The part parameter specifies the caption resource parts that the API response will include. Set the parameter value to snippet. |
Returns
Type | Description |
---|---|
CaptionsResource.InsertRequest |
Insert(Caption, Repeatable<string>, Stream, string)
Inserts a new resource into this collection.
Declaration
public virtual CaptionsResource.InsertMediaUpload Insert(Caption body, Repeatable<string> part, Stream stream, string contentType)
Parameters
Type | Name | Description |
---|---|---|
Caption | body | The body of the request. |
Repeatable<string> | part | The part parameter specifies the caption resource parts that the API response will include. Set the parameter value to snippet. |
Stream | stream | The stream to upload. See remarks for further information. |
string | contentType | The content type of the stream to upload. |
Returns
Type | Description |
---|---|
CaptionsResource.InsertMediaUpload |
Remarks
Considerations regarding stream
:
-
If
stream
is seekable, then the stream position will be reset to0
before reading commences. Ifstream
is not seekable, then it will be read from its current position -
Caller is responsible for maintaining the
stream
open until the upload is completed - Caller is responsible for closing the
stream
List(Repeatable<string>, string)
Retrieves a list of resources, possibly filtered.
Declaration
public virtual CaptionsResource.ListRequest List(Repeatable<string> part, string videoId)
Parameters
Type | Name | Description |
---|---|---|
Repeatable<string> | part | The part parameter specifies a comma-separated list of one or more caption resource parts that the API response will include. The part names that you can include in the parameter value are id and snippet. |
string | videoId | Returns the captions for the specified video. |
Returns
Type | Description |
---|---|
CaptionsResource.ListRequest |
Update(Caption, Repeatable<string>)
Updates an existing resource.
Declaration
public virtual CaptionsResource.UpdateRequest Update(Caption body, Repeatable<string> part)
Parameters
Type | Name | Description |
---|---|---|
Caption | body | The body of the request. |
Repeatable<string> | part | The part parameter specifies a comma-separated list of one or more caption resource parts that the API response will include. The part names that you can include in the parameter value are id and snippet. |
Returns
Type | Description |
---|---|
CaptionsResource.UpdateRequest |
Update(Caption, Repeatable<string>, Stream, string)
Updates an existing resource.
Declaration
public virtual CaptionsResource.UpdateMediaUpload Update(Caption body, Repeatable<string> part, Stream stream, string contentType)
Parameters
Type | Name | Description |
---|---|---|
Caption | body | The body of the request. |
Repeatable<string> | part | The part parameter specifies a comma-separated list of one or more caption resource parts that the API response will include. The part names that you can include in the parameter value are id and snippet. |
Stream | stream | The stream to upload. See remarks for further information. |
string | contentType | The content type of the stream to upload. |
Returns
Type | Description |
---|---|
CaptionsResource.UpdateMediaUpload |
Remarks
Considerations regarding stream
:
-
If
stream
is seekable, then the stream position will be reset to0
before reading commences. Ifstream
is not seekable, then it will be read from its current position -
Caller is responsible for maintaining the
stream
open until the upload is completed - Caller is responsible for closing the
stream