Show / Hide Table of Contents

Class PlaylistItemsResource

The "playlistItems" collection of methods.

Inheritance
System.Object
PlaylistItemsResource
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Google.Apis.YouTube.v3
Assembly: Google.Apis.YouTube.v3.dll
Syntax
public class PlaylistItemsResource

Constructors

PlaylistItemsResource(IClientService)

Constructs a new resource.

Declaration
public PlaylistItemsResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

Delete(String)

Deletes a playlist item.

Declaration
public virtual PlaylistItemsResource.DeleteRequest Delete(string id)
Parameters
Type Name Description
System.String id

The id parameter specifies the YouTube playlist item ID for the playlist item that is being deleted. In a playlistItem resource, the id property specifies the playlist item's ID.

Returns
Type Description
PlaylistItemsResource.DeleteRequest

Insert(PlaylistItem, String)

Adds a resource to a playlist.

Declaration
public virtual PlaylistItemsResource.InsertRequest Insert(PlaylistItem body, string part)
Parameters
Type Name Description
PlaylistItem body

The body of the request.

System.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.

Returns
Type Description
PlaylistItemsResource.InsertRequest

List(String)

Returns a collection of playlist items that match the API request parameters. You can retrieve all of the playlist items in a specified playlist or retrieve one or more playlist items by their unique IDs.

Declaration
public virtual PlaylistItemsResource.ListRequest List(string part)
Parameters
Type Name Description
System.String part

The part parameter specifies a comma-separated list of one or more playlistItem 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 playlistItem resource, the snippet property contains numerous fields, including the title, description, position, and resourceId properties. As such, if you set part=snippet, the API response will contain all of those properties.

Returns
Type Description
PlaylistItemsResource.ListRequest

Update(PlaylistItem, String)

Modifies a playlist item. For example, you could update the item's position in the playlist.

Declaration
public virtual PlaylistItemsResource.UpdateRequest Update(PlaylistItem body, string part)
Parameters
Type Name Description
PlaylistItem body

The body of the request.

System.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 playlist item can specify a start time and end time, which identify the times portion of the video that should play when users watch the video in the playlist. If your request is updating a playlist item that sets these values, and the request's part parameter value includes the contentDetails part, the playlist item's start and end times will be updated to whatever value the request body specifies. If the request body does not specify values, the existing start and end times will be removed and replaced with the default settings.

Returns
Type Description
PlaylistItemsResource.UpdateRequest
Back to top