nyt_mostpopular: nyt_mostpopular

Description Usage Arguments Value

View source: R/nyt-mostpopular.r

Description

Retrieves NYTimes data for one of three possible popularity metrics—mostshared, mostviewed, or mostemailed.

Usage

1
2
nyt_mostpopular(metric = "mostshared", section = "all-sections", days = 7,
  apikey = NULL, ...)

Arguments

metric

Popularity metric. Must be one of \"mostemailed\" \"mostviewed\", or \"mostshared\". Defaults to \"mostshared\".

section

NYtimes section of interest. By default, this is set to \"all-sections\".

days

Window of time used to calculate metric. Must be 1, 7, or 30 (days). Defaults to 7 (or one week).

apikey

Nytimes article search API key. By default the function will look for the key as an environment variable. Alternatively, you can supply the key (a character string) directly to this apikey argument.

...

Arguments passed along to query in final GET request.

Value

Nested list object of nytimes article data.


mkearney/nytimes documentation built on May 23, 2019, 1:07 a.m.