getActivities: getActivities

Description Usage Arguments Details Author(s) See Also Examples

View source: R/get_activities.R

Description

Returns a list of caption tracks matching a specific critera.

Usage

1
2
3
4
getActivities(token, channel.id, mine = FALSE, home = FALSE,
  part = "snippet", n = 50, max.results = 50,
  published.before = Sys.time(), published.after = NULL,
  region.code = NULL, verbose = FALSE)

Arguments

token

Your token as returned by youOAuth.

channel.id

Indicates that the API response should only contain resources created by the channel.

mine

Set this parameter's value to true to retrieve a feed of the authenticated user's activities. The default value is FALSE.

home

Set this parameter's value to true to retrieve the activity feed that displays on the YouTube home page for the currently authenticated user. The default value is FALSE.

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 contentDetails, id or snippet. See link{findParts}.

n

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

max.results

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

published.before

Indicates that the API response should only contain resources created before the specified time. Can be either of class Date (" or POSIXct or POSIXlt with time, or an RFC 3339 formatted date-time value (i.e.: 1970-01-01T00:00:00Z). The default value is Sys.time().

published.after

Indicates that the API response should only contain resources created after the specified time. Can be either of class Date (" or POSIXct or POSIXlt with time, or an RFC 3339 formatted date-time value (i.e.: 1970-01-01T00:00:00Z). The default value is NULL.

region.code

Instructs the API to return search results for the specified country. The parameter value is an ISO 3166-1 alpha-2 country code. The default value is NULL. See getRegions

verbose

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

Details

MUST specify one of channel.id OR mine OR home.

Author(s)

John Coene [email protected]

See Also

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

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

# fetch data
act <- getActivities(token, channel.id = chan)

## End(Not run)

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