Class VideosResource
The "videos" collection of methods.
Inherited Members
Namespace: Google.Apis.YouTube.v3
Assembly: Google.Apis.YouTube.v3.dll
Syntax
public class VideosResourceConstructors
VideosResource(IClientService)
Constructs a new resource.
Declaration
public VideosResource(IClientService service)Parameters
| Type | Name | Description | 
|---|---|---|
| IClientService | service | 
Methods
Delete(string)
Deletes a resource.
Declaration
public virtual VideosResource.DeleteRequest Delete(string id)Parameters
| Type | Name | Description | 
|---|---|---|
| string | id | 
 | 
Returns
| Type | Description | 
|---|---|
| VideosResource.DeleteRequest | 
GetRating(Repeatable<string>)
Retrieves the ratings that the authorized user gave to a list of specified videos.
Declaration
public virtual VideosResource.GetRatingRequest GetRating(Repeatable<string> id)Parameters
| Type | Name | Description | 
|---|---|---|
| Repeatable<string> | id | 
 | 
Returns
| Type | Description | 
|---|---|
| VideosResource.GetRatingRequest | 
Insert(Video, Repeatable<string>)
Inserts a new resource into this collection.
Declaration
public virtual VideosResource.InsertRequest Insert(Video body, Repeatable<string> part)Parameters
| Type | Name | Description | 
|---|---|---|
| Video | body | The body of the request. | 
| Repeatable<string> | part | The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. Note that not all parts contain properties that can be set when inserting or updating a video. For example, the statistics object encapsulates statistics that YouTube calculates for a video and does not contain values that you can set or modify. If the parameter value specifies a part that does not contain mutable values, that part will still be included in the API response. | 
Returns
| Type | Description | 
|---|---|
| VideosResource.InsertRequest | 
Insert(Video, Repeatable<string>, Stream, string)
Inserts a new resource into this collection.
Declaration
public virtual VideosResource.InsertMediaUpload Insert(Video body, Repeatable<string> part, Stream stream, string contentType)Parameters
| Type | Name | Description | 
|---|---|---|
| Video | body | The body of the request. | 
| Repeatable<string> | part | The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. Note that not all parts contain properties that can be set when inserting or updating a video. For example, the statistics object encapsulates statistics that YouTube calculates for a video and does not contain values that you can set or modify. If the parameter value specifies a part that does not contain mutable values, that part will still be included in the API response. | 
| Stream | stream | The stream to upload. See remarks for further information. | 
| string | contentType | The content type of the stream to upload. | 
Returns
| Type | Description | 
|---|---|
| VideosResource.InsertMediaUpload | 
Remarks
Considerations regarding stream:
- 
If streamis seekable, then the stream position will be reset to0before reading commences. Ifstreamis not seekable, then it will be read from its current position
- 
Caller is responsible for maintaining the streamopen until the upload is completed
- Caller is responsible for closing the stream
List(Repeatable<string>)
Retrieves a list of resources, possibly filtered.
Declaration
public virtual VideosResource.ListRequest List(Repeatable<string> part)Parameters
| Type | Name | Description | 
|---|---|---|
| Repeatable<string> | part | The part parameter specifies a comma-separated list of one or more video resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a video resource, the snippet property contains the channelId, title, description, tags, and categoryId properties. As such, if you set part=snippet, the API response will contain all of those properties. | 
Returns
| Type | Description | 
|---|---|
| VideosResource.ListRequest | 
Rate(string, RatingEnum)
Adds a like or dislike rating to a video or removes a rating from a video.
Declaration
public virtual VideosResource.RateRequest Rate(string id, VideosResource.RateRequest.RatingEnum rating)Parameters
| Type | Name | Description | 
|---|---|---|
| string | id | 
 | 
| VideosResource.RateRequest.RatingEnum | rating | 
 | 
Returns
| Type | Description | 
|---|---|
| VideosResource.RateRequest | 
ReportAbuse(VideoAbuseReport)
Report abuse for a video.
Declaration
public virtual VideosResource.ReportAbuseRequest ReportAbuse(VideoAbuseReport body)Parameters
| Type | Name | Description | 
|---|---|---|
| VideoAbuseReport | body | The body of the request. | 
Returns
| Type | Description | 
|---|---|
| VideosResource.ReportAbuseRequest | 
Update(Video, Repeatable<string>)
Updates an existing resource.
Declaration
public virtual VideosResource.UpdateRequest Update(Video body, Repeatable<string> part)Parameters
| Type | Name | Description | 
|---|---|---|
| Video | body | The body of the request. | 
| Repeatable<string> | part | The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a video's privacy setting is contained in the status part. As such, if your request is updating a private video, and the request's part parameter value includes the status part, the video's privacy setting will be updated to whatever value the request body specifies. If the request body does not specify a value, the existing privacy setting will be removed and the video will revert to the default privacy setting. In addition, not all parts contain properties that can be set when inserting or updating a video. For example, the statistics object encapsulates statistics that YouTube calculates for a video and does not contain values that you can set or modify. If the parameter value specifies a part that does not contain mutable values, that part will still be included in the API response. | 
Returns
| Type | Description | 
|---|---|
| VideosResource.UpdateRequest |