Skip to contents

Get playlist from 'YouTube API'

Usage

ryt_get_playlists(
  part = c("contentDetails", "id", "localizations", "player", "snippet", "status"),
  fields = NULL
)

Arguments

part

parts of playist metadata, see API documentation.

fields

Fields of video metadata, see API documentation.

Value

tibble with playlist metadata

Details

Parts and fields part:

  • contentDetails

  • id

  • localizations

  • player

  • snippet

  • status

parts and fields details

  • kind - Identifies the API resource's type.

  • etag - The Etag of this resource.

  • id - The ID that YouTube uses to uniquely identify the playlist.

  • snippet - The snippet object contains basic details about the playlist, such as its title and description.

    • snippet/publishedAt - The date and time that the playlist was created.

    • snippet/channelId - The ID that YouTube uses to uniquely identify the channel that published the playlist.

    • snippet/title - The playlist's title.

    • snippet/description - The playlist's description.

    • snippet/thumbnails - A map of thumbnail images associated with the playlist.

    • snippet/thumbnails/(key) - Valid key values are: default, medium, high, standard, maxres

    • snippet/thumbnails/(key)/url - The image's URL.

    • snippet/thumbnails/(key)/width - The image's width.

    • snippet/thumbnails/(key)/height - The image's height.

    • snippet/channelTitle - The channel title of the channel that the video belongs to.

    • snippet/defaultLanguage - The language of the text in the playlist resource's snippet.title and snippet.description properties.

    • snippet/localized - The snippet.localized object contains either a localized title and description for the playlist or the title in the default language for the playlist's metadata.

    • snippet/localized/title - The localized playlist title.

    • snippet/localized/description - The localized playlist description.

  • status - The status object contains status information for the playlist.

    • status/privacyStatus - The playlist's privacy status.

  • contentDetails - The contentDetails object contains information about the playlist content, including the number of videos in the playlist.

    • contentDetails/itemCount - The number of videos in the playlist.

  • player - The player object contains information that you would use to play the playlist in an embedded player.

    • player/embedHtml - An iframe tag that embeds a player that will play the playlist.

  • localizations - The localizations object encapsulates translations of the playlist's metadata.

    • localizations/(key) - The language of the localized text associated with the key value.

    • localizations/(key)/title - The localized playlist title.

    • localizations/(key)/description - The localized playlist description.

Examples

if (FALSE) {
pl <- ryt_get_playlists(
    part = c('id', 'contentDetails', 'snippet'),
    fields = 'items(id,snippet/channelId,snippet/title,contentDetails/itemCount)'
 )
}