Description Usage Arguments Details Author(s) Examples
Helper function to retrieve valid values for part (mostly used internally).
1 | findParts(FUN)
|
FUN |
Function to retrieve the valid |
Valid FUN
:
getActivities
getCaptions
getChannels
getChannelSections
getComments
getCommentThreads
getPlaylistItems
getPlaylists
getSubscriptions
getVideos
Alternatively see scope
in youOAuth
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
# Authenticate
token <- youOAuth(client.id = "something.apps.googleusercontent.com",
client.secret = "XxxXX1XxXxXxxx1xxx1xxXXX")
# search channels about cats
search <- searchTube(token, query = "cats", type = "channel")
# random channel id
set.seed(19880525)
chan <- sample(search$id.channelId, 1)
# get valid part
p <- findParts(FUN = "getActivities")[1]
# fetch data
act <- getActivities(token, channel.id = chan, part = p)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.