geTrends: Getting trends from youtube using YouTube API

Description Usage Arguments Details Value

View source: R/geTrends.R

Description

Extract youtube trends of most popular or most viewed by country .

Usage

1
geTrends(chart = "mostPopular", regionCode, api_key, maxResults = 5)

Arguments

chart

:The chart parameter identifies the chart that you want to retrieve. (string) like 'mostPopular'

regionCode

: string The regionCode parameter instructs the API to select a video chart available in the specified region. This parameter can only be used in conjunction with the chart parameter. The parameter value is an ISO 3166-1 alpha-2 country code https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Current_codes

api_key

: Google API key

maxResults

unsigned integer . The maxResults parameter specifies the maximum number of items that should be returned in the result set. Note: This parameter is supported for use in conjunction with the myRating parameter, but it is not supported for use in conjunction with the id parameter. Acceptable values are 1 to 50, inclusive. The default value is 5.

part

The part parameter specifies a comma-separated list of one or more video resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a video resource, the snippet property contains the channelId, title, description, tags, and categoryId properties. As such, if you set part=snippet, the API response will contain all of those properties.

Details

For most popular video

Value

Data frame


saberbouabid/RYoutube documentation built on May 29, 2019, 12:20 p.m.