getCaptions: getCaptions

Description Usage Arguments Details Author(s) See Also Examples

View source: R/get_captions.R

Description

Returns a list of caption tracks that are associated with a specified video.

Usage

1
2
getCaptions(token, video.id, part = "snippet", id = NULL,
  on.behalf.of.content.owner = NULL)

Arguments

token

Your token as returned by youOAuth.

video.id

specifies the YouTube video ID of the video for which the API should return caption tracks. Required.

part

specifies the caption resource parts that the API response will include. The default vlaue is snippet, can take any of id or snippet. See findParts.

id

The id parameter specifies a comma-separated list of IDs that identify the caption resources that should be retrieved. Each ID must identify a caption track associated with the specified video. The default value is NULL.

on.behalf.of.content.owner

The on.behalf.of.content.owner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner. This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners. See scopes under youOAuth. The default value is NULL.

Details

See scope in youOAuth. Required authorisation:

Author(s)

John Coene [email protected]

See Also

link{youOAuth}, findParts

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
# Authenticate
token <- youOAuth(client.id = "something.apps.googleusercontent.com",
                  client.secret = "XxxXX1XxXxXxxx1xxx1xxXXX")
                  
# search videos about cats
search <- searchTube(token, query = "cats", type = "video")

# random channel id
set.seed(19880525)
vid <- sample(search$videoId, 1)

# fetch data
act <- getActivities(token, video.id = vid)

## End(Not run)

JohnCoene/youTubeDataR documentation built on May 4, 2018, 8:05 a.m.