getCommentThreads: getCommentThreads

Description Usage Arguments Details Author(s) Examples

Description

Returns a list of comment threads that match the API request parameters.

Usage

1
2
3
4
getCommentThreads(token, part = "snippet", n = 20, channel.id,
  all.threads.related.to.channel.id, id, video.id, max.results = NULL,
  moderation.status = "published", order = NULL, search.terms = NULL,
  text.format = NULL, verbose = FALSE)

Arguments

token

Your token as returned by youOAuth.

part

The part parameter specifies a comma-separated list of one or more activity resource properties that the API response will include. The default value is snippet, can take any of snippet or id. See findParts.

n

Number of results to fecth. The default value is 20.

channel.id

Instructs the API to return comment threads containing comments about the specified channel. (The response will not include comments left on videos that the channel uploaded.).

all.threads.related.to.channel.id

Instructs the API to return all comment threads associated with the specified channel. The response can include comments about the channel or about the channel's videos.

id

Specifies a comma-separated list of comment thread IDs for the resources that should be retrieved.

video.id

Instructs the API to return comment threads associated with the specified video ID.

max.results

Specifies the maximum number of results that should be returned by each API call. Acceptable values are 0 to 100, inclusive. The default value is NULL.

moderation.status

Specifies the maximum number of items that should be returned in the result set. Note: This parameter is not supported for use in conjunction with the id parameter. Acceptable values are 1 to 100, inclusive. The default value is 20.

order

Specifies the method that will be used to order resources in the API response. The default value is NULL. See findParams for valid values.

search.terms

Instructs the API to limit the API response to only contain comments that contain the specified search terms.

text.format

Set this parameter's value to html or plainText to instruct the API to return the comments left by users in html formatted or in plain text. The default value is NULL - which YouTube defaults to html. See findParams for all valid values.

verbose

If TRUE prints infromational messages in the console. The default value is FALSE.

Details

Must specify one (and only one) of all.threads.related.to.channel.id or channel.id or id or video.id

The part parameter has great impact on your quota, visit the official documentation for more information.

Author(s)

John Coene [email protected]

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 channel on cats
search <- searchTube(token, query = "cats", type = "channel")

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

# fetch comment thread
cats <- getCommentThreads(token, all.threads.related.to.channel.id = channel)

## End(Not run)

JohnCoene/youTubeDataR documentation built on May 7, 2019, 11:59 a.m.