Learn R Programming

tuber (version 0.9.9)

get_playlists: Get Playlists

Description

Get Playlists

Usage

get_playlists(
  filter = NULL,
  part = "snippet",
  max_results = 50,
  hl = NULL,
  page_token = NULL,
  simplify = TRUE,
  ...
)

Arguments

filter

string; Required. named vector of length 1 potential names of the entry in the vector: channel_id: ID of the channel playlist_id: YouTube playlist ID.

part

Required. One of the following: contentDetails, id, localizations, player, snippet, status. Default: contentDetails.

max_results

Maximum number of items that should be returned. Integer. Optional. Can be between 0 and 50. Default is 50.

hl

Language used for text values. Optional. Default is en-US. For other allowed language codes, see list_langs.

page_token

specific page in the result set that should be returned, optional

simplify

Data Type: Boolean. Default is TRUE. If TRUE and if part requested is contentDetails, the function returns a data.frame. Else a list with all the information returned.

Additional arguments passed to tuber_GET.

Value

playlists When simplify is TRUE, a data.frame with 4 columns is returned: kind, etag, id, contentDetails.itemCount

References

https://developers.google.com/youtube/v3/docs/playlists/list

Examples

Run this code
# NOT RUN {
# Set API token via yt_oauth() first

get_playlists(filter=c(channel_id="UCMtFAi84ehTSYSE9XoHefig"))
get_playlists(filter=c(channel_id="UCMtFAi84ehTSYSE9X")) # incorrect Channel ID
# }

Run the code above in your browser using DataLab